Commits

Anonymous committed fc85cce Merge

CWS-TOOLING: integrate CWS automationdev300m87

Comments (0)

Files changed (134)

testautomation/chart2/optional/includes/ch2_flexible_source_range_selection01.inc

 '
 function fOpenWriterTestDocumentAndInsertChart(sInputFile as STRING) as BOOLEAN
     fOpenWriterTestDocumentAndInsertChart = FALSE
-    call hFileOpen(sInputFile)
-    sleep(2)
-    Call sMakeReadOnlyDocumentEditable()
+    hFileOpenLocally(sInputFile)
     '///Menu Insert Object Chart to open chart wizard
     printlog "Menu Insert Object Chart to open chart wizard"
     InsertObjectChart

testautomation/chart2/tools/ch_tools_common.inc

 '
 function fOpenTestDocumentAndSelectDataRange(sInputFile as string) as BOOLEAN
     fOpenTestDocumentAndSelectDataRange = FALSE
-    call hFileOpen(sInputFile)
-    sleep(2)
-    Call sMakeReadOnlyDocumentEditable()
+    hFileOpenLocally(sInputFile)
     '/// Select chart using navigator
     printlog "Select chart using navigator"
     call fSelectFirstOLE
 '
 function fOpenTestDocumentAndInsertChart(sInputFile as string) as BOOLEAN
     fOpenTestDocumentAndInsertChart = FALSE
-    call hFileOpen(sInputFile)
-    sleep(2)
-    Call sMakeReadOnlyDocumentEditable()
+    hFileOpenLocally(sInputFile)
     Kontext "DocumentCalc"
     printlog "Type <STRG+HOME>"
     DocumentCalc.TypeKeys "<MOD1 HOME>"

testautomation/extensions/optional/input/dependencies/version34.oxt

Binary file modified.

testautomation/framework/optional/f_basic_gridcontrol.bas

     use "global\system\includes\gvariabl.inc"
 
     use "global\tools\includes\optional\t_treelist_tools.inc"
+    use "global\tools\includes\optional\t_macro_tools.inc"
     
     gApplication = "WRITER"
     call GetUseFiles()

testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc

 
     Dim i , j                 as Integer
 
-    testFile         = "sortTest.sxw"
+    testFile         = gTesttoolPath & "framework\optional\input\CJK\sortTest.sxw"
+    testFile         = convertpath( testFile )
     aCorrectSequence = Array( "1" , "2" , "3" , "4" ,"5" )
 
     j = UBound(aCorrectSequence)
 
     Call hNewDocument
     '/// Open a test file and check <i>No Grid</i> checkbox
-    Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
-    sMakeReadOnlyDocumentEditable
-    EditSelectAll
+    hFileOpenLocally( testfile )
+    hUseAsyncSlot( "EditSelectAll" )
 
     '/// Open <i>Tools/Sort</i>
     ToolsSort
     next i
 
     Call hCloseDocument
+    hFileDelete( gLastWorkFile )
 
 endcase
 
 
     Dim i , j                 as Integer
 
-    testFile         = "sortTest.sxw"
+    testFile         = gTesttoolPath & "framework\optional\input\CJK\sortTest.sxw"
+    testFile         = convertpath( testFile )
+
     aCorrectSequence = Array( "2" , "3" , "4" , "1" , "5"  )
 
     j = UBound(aCorrectSequence)
 
     Call hNewDocument
     '/// Open a test file and check <i>No Grid</i> checkbox
-    Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
-    sMakeReadOnlyDocumentEditable
-    EditSelectAll
+    hFileOpenLocally( testfile )
+    hUseAsyncSlot( "EditSelectAll" )
 
     '/// Open <i>Tools/Sort</i>
     ToolsSort
     next i
 
     Call hCloseDocument
+    hFileDelete( gLastWorkFile )
 
 endcase
 

testautomation/framework/optional/includes/basic_formcontrols.inc

         if ( hFindFirstDialog() ) then
             printlog( "First dialog found. Good." )
         else
-            warnlog( "Could not access dialog, aborting test" )
+            warnlog( "#i115117 - Could not access dialog, accelerator not working? (Test interrupted)" )
             hCloseBasicIde()
             hDestroyDocument()
             goto endsub

testautomation/framework/optional/includes/basic_gridcontrol.inc

 
 testcase tGridcontrolLoad
 
-    const MACRO_NAME = "VclTestTool"
-    const MACRO_NOT_FOUND = 0
+    const MACRO_NAME = "Show"
     const FILE_NAME  = "framework/optional/input/gridcontrol.odt"
 
-    dim iPos as integer
-    
+    dim i as integer
+    dim a as integer
+
     printlog( "Open the test document: " & FILE_NAME )
-    call hFileOpen( gTestToolPath & FILE_NAME )
-
-    printlog( "Open the <Run Macro> dialog" )
-    ToolsMacrosRunMacro
-
-    printlog( "Find the document, its library and the test macro, run the macro" )
-    Kontext "ScriptSelector"
-    if ( ScriptSelector.exists( 10 ) ) then
+    call hFileOpenLocally( gTestToolPath & FILE_NAME )
 
     printlog "Start the macro, that performs the test"
