Commits

Anonymous committed 41089f3

CWS-TOOLING: integrate CWS greenstate30_DEV300

  • Participants
  • Parent commits 02eea16

Comments (0)

Files changed (144)

File testautomation/chart2/optional/ch2_xml_format.bas

 '*
 '/***********************************************************************
 '*
-'* owner : oliver.craemer@sun.com
+'* owner : joerg.sievers@sun.com
 '*
 '* short description : General XML file format check
 '*

File testautomation/dbaccess/optional/includes/db_ADOAccess.inc

         aFieldsContent(1,5)=""
         aFieldsContent(1,6)=""
         aFieldsContent(1,7)=""
-        aFieldsContent(1,8)="1"
+        aFieldsContent(1,8)=""
         aFieldsContent(1,9)="1"
         aFieldsContent(1,10)="1"
         aFieldsContent(1,11)="1"

File testautomation/dbaccess/optional/includes/db_Relations.inc

         printlog "open relation design and choose proper fields from table/listbox"
         RelationProperties.TypeKeys "<TAB>",TRUE
         RelationProperties.TypeKeys "<TAB>",TRUE
-        RelationProperties.TypeKeys "<MOD2 DOWN>",TRUE
-        sleep(1)
-        RelationProperties.TypeKeys "<DOWN>",TRUE
-        RelationProperties.TypeKeys "<RETURN>",TRUE
-        sleep(1)
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE
+        sleep(1)        
         RelationProperties.TypeKeys "<TAB>",TRUE
-        RelationProperties.TypeKeys "<MOD2 DOWN>",TRUE
-        sleep(1)
-        RelationProperties.TypeKeys "<DOWN>",TRUE
-        RelationProperties.TypeKeys "<RETURN>",TRUE
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE        
         sleep(1)
         RelationProperties.OK
         printlog "1:1 relation between test tables created"
     '/// open relation design and choose the proper fields from table/listbox
         printlog "open relation design and choose the proper fields from table/listbox"
         RelationProperties.TypeKeys "<TAB>",TRUE
-        RelationProperties.TypeKeys "<MOD2 DOWN>",TRUE
-        sleep(1)
-        RelationProperties.TypeKeys "<DOWN>",TRUE
-        RelationProperties.TypeKeys "<RETURN>",TRUE
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE        
         sleep(1)
         RelationProperties.TypeKeys "<TAB>",TRUE
-        RelationProperties.TypeKeys "<MOD2 DOWN>",TRUE
-        sleep(1)
-        RelationProperties.TypeKeys "<DOWN>",TRUE
-        RelationProperties.TypeKeys "<DOWN>",TRUE
-        RelationProperties.TypeKeys "<RETURN>",TRUE
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE        
         sleep(1)
         RelationProperties.TypeKeys "<TAB>",TRUE
-        RelationProperties.TypeKeys "<MOD2 DOWN>",TRUE
-        sleep(1)
-        RelationProperties.TypeKeys "<DOWN>",TRUE
-        RelationProperties.TypeKeys "<RETURN>",TRUE
+        RelationProperties.TypeKeys "<MOD1 DOWN>",TRUE        
         sleep(1)
         RelationProperties.OK
         

File testautomation/dbaccess/optional/includes/rpt_ExecuteReport.inc

     Kontext "ReportDesign"
         ReportAlignLeft
         ReportAlignUp
-        
+    sleep(1) ' need a sleep before using the propety browser    
     Kontext "ReportPropertiesTabControl"
         ReportPropertiesTabControl.setPage ReportDataProperties
     

File testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc

     qaerrorlog "not yet implemented"
     goto endsub
 
+    qaerrorlog "not yet implemented"
+    goto endsub
+
     if gPlatform = "x86" then
         printlog "Adabas doesn't exists under x86."
         goto endsub    

File testautomation/dbaccess/optional/includes/wiz_ReportWizard.inc

 '-------------------------------------------------------------------------
 testcase tNewReport
 
+    qaerrorlog "#i92543# crash when closing report"
+    goto endsub
+
     call fOpenDatabase(gOfficePath + ConvertPath("user/database/biblio.odb"))
         
     Kontext "Insight"

File testautomation/dbaccess/required/input/sun-report-builder.oxt

Binary file added.

File testautomation/extensions/optional/e_errors.bas

-'encoding UTF-8  Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'* 
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: e_errors.bas,v $
-'*
-'* $Revision: 1.3 $
-'*
-'* last change: $Author: jsk $ $Date: 2008-06-20 08:07:01 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org.  If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/******************************************************************************
-'*
-'*  owner : joerg.skottke@sun.com
-'*
-'*  short description : Install extensions that caused unopkg to fail
-'*
-'\******************************************************************************
-
-sub main
-
-    use "extensions\optional\includes\errors.inc"
- 
-    call hStatusIn( "extensions" , "e_errors.bas" )
-    call tExtensionError77436()
-    call hStatusOut()
-
-end sub
-
-'-------------------------------------------------------------------------
-
-sub LoadIncludeFiles
-
-    use "global\system\includes\gvariabl.inc"
-    use "global\system\includes\master.inc"
-    
-    use "global\tools\includes\optional\t_extension_manager_tools.inc"
-    use "global\tools\includes\optional\t_stringtools.inc"
-    use "global\tools\includes\optional\t_accels.inc"
-    use "global\tools\includes\optional\t_docfuncs.inc"
-    use "global\tools\includes\optional\t_listfuncs.inc"
-    use "global\tools\includes\optional\t_macro_tools.inc"
-    use "global\tools\includes\optional\t_basic_ide_tools.inc"
-    use "global\tools\includes\optional\t_basic_organizer_tools.inc"
-   
-    gApplication = "WRITER"
-    call GetUseFiles()
-
-end sub
-

File testautomation/extensions/optional/e_platforms.bas

     use "global\system\includes\master.inc"
 
     use "global\tools\includes\optional\t_extension_manager_tools.inc"
-    use "global\tools\includes\optional\key_tools.inc"
+    use "global\tools\includes\optional\t_key_tools.inc"
 
     gApplication = "WRITER"
     call GetUseFiles()

File testautomation/extensions/optional/includes/errors.inc

