Commits

Anonymous committed 1b99f06

#i113467# migrated fixes from OOO330 cws

Comments (0)

Files changed (5)

testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc

 '-------------------------------------------------------------------------
 testcase tMozilla
 
-    if ( fCreateMozillaAddressbookDatasource(gOfficePath + "user/work/tt_mozilla.odb") = true) then
-        if ( fOpendatabase(gOfficePath + "user/work/tt_mozilla.odb") = true) then        
-            Kontext "ContainerView"
-                ViewTables
+    if(gPlatform = "osx") then
+        qaerrorlog "Mozilla address book not supported under Mac."
+    else
+        if ( fCreateMozillaAddressbookDatasource(gOfficePath + "user/work/tt_mozilla.odb") = true) then
+            if ( fOpendatabase(gOfficePath + "user/work/tt_mozilla.odb") = true) then
+                Kontext "ContainerView"
+                    ViewTables
+            else
+                warnlog "mozilla database could not be open."
+
+            endif
         else
-            warnlog "mozilla database could not be open."
-
+            qaerrorlog "mozilla database could not be created. Maybe you have no mozilla installed."
+            Kontext "MessageBox"
+                    if (MessageBox.exists(1)) then
+                            MessageBox.OK
+                    endif
         endif
-    else
-        qaerrorlog "mozilla database could not be created. Maybe you have no mozilla installed."
-    	Kontext "MessageBox"
-    		if (MessageBox.exists(1)) then
-    			MessageBox.OK
-    		endif
+            ' try to close the database
+        call fCloseDatabase(false)
     endif
-	' try to close the database    
-    call fCloseDatabase(false)
     
 endcase
 '-------------------------------------------------------------------------

testautomation/framework/optional/f_basic_gridcontrol.bas

 '\******************************************************************************
 
 sub main
-
     use "framework\optional\includes\basic_gridcontrol.inc"
-
     call hStatusIn ("framework", "f_basic_gridcontrol.bas")
-
-    hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
+    printlog "Load Document with gridcontrol"
     call tGridcontrolLoad
     hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
-
-    call hStatusOut()
-
+    call hStatusOut   
 end sub
 
 sub LoadIncludeFiles
-
     use "global\system\includes\master.inc"
     use "global\system\includes\gvariabl.inc"
-
-    use "global\tools\includes\optional\t_treelist_tools.inc"
-    
     gApplication = "WRITER"
     call GetUseFiles()
 end sub

testautomation/framework/optional/includes/basic_gridcontrol.inc

 '\******************************************************************************
 
 testcase tGridcontrolLoad
+    dim sLocation as string
+    dim i,x,a as integer
+    dim sTemp as string
+    dim lFiles(200) as string
+    dim bTemp as boolean
+    dim iError, iOK as integer
+    
+    sLocation = "framework/optional/include/basic_gridcontrol.inc::"
 
-    const MACRO_NAME = "VclTestTool"
-    const MACRO_NOT_FOUND = 0
-    const FILE_NAME  = "framework/optional/input/gridcontrol.odt"
+    hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
 
-    dim iPos 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
+    printlog "Open the test document"
+    call hFileOpen(convertPath(gTestToolPath + "framework/optional/input/gridcontrol.odt"))
+    printlog "Security dialog might come up"
+    kontext "SecurityWarning"
+    if SecurityWarning.exists(5) then
+        printlog "Allow to run macros"
+        SecurityWarning.ok
+    endif
+    call sleep 1
+    call sMakeReadOnlyDocumentEditable
+    call sleep 1
 
     printlog "Start the macro, that performs the test"
     Kontext "GridControlDialogStarter"
         warnlog "Gridcontrol Dialog did not come up after pressing button"
     endif
     
-    printlog( "Test exit, cleanup" )
-    hFileCloseAll()
-    
+    printlog "clean up"
+    printlog "Close the document, else an error about the navigator will be thrown"
+    if getDocumentcount > 0 then
+        call hCloseDocument()
+    endif
 endcase
 
 

testautomation/framework/optional/input/gridcontrol.odt

Binary file modified.

testautomation/graphics/optional/includes/global/export_graphic.inc

 '\******************************************************************************
 
 testcase tEPS
-
     dim x as integer
     dim i as integer
-
     const sFilter = "EPS - Encapsulated PostScript (.eps)"
     const sExt = ".eps"
 
     printlog "open the document"
     hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
-
     if ( hCallExport ( OutputGrafikTBO , sFilter ) ) then
         Kontext "EPSOptionen"
         if ( EPSOptionen.Exists( 2 ) ) then
             ' next i
             printlog "leave dialog with cancel -> there has to be no file created!"
             hCloseDialog( EPSOptionen, "cancel" )
-
             if ( FileExists( OutputGrafikTBO+sExt ) ) then ' inspired by bug #99932 Graphic is exported though cancel is pressed
                 warnlog "Dialog was canceled, but file got saved, too :-(  - i35177"
             endif
         else
             warnlog( "No export options dialog was displayed" )
         end if
-
         Kontext "Active"
         if Active.Exists(2) then
             Warnlog "'" + sFilter + "' has a problem"
             Active.OK
         end if
     end if
-
     printlog( "Save the file" )
     if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
 
         else
             warnlog( "No export options dialog was displayed" )
         endif
-
         printlog( "Close file and re-insert graphics into new document" )
-        hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+        if ( lcase( gPlatform ) <> "osx" ) then
+            hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+        else
+            qaErrorLog "#i100253# crash on MacOS X 10.4"
+        endif
     endif
-
     call hCloseDocument
-
 endcase 'tEPS
 '-------------------------------------------------------------------------
 testcase tPCT
 '*******************************************************************************
 
 function hWaitForOutputFile( sOutputFile as string ) as boolean
-
     const FILE_WRITE_TIMEOUT = 30
     dim iWait as integer : iWait = 0
 
     for iWait = 1 to FILE_WRITE_TIMEOUT
-
         ' File found
         if ( FileExists( sOutputFile ) ) then
             hWaitForOutputFile() = true
             exit function
         endif
-
         ' Timeout
         if ( iWait = FILE_WRITE_TIMEOUT ) then
             hWaitForOutputFile() = false
             exit function
         endif
+        wait( 1000 )
+    next iWait
+end function
 
-        wait( 1000 )
-
-    next iWait
-
-end function