-    Kontext "GridControlDialogStarter"
- ' FAILS IF DOCUMENT IS READONLY....
-    ShowGridcontrol.typeKeys "<space>"
+    hExecMacro( MACRO_NAME )
+    
     Kontext "GridControlDialog"
     if GridControlDialog.exists(5) then
         for i=1 to gridcontrolcontrol.getcolumncount
-        for a=1 to gridcontrolcontrol.getrowcount
-            printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'"
-        next a
+            for a=1 to gridcontrolcontrol.getrowcount
+                printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'"
+            next a
         next i
         gridcontrolcontrol.select 5
 
             warnlog "No selection Event by .select"
         endif
 
-    Kontext "GridControlDialog"
+        Kontext "GridControlDialog"
         gridcontrolcontrol.typeKeys("<down>")
 
         kontext
         if active.exists(5) then
-        printlog active.gettext
-        active.ok
+            printlog active.gettext
+            active.ok
         else
-        warnlog "No selection event by .typeKeys <down>"
+            warnlog "No selection event by .typeKeys <down>"
         endif
-    Kontext "GridControlDialog"
+        Kontext "GridControlDialog"
         gridcontrolcontrol.typeKeys("<up>")
         kontext
         if active.exists(5) then
-        printlog active.gettext
-        active.ok
+            printlog active.gettext
+            active.ok
         else
-        warnlog "No selection event by .typeKeys <up>"
+            warnlog "No selection event by .typeKeys <up>"
         endif
 
-    Kontext "GridControlDialog"
+        Kontext "GridControlDialog"
         GridControlDialog.close
     else
         warnlog "Gridcontrol Dialog did not come up after pressing button"
     endif
-    
+
     printlog( "Test exit, cleanup" )
     hFileCloseAll()
-    
+    hDeleteFile( gLastWorkFile )
+
 endcase
 
 

testautomation/framework/optional/includes/basic_package_import.inc

     next iCurrentLib
     cLibraryName = BibliotheksListe.getSelText()
 
-    if ( not hClickButton( Hinzufuegen ) ) then
-        warnlog( "#i64007 - Office crashes on clicking import button" )
-    endif
+    hClickButton( Hinzufuegen )
     
     kontext "OeffnenDlg"
     hCloseDialog( OeffnenDlg, "cancel" )

testautomation/framework/optional/includes/basic_shared_modules.inc

     dim iObjectPosition as integer
     dim iLibraryCount as integer
 
-    const EXPECTED_LIBRARY_COUNT     = 13 ' prebundled extensions add a library
+    const EXPECTED_LIBRARY_COUNT     = 14 ' prebundled extensions add a library
     const EXPECTED_LIBRARY_COUNT_OOO = 12
     
     hInitSingleDoc()

testautomation/framework/optional/includes/basic_vba-compat_application-union.inc

         macro_identifier( 5 ) = "5: False"
         macro_identifier( 6 ) = "6: True"
     else
-        macro_identifier( 1 ) = "1: True"
-        macro_identifier( 2 ) = "2: True"
+        macro_identifier( 1 ) = "1: False"
+        macro_identifier( 2 ) = "2: False"
         macro_identifier( 3 ) = "3: True"
-        macro_identifier( 4 ) = "4: True"
-        macro_identifier( 5 ) = "5: True"
+        macro_identifier( 1 ) = "4: False"
+        macro_identifier( 2 ) = "5: False"
         macro_identifier( 6 ) = "6: True"
     endif
 

testautomation/framework/optional/includes/extras_modify_objects.inc

 
 testcase tModifyObjects( iMode as integer, cCategory as string, sVer as string )
 
+    ' This test loads/saves and reloads every template or sample shipped with
+    ' the product. One of the special challenges of the test is to find out
+    ' which document type a sample/template belongs to as well as to handle
+    ' any possible dialogs the samples/documents may trigger.
+
+    ' iMode = 1 means to open the document (0 = just get its name)
+    ' cCategory may be "SAMPLES" or "TEMPLATES"
+    ' sVER is the fileformat for saving files, typically this is "current"
+
     const CFN = "tModifyObjects::"
-    const RESTART = 15
-    const TEMPLATE_COUNT = 236 ' For en-US/Oracle Open Office, numbers may differ for Languages/Brands
+
+    const TEMPLATE_COUNT = 237 ' For en-US/Oracle Open Office, numbers may differ for Languages/Brands
     const SAMPLE_COUNT = 56    ' For en-US/Oracle Open Office, numbers may differ for Languages/Brands
 
-
+    ' Varaibles needed to navigate on the Templates And Samples dialog
     dim iObjectFolder as integer
     dim iObjectFolders as integer
-   
+
+    ' Iterators and number of documents, test values
     dim iObject as integer    ' Iterator
     dim iObjectCount( 20 ) as integer
     dim iObjectSum as integer : iObjectSum = 0
     dim iObjectCountExpected as integer