-'encoding UTF-8  Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'* 
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: errors.inc,v $
-'*
-'* $Revision: 1.2 $
-'*
-'* last change: $Author: jsk $ $Date: 2008-06-19 09:02:09 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org.  If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/******************************************************************************
-'*
-'*  owner : joerg.skottke@sun.com
-'*
-'*  short description : Reproduction of misc errors when working with extensions
-'*
-'\******************************************************************************
-
-testcase tExtensionError77436
-
-    '///<h3>Registration error when installing extension, Linux/UNIX only</h3>
-    '///<ul>
-    
-    warnlog( "#i87453# - Failure to load sample extension" )
-    goto endsub
-    
-    if ( lcase( gtSysName ) <> "linux" ) then 
-        printlog( "Sample extension is not suitable for Windows or Solaris" )
-        goto endsub
-    endif
-    
-    dim irc as integer
-    dim brc as boolean
-    dim cMsg as string
-    
-    dim cWorkPath as string
-        cWorkPath = gTesttoolPath & "extensions\optional\input\errors\"
-        cWorkPath = convertpath( cWorkPath )
-        
-    const EXTENSION_NAME = "i77436-extension.oxt"
-    const MACRO_NAME = "i77436"
-    
-    '///+<li>Create an initial document, change it so it cannot be replaced</li>
-    gApplication = "WRITER"
-    do while ( getDocumentCount > 0 ) 
-        hCloseDoc()
-    loop
-    hNewDocument()
-    kontext "DocumentWriter"
-    DocumentWriter.typeKeys( "Testdocument for tExtensionError77436" )
-    
-    '///+<li>Add the extension (see code for details)</li>
-    irc = hExtensionAddGUI( cWorkPath & EXTENSION_NAME , "verbose,InstallForUser" )
-    
-    '///+<li>Go to the BASIC IDE, create a new module</li>
-    brc = hInitBasicIde( MACRO_NAME )
-    if ( not brc ) then
-        warnlog( "Failed to init BASIC IDE, fatal" )
-        call ExitRestartTheOffice()
-        goto endsub
-    endif
-    
-    '///+<li>Insert the macro (that comes with the extension</li>
-    irc = hInsertMacroFromFile( MACRO_NAME )
-    if ( irc <> 9 ) then
-        warnlog( "Retrieved/inserted wrong macro, please check" )
-    endif
-    
-    '///+<li>Close the BASIC IDE</li>
-    irc = hCloseBasicIDE()
-    
-    '///+<li>Run the macro from the Run Macro dialog</li>
-    irc = hMacroOrganizerRunMacro( MACRO_NAME )
-    
-    '///+<li>Verify that the macro was indeed executed - messagebox 1</li>
-    kontext "Active"
-    if ( Active.exists( 2 ) ) then
-        cMsg = Active.getText()
-        cMsg = hRemoveLineBreaks( cMsg )
-        printlog( "Message 1: " & cMsg )
-        active.ok()
-    endif
-    
-    '///+<li>Verify that the macro was indeed executed - messagebox 2</li>
-    kontext "Active"
-    if ( Active.exists( 2 ) ) then
-        cMsg = Active.getText()
-        cMsg = hRemoveLineBreaks( cMsg )
-        printlog( "Message 2: " & cMsg )
-        active.ok()
-    endif
-    
-    '///+<li>Remove the extension again</li>
-    irc = hExtensionRemoveGUI( EXTENSION_NAME )
-    select case irc
-    case 0    : printlog( "Extension was removed, ok" )
-    case else : warnlog( "Removing extension failed with rc = " & irc )
-    end select
-    
-    '///+<li>Verify that the number of documents is still correct (should be two)</li>
-    if ( getDocumentCount() = 2 ) then  
-        warnlog( "Document left over by some error. Closing" )
-        hCloseDocument()
-    endif
-    
-    '///+<li>Close all documents until we are on backing window</li>
-    do while ( getDocumentCount > 0 ) 
-        hCloseDocument()
-    loop
-    '///</ul>
-
-endcase
-

File testautomation/extensions/optional/includes/extensions.inc

     '/// - UnsatisfiedDependencies dialog exists ///'
     '///     (1/1): Unknown ///'
     '/// - will not install ///'
-    '/// (28/31): dependencies\version22.oxt ///'
+    '/// (25/31): dependencies\version25.oxt ///'
     '/// - installs and is enabled ///'
-    '/// (29/31): dependencies\version23.oxt ///'
+    '/// (25/31): dependencies\version30.oxt ///'
     '/// - installs and is enabled ///'
-    '/// (25/31): dependencies\version24.oxt ///'
-    '/// - installs and is enabled ///'
-    '/// (25/31): dependencies\version25.oxt ///'
+    '/// (25/31): dependencies\version31.oxt ///'
     '/// - UnsatisfiedDependencies dialog exists ///'
     '///     (1/1): Unknown ///'
     '/// - will not install ///'
     ' 5th number: If active is expected the expected version information after selecting a file for installation the value is one, else zero and if an upgrade/downgrade is expected, the number is 2.
     
     ' Base path for test files
-    sPath = convertPath(gTestToolPath+"framework/basic/input/extensions/")
+    sPath = convertPath(gTestToolPath+"extensions/optional/input/")
     ' read filelist and expected features
     ListRead(aFileList(), sPath+"files.txt")
     a = listCount(aFileList())

File testautomation/extensions/optional/input/dependencies/version22.oxt

Binary file removed.

File testautomation/extensions/optional/input/dependencies/version23.oxt

Binary file removed.

File testautomation/extensions/optional/input/dependencies/version24.oxt

Binary file removed.

File testautomation/extensions/optional/input/dependencies/version30.oxt