-   
+
+    ' Where to store the files
     dim sFile as string
-    dim sPath as string
-        sPath = hGetWorkPath()  
+    dim sPath as string : sPath = hGetWorkPath()
 
+    ' Reset counter, if the office becomes unstable you might want to use it.
+    ' See further below on how to enable this feature
     dim iReset as integer : iReset = 0
 
     printlog( "" )
-    
-    select case( lcase( cCategory ))
+
+    ' Find out if we are testing samples or templates, fix the number of items
+    ' allowed for each category
+    select case( lcase( cCategory ) )
     case "templates" : iObjectCountExpected = TEMPLATE_COUNT
     case "samples"   : iObjectCountExpected = SAMPLE_COUNT
     end select
     printlog( "Open Templates and Samples dialog" )
     FileNewFromTemplate
     WaitSlot( 2000 )
+
+    ' This is the icon on the left pane
     hSelectCategory( cCategory )
+
+    ' The number of folders for the category on the middle pane
     iObjectFolders = FileList.getItemCount()
    
     printlog( "Count the items in the templates and samples dialog" )
     endif
    
     Kontext "TemplateAndDocuments"
-    printlog( "Switch from preview to document info" )
+    printlog( "Switch from preview to document info, required to limit load-times" )
+    ' Another good test case would be to enable the preview.
     docinfo.click()
     hCloseDialog( TemplateAndDocuments, "cancel" )
    
     printlog( "" )
     printlog( "Starting to load/save/close/reload/close all Objects" )
     printlog( "" )
-   
+
+    ' Iterate over the folders in the middle pane of the templates and samples
+    ' dialog, open the folders and load the containing files
+    ' If you want to debug the office using this test, get the Object indices
+    ' from the logfiles and change the loops to only load the file in question
+
+    ' These are the folders
     for iObjectFolder = 1 to iObjectFolders
-   
-        for iObject = 1 to iObjectCount( iObjectFolder ) 
-      
+    ' for iObjectFolder = MyFailedFolder to MyFailedFolder
+
+        ' These are the individual files
+        for iObject = 1 to iObjectCount( iObjectFolder )
+        ' for iObject = MyFailedFile to MyFailedFile
+
+            ' Preset gApplication to "Writer", this is the basis
             gApplication = "WRITER"    
             
             printlog( "" )
             printlog( "Folder index = " & iObjectFolder & ", Object index = " & iObject )
-            
+
+            printlog( "Close all files" )
             hFileCloseAll()
 
             ' every now and then the office becomes a little unstable.
             '    iReset = 0
             'endif
           
-            printlog( "Select the item we want to load" )
+            printlog( "Open <FileNewFromTemplate>" )
             FileNewFromTemplate
             WaitSlot( 2000 )
+
+            printlog( "Select category: " & cCategory )
             hSelectCategory( cCategory )
+
+            printlog( "Select a folder, do not print debug info" )
             hSelectFileFolder( iObjectFolder , false )
+
+            printlog( "Select a document by index, iMode = 1 -> Open it" )
             hSelectDocumentObject( iObject , iMode )
             
-            ' treat it like a folder. If it is, skip it. Otherwise perform the test
+            ' In few cases we accidentially work on a folder. So we test for the
+            ' Templates and Samples dialog again, if it is closed we have a
+            ' regular document, otherwise we have a folder which we then skip.
             kontext "TemplateAndDocuments"
             if ( TemplateAndDocuments.exists() ) then
                 if ( not edit.isEnabled() ) then
             else
                 printlog( "Loading file..." )
                 printlog( "Check for Filter Options dialog" )
+
+                ' Yes, hFileWait() knows which dialog is in the way so we can ask it
+                ' directly. The ASCII filter dialog has the number -6
                 if ( hFileWait( false ) = -6 ) then 
                     warnlog( "Load failure: ASCII filter dialog displayed, recovering" )
                     kontext "FilterAuswahl"
                 else
                     printlog( "Build filename; save, reload and delete" )
                     sFile = sPath & cCategory & iObjectFolder & "_" & iObject
+                    printlog( "File is: " & sFile )
+
                     kontext "Navigator"
+                    printlog( "Close Navigator (if present)" )
                     hCloseDialog( Navigator, "close,optional" )
+
+                    printlog( "Save file" )
                     hFileSaveAsKill( sFile )
+
+                    printlog( "Close file" )
                     hDestroyDocument()
+
+                    printlog( "Open file" )
                     hFileOpen( sFile )
+
+                    printlog( "Handle possible dialogs" )
                     hHandleActivesOnLoad( 1 , 2 )
+
                     kontext "Navigator"
+                    printlog( "Close Navigator (if present)" )
                     hCloseDialog( Navigator, "close,optional" )
+
+                    printlog( "Close document" )
                     hDestroyDocument()
+
+                    printlog( "Delete work document" )
                     hDeleteFile( sFile )
-                    printlog( "Test cycle done, going for next object." )
                 endif
             endif
-            
+
             iReset = iReset + 1
       
         next iObject
       
     next iObjectFolder
-    
-    hDestroyDocument()
+
+    printlog( "Close last remaining document(s) and exit test" )
+    hFileCloseAll()
    
 endcase   
    

testautomation/framework/optional/includes/options_loadsave_general.inc

             printlog( "    -  " & DokumentTyp.getSelText)
         next i
     endif
+    
     for i=1 to AppCount
         Dokumenttyp.Select(i)
         lsSave(2+i)          = Dokumenttyp.GetSelText
     next i
 
     printlog " - invert/change settings"
-    if lbSave(13) then BenutzerspezifischeEinstellungen.UnCheck else BenutzerspezifischeEinstellungen.Check
-    if lbSave(1) then DokumenteigenschaftenBearbeiten.Uncheck else DokumenteigenschaftenBearbeiten.Check
-    if lbSave(2) then Sicherungskopie.Uncheck else Sicherungskopie.Check
-    if lbSave(3) then AutomatischSpeichern.Uncheck else AutomatischSpeichern.Check
+    if lbSave(13) then
+        BenutzerspezifischeEinstellungen.UnCheck
+    else
+        BenutzerspezifischeEinstellungen.Check
+    endif
+
+    if lbSave(1) then
+        DokumenteigenschaftenBearbeiten.Uncheck
+    else
+        DokumenteigenschaftenBearbeiten.Check
+    endif
+
+    if lbSave(2) then
+        Sicherungskopie.Uncheck
+    else
+        Sicherungskopie.Check
+    endif
+
+    if lbSave(3) then
+        AutomatischSpeichern.Uncheck
+    else
+        AutomatischSpeichern.Check
+    endif
+
     if AutomatischSpeichern.IsChecked then
         lsSave(1) = Minuten.GetText
         Minuten.SetText "23"
     endif
-    if lbSave(10) then NoPrettyPrinting.Uncheck else NoPrettyPrinting.Check
-    if lbSave(11) then URLimDateisystem.Uncheck else URLimDateisystem.Check
-    if lbSave(12) then URLimInternet.Uncheck else URLimInternet.Check
+
+    if lbSave(10) then
+        NoPrettyPrinting.Uncheck
+    else
+        NoPrettyPrinting.Check
+    endif
+
+    if lbSave(11) then
+        URLimDateisystem.Uncheck
+    else
+        URLimDateisystem.Check
+    endif
+
+    if lbSave(12) then
+        URLimInternet.Uncheck
+    else
+        URLimInternet.Check
+    endif
+
     printlog( "Setting filters for documenttypes: Select third item from every list" )
+
     for i=1 to AppCount
         Dokumenttyp.Select(i)
         Filter.Select(3)
 
     printlog " - close options-dlg with OK"
     kontext "ExtrasOptionenDlg"
-    ExtrasOptionenDlg.OK
-    sleep(3)
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
 
     printlog " - exit/restart StarOffice"
     ExitRestartTheOffice
     if BenutzerspezifischeEinstellungen.IsChecked = lbSave ( 13 ) then
         Warnlog "'Load user setting with document' => changes not saved"
     endif
+
     if DokumenteigenschaftenBearbeiten.IsChecked = lbSave ( 1 ) then
         Warnlog "'Edit document properties before saving' => changes not saved"
     endif
+
     if Sicherungskopie.IsChecked = lbSave ( 2 ) then
         Warnlog "'Create backup copy' => changes not saved"
     endif
+
     if AutomatischSpeichern.IsChecked = lbSave ( 3 ) then
         printlog "AutoSave => changes not saved"
     endif
+
     if AutomatischSpeichern.IsChecked then
         if Minuten.GetText <> "23" then
             Warnlog "Minutes for AutoSave => changes not saved"
     if NoPrettyPrinting.IsChecked = lbSave ( 10 ) then
         Warnlog "no pretty printing => changes not saved"
     endif
+
     if URLimDateisystem.IsChecked = lbSave ( 11 ) then
         Warnlog "URL: File system => changes not saved"
     endif
+
     if URLimInternet.IsChecked = lbSave ( 12 ) then
         Warnlog "URL: Internet => changes not saved"
     endif
-    
+
     printlog( "Verifying filters for documenttypes: Select third item from every list" )
     for i=1 to AppCount
         Dokumenttyp.Select(i)
-      	printlog( "Doctype: " & Dokumenttyp.getSelText() & " has filter: " & Filter.getSelText() )
-        
+        printlog( "Doctype: " & Dokumenttyp.getSelText() & " has filter: " & Filter.getSelText() )
+
         if Filter.GetSelIndex <> 3 then
             warnlog( "#i79150# some options in Tools/Options->Load/Save->General are not saved" )
         endif
     NoPrettyPrinting.Uncheck
     URLimDateisystem.Uncheck
     URLimInternet.Uncheck
+
     for i=1 to AppCount
         Dokumenttyp.Select(i)
         Filter.Select(4)
     printlog " - close options-dlg with OK"
 
     kontext "extrasoptionendlg"