+PK
+m��m�Q|�M����$���/ut��������������M����a�2 ��V(s��P��3�^���SQn��~K�ܨF��
+�?���6(b�)�FՒYF,��|
-�
-���\��!�����ñ��r��

File testautomation/extensions/optional/input/dependencies/version31.oxt

+PK
+m��m�Q|�M����$���/ut��������������M����a�2 ��V(s��P��3�^���SQn��~K�ܨF��
+�?���6(b�)�FՒYF,��|
+��f�戈u'7�<��>�I>PK@rWn�:_�t����^���c~�48 |7�j~�g
-�
-���\��!�����ñ��r��

File testautomation/extensions/optional/input/files.txt

 simpleLicense\BadNamespace.oxt;0,0,0,1,0
 simpleLicense\BadRoot.oxt;0,0,0,1,0
 simpleLicense\IncompAttr1.oxt;0,1,1,0,0
-simpleLicense\IncompAttr2.oxt;0,1,1,1,0
+simpleLicense\IncompAttr2.oxt;0,1,1,0,0
 simpleLicense\LongLic.oxt;0,2,1,0,0
 simpleLicense\MissingLic.oxt;0,0,0,1,0
 simpleLicense\MissingLicRef.oxt;0,0,0,1,0
 simpleLicense\NoDesc.oxt;0,0,1,0,0
-simpleLicense\NoLangNoDefault.oxt;0,1,1,1,0
-simpleLicense\OnlyDefault.oxt;0,1,1,1,0
+simpleLicense\NoLangNoDefault.oxt;0,1,1,0,0
+simpleLicense\OnlyDefault.oxt;0,1,1,0,0
 simpleLicense\ShortLicense.oxt;0,1,1,0,0
 simpleLicense\CancelLicense.oxt;0,3,0,0,0
 simpleLicense\ShortLicenseShared.oxt;0,1,1,0,0
 dependencies\version10000.oxt;1,0,0,0,0
 dependencies\version21ns.oxt;0,0,1,0,0
 dependencies\version21other.oxt;1,0,0,0,0
-dependencies\version22.oxt;0,0,1,0,0
-dependencies\version23.oxt;0,0,1,0,0
-dependencies\version24.oxt;0,0,1,0,0
-dependencies\version25.oxt;1,0,0,0,0
+dependencies\version25.oxt;0,0,1,0,0
+dependencies\version30.oxt;0,0,1,0,0
+dependencies\version31.oxt;1,0,0,0,0
 dependencies\versionempty.oxt;0,0,1,0,0
 dependencies\versionnone.oxt;0,0,1,0,0
 versions/plain.oxt;0,0,1,0,0

File testautomation/framework/optional/f_basic_templatedocuments.bas

 
     use "framework\tools\includes\private_environment.inc"
     use "framework\tools\includes\webtools.inc"
-    use "framework\tools\includes\filter_tools.inc"
     use "framework\tools\includes\template_tools.inc"
     use "framework\tools\includes\init_tools.inc"
     use "framework\tools\includes\scriptorganizer_tools.inc"

File testautomation/framework/optional/f_filedlg_dialogtest.bas

 '* <http:\\www.openoffice.org\license.html>
 '* for a copy of the LGPLv3 License.
 '*
-'\************************************************************************
+'/************************************************************************
 ' **
 ' ** owner : joerg.skottke@sun.com
 ' **

File testautomation/framework/optional/f_filedlg_ftp_proxy.bas

-'encoding UTF-8  Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'* 
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: f_filedlg_ftp_proxy.bas,v $
-'*
-'* $Revision: 1.3 $
-'*
-'* last change: $Author: jsk $ $Date: 2008-06-20 08:07:02 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org.  If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/******************************************************************************
-'*
-'*  owner : Joerg.Skottke@Sun.Com
-'*
-'*  short description : Open ftp location with proxies enabled/disabled
-'*
-'\******************************************************************************
-
-sub main
-
-    use "framework\optional\includes\filedlg_ftp_proxy.inc"
-
-    call hStatusIn( "framework" , "f_filedlg_ftp_proxy.bas" )
-    call tFiledlgFtpProxy()
-    call hStatusOut()
-
-end sub
-
-'*******************************************************************************
-
-sub LoadIncludeFiles
-
-    use "global\system\includes\master.inc"
-    use "global\system\includes\gvariabl.inc"
-
-    use "global\tools\includes\optional\t_docfuncs.inc"
-
-    use "framework\tools\includes\private_environment.inc"
-    use "framework\tools\includes\webtools.inc"
-
-    gApplication = "WRITER"
-    call GetUseFiles()
-
-end sub
-

File testautomation/framework/optional/f_java_upgrade.bas

-'encoding UTF-8  Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'* 
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: f_java_upgrade.bas,v $
-'*
-'* $Revision: 1.3 $
-'*
-'* last change: $Author: jsk $ $Date: 2008-06-20 08:07:02 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org.  If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'*
-'/******************************************************************************
-'*
-'*  owner : Joerg.Skottke@Sun.Com
-'*
-'*  short description : Collection of all Java related testcases
-'*
-'\******************************************************************************
-
-sub main
-
-    ' This is a collection of all tests that use java somehow.
-    ' It is intended to be the single test that has to be run each time a
-    ' new Java version is introduced into the product.
-    
-    
-    use "framework\optional\includes\scripting_basics.inc"     '(tScripting)
-    use "framework\optional\includes\scripting_organizers.inc" '(tScriptingOrganizers)
-    
-    
-    dim iDialog as integer ' allowed: 1 (BeanShell) and/or 2 (JavaScript)
-    dim iApp as integer    ' Numeric expr. for Doc-Type: Writer, Calc, Draw...
-    dim cApp as string   
-    
-    hDeleteUserTemplates()    
-    
-    ' ================== Begin Framework Tests =====================
-    
-    call ExitRestartTheOffice()
-    
-    call tUpdtWizardLetter()
-    call tUpdtWizardFax()
-    call tUpdtwizardAgenda()
-    call tUpdtWizardWebpage()
-    
-    call ExitRestartTheOffice()
-
-    call tScripting()
-    call tScriptingOrganizers()
-    
-    call exitRestartTheOffice()
-    
-    ' cycle through the main applications
-    for iApp = 1 to 6
-        cApp = hNumericDocType( iApp )
-        printlog( "" )
-        printlog( iapp & ". " & cApp )
-        
-        ' 1 = beanshell, 2 = javascript
-        for iDialog = 1 to 2
-            call tScriptingOrganizers( iDialog )
-        next iDialog
-    next iApp
-    
-    ' =================== End Framework Tests ======================
-    
-    hCloseNavigator()
-    call exitRestartTheOffice()
-    
-    ' ================== Begin Database Tests =====================
-    
-    Call sDBInit
-    call db_hsqldb
-    call db_JDBCMySQL
-    call wiz_DatabaseWizard
-    call wiz_FormWizard
-    call wiz_QueryWizard
-    call wiz_ReportWizard
-    call wiz_TableWizard
-    
-    
-    ' =================== End Database Tests ======================
-    
-    hDeleteUserTemplates() 
-    call exitRestartTheOffice()
-
-end sub
-
-'-------------------------------------------------------------------------
-
-sub LoadIncludeFiles
-
-    use "global\system\includes\master.inc"
-    use "global\system\includes\gvariabl.inc"
-    
-    use "global\tools\includes\optional\t_extension_manager_tools.inc"
-    use "global\tools\includes\optional\t_security_tools.inc"
-    use "global\tools\includes\optional\t_control_objects.inc"
-    use "global\tools\includes\optional\t_docfuncs.inc"
-    use "global\tools\includes\optional\t_filetools.inc"
-    use "global\tools\includes\optional\t_treelist_tools.inc"
-    use "global\tools\includes\optional\key_tools.inc"
-
-    use "framework\tools\includes\scriptorganizer_tools.inc"
-    use "framework\tools\includes\wizards.inc"
-    use "framework\tools\includes\template_tools.inc"
-    use "framework\tools\includes\javatools.inc"
-    use "framework\tools\includes\performance.inc"
-
-    use "framework\required\includes\wizard_letter.inc"
-    use "framework\required\includes\wizard_agenda.inc"
-    use "framework\required\includes\wizard_fax.inc"
-    use "framework\required\includes\wizard_webpage.inc"
-
-    gApplication = "WRITER"
-    call GetUseFiles()
-    
-    ' ================== Begin Database includes =====================
-
-    use "dbaccess/tools/dbinit.inc"
-    use "dbaccess/tools/dbcreatetools.inc"
-    use "dbaccess/optional/includes/db_Query.inc"
-    
-    use "dbaccess/optional/includes/db_hsqldb.inc"
-    use "dbaccess/optional/includes/db_JDBCMySQL.inc"
-    
-    ' wizards
-    
-    use "dbaccess/optional/includes/wiz_DatabaseWizard.inc"
-    use "dbaccess/optional/includes/wiz_FormWizard.inc"
-    use "dbaccess/optional/includes/wiz_QueryWizard.inc"
-    use "dbaccess/optional/includes/wiz_ReportWizard.inc"
-    use "dbaccess/optional/includes/wiz_TableWizard.inc"
-    
-    ' ================== End Database includes =====================
-
-end sub
-
-

File testautomation/framework/optional/f_options_general.bas

-'encoding UTF-8  Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'* 
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: f_options_general.bas,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsk $ $Date: 2008-06-20 07:07:27 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org.  If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : thorsten.bosbach@sun.com
-'*
-'* short description : General Tools/Options test
-'*
-'\***********************************************************************
-
-sub main
-
-    use "framework\optional\includes\options_so_4.inc"
-    use "framework\optional\includes\options_so_5.inc"
-    use "framework\optional\includes\options_lan1.inc"
-    use "framework\optional\includes\options_int1.inc"
-    use "framework\optional\includes\options_ls_2.inc"
-    use "framework\optional\includes\options_asia.inc"
-    use "framework\optional\includes\options_data.inc"
-    
-    Call hStatusIn ( "framework", "f_options_general.bas")
-    
-    ' Reset the autosave feature to 15 min, confirm and disable autosave
-    call hResetAutosave()
-    
-    printlog " 1. part : test if all global options are saved"
-    
-    call opt_lan1
-    Call tInternetProxy
-    Call tInternetSearch
-    Call tDatasourceConnections
-    
-    printlog " 2. part : test the functionality of some options"
-    Call func_StarOfficeGeneral_1
-    Call func_StarOfficeGeneral_2
-    Call func_StarOfficeGeneral_3
-    Call func_StarOfficeGeneral_4
-    Call func_StarOfficeMemory_1
-    Call func_StarOfficeView_1
-    Call func_StarOfficeView_2
-    Call func_StarOfficeView_3
-    Call func_StarOfficeView_4
-    Call func_StarOfficeView_5
-    Call func_StarOfficeView_6
-    Call func_StarOfficePrint_1
-    Call func_LoadSaveGeneral_1
-    Call func_LoadSaveGeneral_2
-    Call func_LanguageSettings_Language
-    
-    ' Reset the autosave feature to 15 min, confirm and disable autosave
-    call hResetAutosave()   
-    
-    Call hStatusOut
-   
-end sub
-
-sub LoadIncludeFiles
-    use "global\system\includes\master.inc"
-    use "global\system\includes\gvariabl.inc"
-    
-    use "framework\tools\includes\options_tools.inc"
-    
-    Call GetUseFiles
-    gApplication = "Writer"
-end sub
-
-

File testautomation/framework/optional/f_options_ooo.bas

     use "global\tools\includes\optional\t_docfuncs.inc"
     use "global\tools\includes\optional\t_filetools.inc"
     use "global\tools\includes\optional\t_control_objects.inc"
-    use "global\tools\includes\optional\key_tools.inc"
+    use "global\tools\includes\optional\t_key_tools.inc"
     
     use "framework\tools\includes\init_tools.inc"
     use "framework\tools\includes\options_tools.inc"

File testautomation/framework/optional/f_scripting_organizers.bas

         printlog( "" )
         printlog( cApp )
         
-        for iDialog = 1 to 3
+        for iDialog = 1 to 2 ' Python currently not tested, needs more adjustments
             call tScriptingOrganizers( iDialog )
         next iDialog
         

File testautomation/framework/optional/f_security_trusted_path.bas

 
     ' this is the trusted path we want to add to the list
     dim cWorkPath as string
-        cWorkPath = gTesttoolPath & "framework\basic\input\BasicDocs\"
+        cWorkPath = gTesttoolPath & "framework\optional\input\BasicDocs\"
         cWorkPath = convertpath( cWorkPath )
 
     ' this is the file to be loaded, located directly below trusted path

File testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc

   Call hNewDocument
  '/// Open a test file and check <i>No Grid</i> checkbox
   Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
-
+  sMakeReadOnlyDocumentEditable
   EditSelectAll
 
  '/// Open <i>Tools/Sort</i>
   Call hNewDocument
  '/// Open a test file and check <i>No Grid</i> checkbox
   Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
-
+  sMakeReadOnlyDocumentEditable
   EditSelectAll
 
  '/// Open <i>Tools/Sort</i>

File testautomation/framework/optional/includes/basic_documents.inc

     
 testcase tBasicDocuments
 
-    warnlog( "#i90435# Untitled documents unnumbered in BASIC organizer" )
+    qaerrorlog( "#i90435# Untitled documents unnumbered in BASIC organizer" )
     goto endsub
 
     const CFN = "tBasicDocuments::"

File testautomation/framework/optional/includes/basic_eventbinding.inc

         for i = 1 to x
             sTemp = LibraryTreeList.getItemText(i)
             'printlog "("+i+"/"+x+"): '" + sTemp + "'"
-            if (("DialogComponent"=sTemp) OR ("DIALOGCOMPONENT"=sTemp)) then
+            if (("DialogComponent.odt"=sTemp) OR ("DIALOGCOMPONENT.ODT"=sTemp)) then
                 a = i
                 printlog "Found library ("+i+"/"+x+"): '" + sTemp + "'"
             endif
         '       sleep... at least 60 seconds
                 call sleep(10)
             else
-                warnlog sLocation + "Macro not found: 'TestDialogComponent'"
+                warnlog "Macro not found: 'TestDialogComponent'"
             endif
         else
-            warnlog sLocation + "Library not found: 'DialogComponent' or 'DIALOGCOMPONENT'"
+            warnlog "Library not found: 'DialogComponent' or 'DIALOGCOMPONENT'"
         endif
     else
-        warnlog sLocation + "'Run macro dialog' didn't came up"
+        warnlog "'Run macro dialog' didn't came up"
     endif
     'printlog resetapplication
     

File testautomation/framework/optional/includes/basic_issues.inc

 
     printlog( "" )
     printlog( " ---------- i83978 ------------ " )
-    warnlog( "#i90645# - crash on BasicLibraries.LoadLibrary" )
-    'hInsertMacroFromFile( "i83978" )
-    'hIDERunMacro()
-    'hTestActive( "com.sun.star.container.NoSuchElementException", 1 )
+    hInsertMacroFromFile( "i83978" )
+    hIDERunMacro()
+    hTestActive( "com.sun.star.container.NoSuchElementException", 1 )
 
     printlog( "" )    
     printlog( " ---------- i82830 ------------ " )
     
     printlog( "" )
     printlog( " ---------- i80532 ------------ " )
-    warnlog( "#i80532# negative values as parameters without parentheses fail" )
-    'hInsertMacroFromFile( "i80532" )
-    'hIDERunMacro()
-    'hTestActive( "-10", 1 )
-    'hTestActive( "1", 1 )
-    'hTestActive( "-10", 1 )
+    hInsertMacroFromFile( "i80532" )
+    hIDERunMacro()
+    hTestActive( "-10", 1 )
+    hTestActive( "1", 1 )
+    hTestActive( "-10", 1 )
     
     printlog( "" )
     printlog( " ---------- i84040 ------------ " )

File testautomation/framework/optional/includes/basic_shared_modules.inc

     
     dim iObjectPosition as integer
     dim iLibraryCount as integer
+
+    const EXPECTED_LIBRARY_COUNT = 12
     
     '///<ul>
     '///+<li>Open a document to work on</li>
     iLibraryCount = Library.getItemCount()
     printlog( "There are " & iLibraryCount & " items in the list" )
     
-    if ( iLibraryCount <> 13 ) then
-        warnlog( "The number of items in the library-list is incorrect: " & iLibraryCount )
+    if ( iLibraryCount <> EXPECTED_LIBRARY_COUNT ) then
+        warnlog( "The number of items in the library-list is incorrect (should be 12): " & iLibraryCount )
     endif
     
     '///+<li>Use the Library listbox (Jump to bottom)</li>

File testautomation/framework/optional/includes/basic_spectemplate.inc

 
 testcase tBasicSpecTemplate
 
-    warnlog( "#i89554# Macro dialog not displayed / document not loaded" )
+    qaerrorlog( "#i89554# Macro dialog not displayed / document not loaded" )
     goto endsub
 
     '///<h1>Load the spec template via http and enable macros</h1>

File testautomation/framework/optional/includes/basic_usertemplate.inc

 
     dim sPathOut as string ' output path for workfile
     const FILEOUT = "tMacroUserTemplate"
-    dim sFilter as string : sFilter = hGetUIFilterName( "writer8_template" )
+    const FILTER = "writer8_template" 
         
     dim iCurrentNode as integer
 
     '///+<li>Save it as {...work/user/template/MyTemplate} (template, autosuffix)</li>
     printlog( "" )
     printlog( "Save as template" )
-    hFileSaveAsWithFilterKill( sPathOut & FILEOUT, sFilter )
+    hFileSaveAsWithFilterKill( sPathOut & FILEOUT, FILTER )
     
     '///+<li>Close document</li>
     hDestroyDocument()
     FileNewFromTemplate
     
     '///+<li>Find MyTemplate (note: No suffix displayed)</li>
-    hFindTemplate( FILEOUT )
+    irc = hFindTemplate( FILEOUT )
         
     '///+<li>Create a new document based ton this template</li>
     hSelectDocumentObject( irc, 1 )

File testautomation/framework/optional/includes/basic_vba-compat_import_disabled.inc

     dim bFound as boolean  
     
     ' Depending on the mode of macro import we have differtent basic libraries listed
-    const NODE_COUNT = 80 
+    const NODE_COUNT = 78 
  
     const DOCUMENT_POSITION_OFFSET = -7
     
     
     printlog( "Verify position of the document node" )
     MakroAus.select( cNodeCount + DOCUMENT_POSITION_OFFSET )
-    if ( MakroAus.getSelText() <> "vba-test" ) then
+    if ( MakroAus.getSelText() <> "vba-test.xls" ) then
         qaerrorlog( "The document node is not at the expected position" )
     endif
     

File testautomation/framework/optional/includes/basic_vba-compat_import_enabled.inc

 
 testcase tBasicVBACompatImportEnabled()
 
+    warnlog( "#i92666# loading sample document crashes the office" )
+    goto endsub
+
     printlog( "Test VBA compatibility switch / executable Microsoft(R) Excel(R) Macros" )
     printlog( "Test case 3: Import macros and set them executable" )
     

File testautomation/framework/optional/includes/basic_vba-compat_import_nothing.inc

     dim cNodeCount as integer
     
     ' Depending on the mode of macro import we have differtent basic libraries listed
-    const NODE_COUNT = 74 ' Do not import Microsoft(R) Excel(R) macros at all
+    const NODE_COUNT = 72 ' Do not import Microsoft(R) Excel(R) macros at all
     const MACRO_LIST = 0  ' The document library should have no scripts listed
     const DOCUMENT_POSITION_OFFSET = -1
     
     
     printlog( "Verify position of the document node" )
     MakroAus.select( cNodeCount + DOCUMENT_POSITION_OFFSET )
-    if ( MakroAus.getSelText() <> "vba-test" ) then
+    if ( MakroAus.getSelText() <> "vba-test.xls" ) then
         qaerrorlog( "The document node is not at the expected position" )
     endif
     

File testautomation/framework/optional/includes/extras_labels.inc

     dim irc as integer
     
     dim sFile as string
-        sFile = Labels_" & gISOLang & ".txt"
+        sFile = "Labels_" & gISOLang & ".txt"
 
     dim sFileIn as string
         sFileIn = gTesttoolPath & "framework\optional\input\extras_formats\" & sFile

File testautomation/framework/optional/includes/filedlg_ftp_proxy.inc

-'encoding UTF-8  Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'* 
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: filedlg_ftp_proxy.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
-'*
-'* This file is part of OpenOffice.org.
-'*
-'* OpenOffice.org is free software: you can redistribute it and/or modify
-'* it under the terms of the GNU Lesser General Public License version 3
-'* only, as published by the Free Software Foundation.
-'*
-'* OpenOffice.org is distributed in the hope that it will be useful,
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-'* GNU Lesser General Public License version 3 for more details
-'* (a copy is included in the LICENSE file that accompanied this code).
-'*
-'* You should have received a copy of the GNU Lesser General Public License
-'* version 3 along with OpenOffice.org.  If not, see
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/******************************************************************************
-'*
-'*  owner : joerg.skottke@sun.com
-'*
-'*  short description : Load/Save files using direct connection or proxy
-'*
-'\******************************************************************************
-
-testcase tFiledlgFtpProxy
-
-    '///<h3>Open a ftp connection to a server directly and via proxy</h3>
-    '///<p>This testcase uses the private environment feature, you need to be 
-    '///+ behind a firewall for this to work.</p>
-    '///<ul>
-    
-    const URL = "ftp://ftp.mozilla.org"
-    
-    dim cProxyName as string
-    dim cProxyPort as string
-    
-    dim brc as boolean
-    
-    '///+<li>Make sure we have exactly one document open and that this is &quot;The first doc!&quot;</li>
-    do while( getDocumentCount > 0 ) 
-        hCloseDocument()
-    loop
-    
-    '///+<li>Retrieve proxy configuration data</li>
-    brc = hGetPrivateFtpServer( cProxyName, cProxyPort )
-    if ( not brc ) then
-        warnlog( "Could not retrieve valid proxy configuration, aborting test" )
-        goto endsub
-    endif
-    
-    '///+<li>Configure a valid proxy (uses private environment data)</li>
-    hSetProxies( "", "", cProxyName, cProxyPort, "" )
-    
-    '///+<li>Load the page</li>
-    printlog( "FileOpen / Set URL / Load the file" )
-    FileOpen
-    kontext "OeffnenDlg"
-    if ( OeffnenDlg.exists( 2 ) ) then
-        Dateiname.setText( URL )
-        Oeffnen.click()
-        sleep( 10 )
-    else
-        warnlog( "File open dialog not open" )
-        goto endsub
-    endif
-    
-    '///+<li>Verify that the document is loaded</li>
-    brc = hIdentifyWriterDoc( "Current directory is /" , true )
-    if ( not brc ) then 
-        warnlog( "This is either the incorrect file or we failed to load the document" )
-    endif
-    
-    '///+<li>Close the loaded document</li>
-    hDestroyDocument()
-    
-    '///+<li>Reset the proxies to "none" (manual, with no proxy settings)</li>
-    hSetProxies( "", "", "", "", "" )
-    
-    '///+<li>Try to load the file with no proxies -> should fail</li>
-    '///<ul>
-    '///+<li>FileOpen</li>
-    FileOpen
-    
-    '///+<li>Enter filename, click &quot;Open&quot;</li>
-    kontext "OeffnenDlg"
-    if ( OeffnenDlg.exists( 2 ) ) then
-        DateiName.setText( URL )
-        Oeffnen.click()
-    
-        '///+<li>Close the &quot;File not found&quot; warning with &quot;OK&quot;</li>
-        Kontext "active"
-        if ( active.exists( 5 ) ) then
-            active.ok()
-            
-            '///+<li>Close the FileOpen dialog</li>
-            kontext "OeffnenDlg"
-            OeffnenDlg.cancel()
-        else
-            kontext "OeffnenDlg" 
-            if ( OeffnenDlg.exists() ) then
-                qaerrorlog( "Document not loaded / Still on File Open dialog" )
-                OeffnenDlg.cancel()
-            else
-                warnlog( "File not found warning is missing" )
-            endif
-        endif
-    endif
-    
-    '///</ul>
-    '///</ul>
-
-
-endcase
-

File testautomation/framework/optional/includes/filedlg_multiselection.inc

 
 testcase tFiledlgMultiselection1()
 
-    warnlog( "#i78597# - Crash when loading multiple documents using multiselection - excluding test" )
-    goto endsub
-
     '///<h1>Select a number of different documents and load</h1>
     '///<ul>
     
     ' that loading files using multiselection might lead to a crash.
 
     '///+<li>Determine the workdirectory</li>
-    dim cWorkPath as string
-        cWorkPath = gTesttoolPath & "framework\filedlg\input\multiselect\"
-        cWorkPath = convertpath( cWorkPath )
-        
+    dim cWorkPath as string : cWorkPath = hGetWorkPath() & "multiselection"
     dim cMsg as string
         
     dim iCurrentFile as integer
     dim iInitialDocumentCount as integer
     dim iOpenDocuments as integer
-    dim iWait as integer 
-        iWait = 0
+    dim iWait as integer  : iWait = 0
+    
+    dim iDocType as integer
+    dim iDocument as integer
+    dim cFilter( 4 ) as string
+        cFilter( 1 ) = "writer8"
+        cFilter( 2 ) = "calc8"
+        cFilter( 3 ) = "impress8"
+        cFilter( 4 ) = "draw8"
+        
+    dim cFile as string
         
     dim brc as boolean
     
     const TESTFILE_COUNT = 60 ' the number of documents in cWorkPath
+    const DOC_IDENTIFIER = "Initial document for multi selection test"
+
+    '///<ul>
+
+    ' Minimum cleanup
+    while( getDocumentCount > 0 ) 
+        hDestroyDocument()
+    wend
+
+    ' create the workdirectory
+    mkdir( cWorkPath )
     
-    '///<ul>
-    '///+<li>Test enter: Only one document may be open</li>
-    if ( getDocumentCount <> 1 ) then
-    	printlog( "Restarting office, incorrect number of documents open" )
-    	call exitRestartTheOffice()
-    endif
-    
-    '///+<li>Test enter: It must be a WRITER document</li>
-    kontext "DocumentWriter"
-    if ( not documentwriter.exists() ) then
-    	printlog( "Incorrect documenttype, need a WRITER document, restarting" )
-    	call exitRestartTheOffice()
-    endif
-    
-    '///+<li>And even more precisely: The first doc!</li>
-    if ( not hIdentifyWriterDoc( "The first doc!" , false ) ) then
-    	printlog( "Incorrect WRITER document, restarting" )
-    	call exitRestartTheOffice()
-    endif
+    ' create a bulk of files
+    for iDocType = 1 to 4
+        hNumericDocType( iDocType )
+        hNewDocument()
+        hChangeDoc()
+        for iDocument = 1 to 15
+            cFile = cWorkPath & "\" & "test_" & cFilter( iDocType ) & iDocument 
+            hFileSaveAsWithFilterKill( cFile, cFilter( iDocType ) )
+        next iDocument
+        hCloseDocument()
+    next iDocType
+            
+    gApplication = "WRITER"
+    hCreateDocument()
+    DocumentWriter.typeKeys( DOC_IDENTIFIER )
     
     '///+<li>Close the navigator if present</li>
     hCloseNavigator()
     '///</ul>
     
-    '///+<li>Store the number of open documents (should be exactly one now)</li>
-    iInitialDocumentCount = getDocumentCount ' must be exactly 1 at this point
-    if ( iInitialDocumentCount <> 1 ) then
-    	warnlog( "Expected exactly one writer document (The first doc!)" )
-    endif
-
     '///+<li>Open the filepicker (via menu or toolbar)</li>
     printlog( "FileOpen" )
     FileOpen
 
-    '///+<li>Go to the workdirectory (framework\filedlg\input\multiselect\)</li>
+    '///+<li>Go to the workdirectory</li>
     printlog( "Go to the workdirectory: " & cWorkPath )
     kontext "OeffnenDlg"
     DateiName.typeKeys( cWorkPath )
     while ( getDocumentCount < ( TESTFILE_COUNT + 1 ) ) 
     
     	iWait = iWait + 1
-    	sleep( 1 )
+    	sleep( 1 ) ' This is intentional, do not remove or replace
 
         if ( iWait = ( TESTFILE_COUNT + 1 ) ) then
         	warnlog( "The documents were not loaded within 60 seconds, abort" )
     '///+<li>Close all the files again</li>
     printlog( "Starting to close all documents" )
     for iCurrentFile = 1 to TESTFILE_COUNT
-        sleep( 1 )
+        WaitSlot() ' sleep( 1 )
         FileClose
     next iCurrentFile
     printlog( "Finished closing documents" )
     
     '///+<li>Verify that the correct document is open &quot;The first doc!&quot;</li>
     if ( getDocumentCount <> 1 ) then
-    	warnlog( "Only <The first doc!> should be open. This is not the case" )
+    	warnlog( "Only the identification document should be open." )
     	iOpenDocuments = getDocumentCount
     	for iCurrentFile = 1 to iOpenDocuments - 1
     		hDestroyDocument()
         next iCurrentFile
         call ExitRestartTheOffice()
     else
-        brc = hIdentifyWriterDoc( "The first doc!" , false )
+        brc = hIdentifyWriterDoc( DOC_IDENTIFIER , false )
         if ( not brc ) then
-        	warnlog( "Incorrect document order / <The first doc!> is missing" )
+            warnlog( "The identification document is missing" )
         else
             printlog( "Ok, test succeeded" )
+            hDestroyDocument()
         endif
     endif
     
+    ' remove workfiles again
+    for iDocType = 1 to 4
+        hNumericDocType( iDocType )
+        for iDocument = 1 to 15
+            cFile = cWorkPath & "\" & "test_" & cFilter( iDocType ) & iDocument 
+            hDeleteFile( cFile )
+        next iDocument
+    next iDocType
+    
+    rmdir( cWorkPath )
+    
+    
     hCloseNavigator()
     '///</ul>
 

File testautomation/framework/optional/includes/filedlg_rename.inc

 'encoding UTF-8  Do not remove or change this line!
 '*******************************************************************************
 '*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: filedlg_rename.inc,v $
- *
- * $Revision: 1.2 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'* 
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: filedlg_rename.inc,v $
+'*
+'* $Revision: 1.2.14.1 $
+'*
+'* This file is part of OpenOffice.org.
+'*
+'* OpenOffice.org is free software: you can redistribute it and/or modify
+'* it under the terms of the GNU Lesser General Public License version 3
+'* only, as published by the Free Software Foundation.
+'*
+'* OpenOffice.org is distributed in the hope that it will be useful,
+'* but WITHOUT ANY WARRANTY; without even the implied warranty of
+'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+'* GNU Lesser General Public License version 3 for more details
+'* (a copy is included in the LICENSE file that accompanied this code).
+'*
+'* You should have received a copy of the GNU Lesser General Public License
+'* version 3 along with OpenOffice.org.  If not, see
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
 '/******************************************************************************
 '*
 '*  owner : Joerg.Skottke@Sun.Com

File testautomation/framework/optional/includes/fontworkgallery.inc

         printlog "********** " + gApplication
         tFontworkGalleryUpdate
     next i
-    call hCloseDocument()
-    call hNewDocument()
 end sub
 
 testcase tFontworkGalleryUpdate
     else
         warnlog "Draw toolbar is not visible"
     endif
+    hCloseDocument()
 endcase
 

File testautomation/framework/optional/includes/help_bookmarks.inc

 
 testcase tHelpBookmarks
 
-    warnlog( "#i84486# crash when clicking on find-button in help browser" )
-    goto endsub
-
     '///<H1>Bookmarks in the help browser</H1>
     '///<h2>help_bookmarks.bas::tHelpBookmarks</h2>
     '///<ul>
     '///+<li>Close help</li>
     brc = hCloseHelp()
     
-    Kontext "DocumentWriter"
-    DocumentWriter.restore()
-
     '///</ul>
 
 endcase

File testautomation/framework/optional/includes/options_lan1.inc

    '///+wait until StarOffice is out of memory and restart it
    printlog "- exit/restart StarOffice"
    ExitRestartTheOffice
-
+   hNewDocument
    '///+open options 'Language settings' / 'languages'
    '///+check all changes
    printlog "- check changes"
    Kontext "ExtrasOptionenDlg"
    ExtrasOptionenDlg.OK()
    Sleep (3)
+   hclosedocument
 endcase
 
 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
    iLan = Language.GetItemCount
    if iLan > 4 then
       Warnlog "There are more than 4 languages in the list. The test break here, because it can't work with more than 4 entries. Bug?!?"
+      Kontext "ExtrasOptionenDlg"
+      ExtrasOptionenDlg.OK
+      hclosedocument
       goto endsub
    end if
 

File testautomation/framework/optional/includes/options_ls_2.inc

    Sleep (1)
    Speichern.Click
    Sleep (1)
+   kontext
+   'overwrite warning on rerun
+   if active.exists(3) then
+   active.yes
+   endif
 
  printlog "      activate all tabpages on properties dialog and cancel it"
 '///+=> now the properties dialog must be actived
    bSave = AutomatischSpeichern.IsChecked
 '///+check 'auto save' and set the time to 1 minute
   AutomatischSpeichern.Check
-   bPromptSave = MitRueckfrage.IsChecked
    sSaveTime = 15 'debug
 
    Minuten.SetText "2"
-   MitRueckfrage.Check
 
    '///+close options dialog with OK
    Kontext "ExtrasOptionenDlg"
    printlog "    - close the document and check the saved data"
    hCloseDocument ' closes the document with 'discard'
    '///+reopen the file and check if all paragraphs are inserted, t
-   hOpenFile ( sFilename )
-
+   hFileOpen ( sFilename )
+kontext
+if active.exists(5) then
+warnlog active.gettext
+goto endsub
+endif
    ' This part compares the content of the file after reload with text entered
    ' during the entire test. It should contain three lines of text.
    printlog( "   - Compare the content of the file with the text entered during the test." )
    ToolsOptions
    hToolsOptions ( "LoadSave", "General" )
    AutomatischSpeichern.Check
-   if bPromptSave = TRUE then MitRueckfrage.Check else MitRueckfrage.UnCheck
    Minuten.SetText sSaveTime
    if bSave = TRUE then AutomatischSpeichern.Check else AutomatischSpeichern.UnCheck
 '///+close options dialog with OK
 
 '///+save the HTML-doc at ../user/work/.. with another name
  printlog "      save the HTML file"
-   hSpeichernUnter ( sFilename2 )
+   hFileSaveAs ( sFilename2 )
 
 '///+check if the path for the graphic is 'not relativ' in the source code
  printlog "      check the hard coded path in source code of HTML file"

File testautomation/framework/optional/includes/options_ooo_security.inc

     '///<ul>    
     dim _file as string
     
-    hNewDocument()
     '///<li>check defaults</li>
-    _file = gTesttoolPath & "framework\options\input\ooo_security_defaults.ref"
+    if ( getDocumentCount() < 1 ) then call hNewDocument()
+    _file = gTesttoolPath & "framework\optional\input\options\ooo_security_defaults.ref"
     checkSecurityPage( _file )
 
     '///<li>change the settings</li>    
-    _file = gTesttoolPath & "framework\options\input\ooo_security_changed.ref"
+    if ( getDocumentCount() < 1 ) then call hNewDocument()
+    _file = gTesttoolPath & "framework\optional\input\options\ooo_security_changed.ref"
     changeSecurityPage( _file )
     
     '///<li>check the changes</li>
+    if ( getDocumentCount() < 1 ) then call hNewDocument()
     checkSecurityPage( _file )
     
     '///<li>revert to default settings</li>
-    _file = gTesttoolPath & "framework\options\input\ooo_security_defaults.ref"
+    if ( getDocumentCount() < 1 ) then call hNewDocument()
+    _file = gTesttoolPath & "framework\optional\input\options\ooo_security_defaults.ref"
     changeSecurityPage( _file )
     
     '///<li>check the changes</li>
+    if ( getDocumentCount() < 1 ) then call hNewDocument()
     checkSecurityPage( _file )
     
     '///</ul>
     else
         warnlog( "options dialog not available" 
     endif
+    if ( getDocumentCount() > 0 ) then call hCloseDocument()
+
 endcase
 
 '*******************************************************************************

File testautomation/framework/optional/includes/options_ooo_view.inc

    
    '///<li>Re-apply the defaults to all controls and restart the application</li>
    printlog "Re-apply the defaults to all controls and restart the application"
-   sFile = gTesttoolPath + "framework\options\input\ooo_view_defaults.ref" 
+   sFile = gTesttoolPath + "framework\optional\input\options\ooo_view_defaults.ref" 
    call changePage( sFile , false )
    
    '///<li>Verify that all settings have indeed been reset to defaults</li></ul>
    printlog "Verify that all settings have indeed been reset to defaults"
-   sFile = gTesttoolPath + "framework\optional\input\options\ooo_view_defaults.ref" 
    call checkPage( sFile , false )
    
 endcase

File testautomation/framework/optional/includes/options_so_4.inc

   Dim sSave as String
 
 '///StarOffice / View => 'Display : Look & Feel' and 'Scaling'
-