-    ExtrasOptionenDlg.OK
-    Sleep (1)
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
 
     printlog "    - react on messageboxes for loosing settings after changing default-filters"
     kontext "FilterWarning"
             i = AppCount + 1
         endif
     next i
-    Sleep (3)
+    WaitSlot()
 
     printlog " - check second changes"
     ToolsOptions
     if BenutzerspezifischeEinstellungen.IsChecked <> FALSE then
         Warnlog "'Load user setting with document' => changes not saved"
     endif
+
     if DokumenteigenschaftenBearbeiten.IsChecked <> TRUE then
         Warnlog "'Edit document properties before saving' => changes not saved"
     endif
+
     if Sicherungskopie.IsChecked <> FALSE then
         Warnlog "'Create backup copy' => changes not saved"
     endif
+
     if AutomatischSpeichern.IsChecked <> TRUE then
         Warnlog "AutoSave => changes not saved"
     endif
+
     if Minuten.GetText <> "1" then
         Warnlog "Minutes for AutoSave => changes not saved"
     endif
+
     if NoPrettyPrinting.IsChecked <> FALSE then
         Warnlog "no pretty printing => changes not saved"
     endif
+
     if URLimDateisystem.IsChecked <> FALSE then
         Warnlog "URL: File system => changes not saved"
     endif
+
     if URLimInternet.IsChecked <> FALSE  then
         Warnlog "URL: Internet => changes not saved"
     endif
+
     for i=1 to AppCount
         Dokumenttyp.Select(i)
         if Filter.GetSelIndex <> 4 then
     if lbSave ( 13 ) = FALSE then
         BenutzerspezifischeEinstellungen.UnCheck else BenutzerspezifischeEinstellungen.Check
     endif
+
     if lbSave ( 1  ) = FALSE then
         DokumenteigenschaftenBearbeiten.UnCheck else DokumenteigenschaftenBearbeiten.Check
     endif
     if lbSave ( 2  ) = FALSE then
         Sicherungskopie.Uncheck else Sicherungskopie.Check
     endif
+
     AutomatischSpeichern.Check
     Minuten.SetText lsSave ( 1 )
+
     if lbSave ( 3  ) = FALSE then
         AutomatischSpeichern.Uncheck else AutomatischSpeichern.Check
     endif
+
     if lbSave ( 10 ) = FALSE then
         NoPrettyPrinting.Uncheck else NoPrettyPrinting.Check
     endif
+
     if lbSave ( 11 ) = FALSE then
         URLimDateisystem.UnCheck else URLimDateisystem.Check
     endif
+
     if lbSave ( 12 ) = FALSE then
         URLimInternet.UnCheck else URLimInternet.Check
     endif
+
     for i=1 to AppCount
         Dokumenttyp.Select(i)
         if Dokumenttyp.GetSelText <> lsSave ( 2 + i ) then
     next i
 
     kontext "ExtrasOptionenDlg"
-    ExtrasOptionenDlg.OK
-    Sleep (3)
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
+
 
     printlog " - check settings"
     ToolsOptions
     if BenutzerspezifischeEinstellungen.IsChecked <> lbSave ( 13 ) then
         Warnlog "'Load user setting with document' => changes not saved"
     endif
+
     if DokumenteigenschaftenBearbeiten.IsChecked <> lbSave ( 1 ) then
         Warnlog "'Edit document properties before saving' => changes not saved"
     endif
+
     if Sicherungskopie.IsChecked <> lbSave ( 2 ) then
         Warnlog "'Create backup copy' => changes not saved"
     endif
+
     if AutomatischSpeichern.IsChecked <> lbSave ( 3 ) then
         Warnlog "AutoSave => changes not saved"
     endif
+
     if AutomatischSpeichern.IsChecked then
         if Minuten.GetText <> lsSave( 1 ) then
             Warnlog "Minutes for AutoSave => changes not saved"
         endif
     endif
+
     if NoPrettyPrinting.IsChecked <> lbSave ( 10 ) then
         Warnlog "no pretty printing => changes not saved"
     endif
+
     if URLimDateisystem.IsChecked <> lbSave ( 11 ) then
         Warnlog "URL: File system => changes not saved"
     endif
+
     if URLimInternet.IsChecked <> lbSave ( 12 ) then
         Warnlog "URL: Internet => changes not saved"
     endif
+
     for i=1 to AppCount
         Dokumenttyp.Select(i)
         if Dokumenttyp.GetSelText <> lsSave ( 2 + i ) then
     next i
 
     kontext "extrasoptionendlg"
-    ExtrasOptionenDlg.OK
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
+
 endcase

testautomation/framework/optional/includes/options_ooo_colors.inc

     dim currentColor(4) as String
     dim chColor(4)      as String
     
-    const DEFAULT_COLOR_COUNT = 103
-    const CHANGED_COLOR_COUNT = 104
+    const DEFAULT_COLOR_COUNT = 99
+    const CHANGED_COLOR_COUNT = 100
     const USER_COLOR = "TT-Test-Color"
     
     myColor(1) = USER_COLOR
 
         printlog( "Close the Tools/Options dialog with OK" )
         Kontext "ExtrasOptionenDlg"
-        ExtrasOptionenDlg.OK
-        WaitSlot( 2000 )
+        hCloseDialog( ExtrasOptionenDlg, "ok" )
     else
         warnlog( "Tools/Options dialog not open" )
     endif
         
         printlog( "Close options dialog with OK" )
         Kontext "ExtrasOptionenDlg"
-        ExtrasOptionenDlg.OK
-        WaitSlot( 2000 )
-        
+        hCloseDialog( ExtrasOptionenDlg, "ok" )
     else
         warnlog( "Tools/Options dialog not open" )
     endif
 
         printlog( "Close options dialog with OK" )
         Kontext "ExtrasOptionenDlg"
-        ExtrasOptionenDlg.OK
-        WaitSlot( 2000 )
-        
+        hCloseDialog( ExtrasOptionenDlg, "ok" )
     else
         warnlog( "Tools/Options dialog not open" )
     endif

testautomation/framework/optional/includes/options_ooo_general.inc

 
 testcase tOOoGeneral
 
-   dim lsSave (4) as String
-   dim lbSave (3) as Boolean
+    dim lsSave (4) as String
+    dim lbSave (3) as Boolean
 
-   hNewDocument
+    hNewDocument
 
-   ToolsOptions
-   hToolsOptions ( "StarOffice", "General" )
+    ToolsOptions
+    hToolsOptions ( "StarOffice", "General" )
 
-   printlog " - save old data"
-   lsSave ( 1 ) = Zweistellig.GetText
-   lbSave ( 1 ) = Aktivieren.IsChecked
-   Aktivieren.Check
-   if gPlatgroup = "w95" then
-      lbSave (2) = StarOfficeDialogeBenutzen.IsChecked
-   end if
-   lbSave ( 3 ) = DruckenStatus.IsChecked
-   lsSave ( 3 ) = StyleSheet.GetSelText
+    printlog " - save old data"
+    lsSave ( 1 ) = Zweistellig.GetText
+    lbSave ( 1 ) = Aktivieren.IsChecked
+    Aktivieren.Check
 
-   printlog " - invert/change data"
-   Zweistellig.SetText "1950"
-   Zuruecksetzen.Click
-   if gPlatgroup = "w95" then
-      if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Uncheck else StarOfficeDialogeBenutzen.Check
-   end if
-   If lbSave ( 3 ) = TRUE then DruckenStatus.Uncheck else DruckenStatus.Check
-   StyleSheet.Select 3
+    if gPlatgroup = "w95" then
+        lbSave (2) = StarOfficeDialogeBenutzen.IsChecked
+    endif
 
-   Kontext "ExtrasOptionenDlg"
+    lbSave ( 3 ) = DruckenStatus.IsChecked
+    lsSave ( 3 ) = StyleSheet.GetSelText
 
-   hCloseDialog( ExtrasOptionenDlg, "ok" )
-   hCloseDocument
+    printlog " - invert/change data"
+    Zweistellig.SetText "1950"
+    Zuruecksetzen.Click
 
-   printlog " - exit/restart StarOffice"
-   ExitRestartTheOffice
+    if gPlatgroup = "w95" then
+        if lbSave (2) then
+            StarOfficeDialogeBenutzen.Uncheck
+        else
+            StarOfficeDialogeBenutzen.Check
+        endif
+    endif
 
-   printlog " - check data"
-   ToolsOptions
-   hToolsOptions ( "StarOffice", "General" )
+    If lbSave ( 3 ) then
+        DruckenStatus.Uncheck
+    else
+        DruckenStatus.Check
+    endif
+    
+    StyleSheet.Select 3
 
-   if Zweistellig.GetText <> "1950" then Warnlog "Year ( 2 digits ) => changes not saved: '" + Zweistellig.GetText +"' #i29810"
-   if Aktivieren.IsChecked <> TRUE then Warnlog "Enable HelpAgent => changes not saved"
-   Zuruecksetzen.Click
-   if gPlatgroup = "w95" then
-      if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
-   end if
-   If DruckenStatus.IsChecked = lbSave ( 3 ) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
+    Kontext "ExtrasOptionenDlg"
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
+    hCloseDocument
 
-   printlog " - 2. change data"
-   Zweistellig.SetText "1800"
-   DruckenStatus.UnCheck
+    printlog " - exit/restart StarOffice"
+    ExitRestartTheOffice
 
-   Kontext "ExtrasOptionenDlg"
-   hCloseDialog( ExtrasOptionenDlg, "ok" )
+    printlog " - check data"
+    ToolsOptions
+    hToolsOptions ( "StarOffice", "General" )
 
-   printlog " - check data"
-   ToolsOptions
-   hToolsOptions ( "StarOffice", "General" )
+    if Zweistellig.GetText <> "1950" then
+        Warnlog "#i29810# - Year ( 2 digits ) => changes not saved: " + Zweistellig.GetText
+    endif
 
-   if Zweistellig.GetText <> "1800" then Warnlog "Year ( 2 digits ) => changes not saved : '" + Zweistellig.GetText +"'"
-   If DruckenStatus.IsChecked <> FALSE then Warnlog "Printing sets 'Document modified' status => changes not saved!"
-   if StyleSheet.GetSelIndex <> 3 then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+    if not Aktivieren.IsChecked then
+        Warnlog "Enable HelpAgent => changes not saved"
+    endif
 
-   printlog " - reset to saved data"
-   Zweistellig.SetText lsSave ( 1 )
-   Aktivieren.Check
-   Zuruecksetzen.Click
-   if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
-   if gPlatgroup = "w95" then
-      if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
-   end if
-   If lbSave(3)= TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
-   StyleSheet.Select lsSave(3)
+    Zuruecksetzen.Click
 
-   Kontext "ExtrasOptionenDlg"
-   hCloseDialog( ExtrasOptionenDlg, "ok" )
+    if gPlatgroup = "w95" then
+        if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then
+            Warnlog "Use StarOffice dialogs => changes not saved!"
+        endif
+    endif
 
-   ToolsOptions
-   hToolsOptions ( "StarOffice", "General" )
+    If DruckenStatus.IsChecked = lbSave ( 3 ) then
+        Warnlog "Printing sets 'Document modified' status => changes not saved!"
+    endif
 
-   printlog " - check the reset data"
-   if Zweistellig.GetText <> lsSave ( 1 ) then Warnlog "Year ( 2 digits ) => changes not saved"
-   if Aktivieren.IsChecked <> lbSave (1) then Warnlog "Enable HelpAgent => changes not saved"
-   Aktivieren.Check
-   Zuruecksetzen.Click
-   if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
-   if gPlatgroup = "w95" then
-      if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
-   end if
-   If DruckenStatus.IsChecked <> lbSave(3) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
-   if StyleSheet.GetSelText <> lsSave (3) then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+    printlog " - 2. change data"
+    Zweistellig.SetText "1800"
+    DruckenStatus.UnCheck
 
-   Kontext "ExtrasOptionenDlg"
-   hCloseDialog( ExtrasOptionenDlg, "ok" )
+    Kontext "ExtrasOptionenDlg"
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
+
+    printlog " - check data"
+    ToolsOptions
+    hToolsOptions ( "StarOffice", "General" )
+
+    if ( Zweistellig.GetText <> "1800" ) then
+        Warnlog( "#i29810# - Year ( 2 digits ) => changes not saved : " & Zweistellig.GetText() )
+    endif
+
+    If DruckenStatus.IsChecked  then
+        Warnlog "Printing sets 'Document modified' status => changes not saved!"
+    endif
+
+    if StyleSheet.GetSelIndex <> 3 then
+        Warnlog "Style sheet for StarOffice Help => changes not saved!"
+    endif
+
+    printlog " - reset to saved data"
+    Zweistellig.SetText lsSave ( 1 )
+    Aktivieren.Check
+    Zuruecksetzen.Click
+
+    if lbSave (1) then
+        Aktivieren.Check
+    else
+        Aktivieren.Uncheck
+    endif
+
+    if gPlatgroup = "w95" then
+        if lbSave (2) then
+            StarOfficeDialogeBenutzen.Check
+        else
+            StarOfficeDialogeBenutzen.UnCheck
+        endif
+    endif
+
+    If lbSave(3) then
+        DruckenStatus.Check
+    else
+        DruckenStatus.UnCheck
+    endif
+
+    StyleSheet.Select lsSave(3)
+
+    Kontext "ExtrasOptionenDlg"
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
+
+    ToolsOptions
+    hToolsOptions ( "StarOffice", "General" )
+
+    printlog " - check the reset data"
+    if Zweistellig.GetText <> lsSave ( 1 ) then
+        Warnlog "Year ( 2 digits ) => changes not saved"
+    endif
+
+    if Aktivieren.IsChecked <> lbSave (1) then
+        Warnlog "Enable HelpAgent => changes not saved"
+    endif
+
+    Aktivieren.Check
+    Zuruecksetzen.Click
+
+    if lbSave (1) then
+        Aktivieren.Check else Aktivieren.Uncheck
+    endif
+
+    if gPlatgroup = "w95" then
+        if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then
+            Warnlog "Use StarOffice dialogs => changes not saved!"
+        endif
+    endif
+
+    If DruckenStatus.IsChecked <> lbSave(3) then
+        Warnlog "Printing sets 'Document modified' status => changes not saved!"
+    endif
+
+    if StyleSheet.GetSelText <> lsSave (3) then
+        Warnlog "Style sheet for StarOffice Help => changes not saved!"
+    endif
+
+    Kontext "ExtrasOptionenDlg"
+    hCloseDialog( ExtrasOptionenDlg, "ok" )
 
 endcase
 

testautomation/framework/optional/includes/security_incorrect_password.inc

         printlog( "Check the password checkbox" )
         Passwort.check()
 
-        printlog( "Name the file as " & workpath & WORKFILE )
-        Dateiname.settext( workpath & WORKFILE )
+        printlog( "Name the file as " & filepath )
+        Dateiname.settext( filepath )
 
         if ( filetypeID <> "current" ) then
             for iCurrentFilter = 1 to DateiTyp.getItemCount()
         endif
 
         printlog( "Load the file again" )
-        hFileOpen( workpath & WORKFILE & suffix )
+        hFileOpen( filepath )
         if ( not hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false ) ) then
             warnlog( "Something went wrong while using the password dialog" )
         endif
         endif
 
         printlog( "Delete the workfile" )
-        hDeleteFile( workpath & WORKFILE & suffix )
+        hDeleteFile( filepath )
     else
         warnlog( "Unable to open file save dialog" )
     endif

testautomation/framework/optional/includes/w_grid_layout1.inc

     Call hNewDocument
 
     '/// open a test file , and check No Grid checkbox
-    Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
-    sMakeReadOnlyDocumentEditable
+    Call hFileOpenLocally( gTesttoolPath + SOURCE_PATH + testFile )
 
     hUseAsyncSlot( "FormatPageWriter" )
     Kontext
 
     '/// open a test file and check Grid(lines onle) checkbox ,
     '/// + set 10 line/page
-    Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
-    sMakeReadOnlyDocumentEditable
+    Call hFileOpenLocally( gTesttoolPath + SOURCE_PATH + testFile )
     hUseAsyncSlot( "FormatPageWriter" )
     Kontext
     if active.exists(5) then
 
     '/// open a test file and check Grid(lines and characters) checkbox
     '/// + set 10 line/page and 9 characters/line
-    Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
-    sMakeReadOnlyDocumentEditable
+    Call hFileOpenLocally( gTesttoolPath + SOURCE_PATH + testFile )
     hUseAsyncSlot( "FormatPageWriter" )
     Kontext
     if active.exists(5) then
     sLinesPerPage  = "2"
     sCharsPerLine  = "9"
 
-    Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
-    sMakeReadOnlyDocumentEditable
+    Call hFileOpenLocally( gTesttoolPath + SOURCE_PATH + testFile )
     Kontext "DocumentWriter"
     Call DocumentWriter.TypeKeys  "<Shift Right>"
 
     Call hNewDocument
 
     printlog( "Open test file" )
-    Call hFileOpen ( gTesttoolPath + SOURCE_PATH + TEST_FILE )
-
-    printlog( "Remove write protection of document (if set)" )
-    Call sMakeReadOnlyDocumentEditable()
+    hFileOpenLocally( gTesttoolPath + SOURCE_PATH + TEST_FILE )
 
     Kontext "DocumentWriter"
     printlog( "Mark character to the right of current cursor position" )
     Call hNewDocument
 
     '/// open a test file , and press TAB in second line
-    Call hFileOpen ( gTesttoolPath + SOURCE_PATH + TEST_FILE )
-
-    sMakeReadOnlyDocumentEditable
+    hFileOpenLocally( gTesttoolPath + SOURCE_PATH + TEST_FILE )
 
     Kontext "DocumentWriter"
     Call DocumentWriter.TypeKeys  "<Down>"

testautomation/framework/optional/input/filternames/OpenOffice.org_Filternames_en-US.txt

 StarCalc 3.0 - 5.0 Templates (*.vor)
 StarCalc 1.0 (*.sdc)
 SYLK (*.slk)
-Text CSV (*.csv;*.txt;*.xls)
+Text CSV (*.csv;*.txt)
 HTML Document (OpenOffice.org Calc) (*.html;*.htm)
 Microsoft Excel 2007 Binary (*.xlsb)
 Microsoft Excel 2007 XML (*.xlsm;*.xlsx)

testautomation/framework/optional/input/filternames/Oracle_Open_Office_Filternames_add_en-US.txt

 StarCalc 3.0 - 5.0 Templates (*.vor)
 StarCalc 1.0 (*.sdc)
 SYLK (*.slk)
-Text CSV (*.csv;*.txt;*.xls)
+Text CSV (*.csv;*.txt)
 HTML Document (StarOffice Calc) (*.html;*.htm)
 Microsoft Excel 2007 Binary (*.xlsb)
 Microsoft Excel 2007 XML (*.xlsm;*.xlsx)

testautomation/framework/optional/input/filternames/Oracle_Open_Office_Filternames_en-US.txt

 StarCalc 3.0 - 5.0 Templates (*.vor)
 StarCalc 1.0 (*.sdc)
 SYLK (*.slk)
-Text CSV (*.csv;*.txt;*.xls)
+Text CSV (*.csv;*.txt)
 HTML Document (StarOffice Calc) (*.html;*.htm)
 Microsoft Excel 2007 Binary (*.xlsb)
 Microsoft Excel 2007 XML (*.xlsm;*.xlsx)