You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/01/14 01:57:11 UTC
svn commit: r1231427 [3/5] - in /incubator/ooo/trunk/main/testautomation:
chart2/optional/includes/loadsave/ chart2/required/includes/ chart2/tools/
dbaccess/tools/ framework/optional/includes/ framework/required/includes/
framework/tools/includes/ glo...
Modified: incubator/ooo/trunk/main/testautomation/global/required/includes/g_findbar.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/required/includes/g_findbar.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/required/includes/g_findbar.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/required/includes/g_findbar.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,120 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Update test for the findbar
+'*
+'\***********************************************************************
+
+testcase tUpdtFindBar()
+
+ ' This test is incomplete. It needs to be integrated into all update tests
+ ' and it needs to be added to the toolbar management functions
+
+ printlog( "Update test for the findbar" )
+
+ const TEST_STRING = "VCL Testtool"
+
+ select case( gApplication )
+ case "IMPRESS", "DRAW", "DATABASE"
+ kontext "FindBar"
+ if ( FindBar.exists() ) then
+ warnlog( "The FindBar should not be visible by default" )
+ endif
+ end select
+
+ hNewDocument()
+
+ kontext "FindBar"
+ if ( FindBar.exists() ) then
+
+ printlog( "FindBar has " & FindBar.getItemCount() & " items" )
+
+ printlog( "Insert text into search field" )
+ FindText.setText( TEST_STRING )
+
+ printlog( "Click <Find next> (down arrow)" )
+ DownSearch.click()
+
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ printlog( "Expected message: " & Active.getText()
+ call DialogTest( Active )
+
+ kontext "Active"
+ Active.ok()
+ else
+ warnlog( "Messagebox missing <No matches found>" )
+ endif
+
+ printlog( "Click <Find last> (up arrow)" )
+ kontext "FindBar"
+ UpSearch.click()
+
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ printlog( "Expected message: " & Active.getText()
+ call DialogTest( Active )
+
+ kontext "Active"
+ Active.ok()
+ else
+ warnlog( "Messagebox missing <No matches found>" )
+ endif
+
+ qaerrorlog( "#i111984 - exclude <SearchDialog> button from testing" )
+ goto skip_SearchDialog
+
+ printlog( "Search dialog button may not be visible by default" )
+ kontext "FindBar"
+ if ( SearchDialog.exists() ) then
+ if ( SearchDialog.isVisible() ) then
+ SearchDialog.click()
+ warnlog( "Button <Search Dialog> is visible, it should be hidden by default" )
+ else
+ printlog( "Button <Search Dialog> is hidden, good" )
+ endif
+ else
+ warnlog( "<Search Dialog> button should not be visible" )
+ endif
+
+ printlog( "Add <Search Dialog> button to toolbar" )
+ hToggleSearchDialog()
+
+ kontext "FindBar"
+ SearchDialog.click()
+
+ kontext "FindAndReplace"
+ if ( FindAndReplace.exists( 1 ) ) then
+ call DialogTest( FindAndReplace )
+
+ kontext "FindAndReplace"
+ if ( SearchFor.getSelText() = TEST_STRING ) then
+ printlog( "Test string has been inserted into <SearchFor> Listbox. Good." )
+ else
+ warnlog( "Search string should have been copied from findbar to search dialog" )
+ endif
+ FindAndReplace.close()
+ else
+ warnlog( "Dialog <Search And Replace> is missing" )
+ endif
+
+ printlog( "Remove <Search Dialog> button from toolbar" )
+ hToggleSearchDialog()
+
+ skip_SearchDialog:
+
+ else
+ warnlog( "FindBar is not visible" )
+ endif
+
+ hCloseDocument()
+
+endcase
-*****
+'*******************************************************************************
function hToggleSearchDialog()
Modified: incubator/ooo/trunk/main/testautomation/global/required/includes/g_printing.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/required/includes/g_printing.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/required/includes/g_printing.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/required/includes/g_printing.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,16 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Resource test for the printing dialog
+'*
+'\******************************************************************************
-*****
+private const MSG1 = "Incorrect default setting: "
+
+'*******************************************************************************
sub g_printing()
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_accels.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_accels.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_accels.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_accels.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,12 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
-
-*****
+'
+'**************************************************************
+'*
+'* short description : handle accelerators
+'*
+'*******************************************************************************
'**
' #1 hGetAccel ' function to retrieve a language specific accelerator
'**
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_ide_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,73 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+' **
+' ** short description : tools for the property-browser test
+' **
+'\******************************************************************************
+
+function hShowMacroControls() as boolean
+
+ '///<h3>Tear off the ToolsCollectionBar from the MacroBar</h3>
+ '///<i>Starting point: Basic dialog editor is open and has the focus</i>
+ '///<ul>
+ const CFN = "hShowMacroControls::"
-*****
+ const MAX_WAIT = 5
+ const SHORT_WAIT = 1
+
+ const VERTICALLY_CENTERED = 50
+ const HORIZONTALLY_CENTERED = 50
+
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
+
+ '///+<li>Test whether the ToolsCollectionBar is already open. If yes, exit directly</li>
+ kontext "ToolsCollectionBar"
+ if ( ToolsCollectionBar.exists( SHORT_WAIT ) ) then
+ printlog( CFN & "ToolsCollectionBar is already open." )
+ hShowMacroControls() = true
+ exit function
+ endif
+
+ '///+<li>Verify that the Dialog Bar is available</li>
+ Kontext "DialogBar"
+ if ( DialogBar.exists( MAX_WAIT ) ) then
+
+ '///+<li>Verify that the controls-button is enabled</li>
+ try
+ '///+<li>Click on the controls-button to open the ToolsCollectionBar</li>
+ controls.click()
+
+ '///+<li>Tear off the ToolsCollectionBar from the DialogBar</li>
+ controls.tearOff()
+
+ '///+<li>Verify that the ToolsCollectionBar is visible and can be accessed</li>
+ kontext "ToolsCollectionBar"
+ if ( ToolsCollectionBar.exists( MAX_WAIT ) ) then
+
+ '///+<li>Move it to the upper left corner at pos 50/50</li>
+ ToolsCollectionBar.Move ( HORIZONTALLY_CENTERED , VERTICALLY_CENTERED )
+ printlog( CFN & "ToolsCollectionBar is open and has been placed" )
+ hShowMacroControls() = true
+ else
+ printlog( CFN & "ToolsCollectionBar is not available. Aborting." )
+ hShowMacroControls() = false
+ endif
+ catch
+ printlog( CFN & "The Controls-Button is not enabled. Aborting." )
+ hShowMacroControls() = false
+ endcatch
+ else
+ printlog( CFN & "The Dialog Bar is not available. Aborting." )
+ hShowMacroControls() = false
+ endif
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hGetBasicWorkFile( cMajorID as string ) as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_basic_organizer_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,49 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+' **
+' ** short description : tools for tools/macro test
+' **
+'\******************************************************************************
+
+function hSelectTheLastModule( bEditEnabled as Boolean ) as string
+
+ '///<h3>Select the last (editable) module in the macro seletor treelist</li>
+
+ use "global\tools\includes\optional\t_treelist_tools.inc"
+
+ const CFN = "hSelectTheLastModule()::"
+
+ dim bCloseDialog as boolean : bCloseDialog = FALSE
+ dim iNodeCount as integer
+ dim iCurrentNode as integer
+
+ hSelectTheLastModule() = ""
+
+ kontext "Makro"
+ if ( not Makro.exists() ) then ToolsMacro_uno : bCloseDialog = TRUE
+
+ kontext "Makro"
+ iNodeCount = hSelectTheLastNode( MakroAus )
+
+ if ( bEditEnabled ) then
+ for iCurrentNode = iNodeCount to 1 step -1
+ if ( Bearbeiten.isEnabled() ) then
+ printlog( CFN & "Editable module found at pos: " & iCurrentNode )
+ exit for
+ endif
+ next iCurrentNode
+ else
+ printlog( CFN & "Module selected at pos: " & iNodeCount )
+ endif
+
+ if ( iCurrentNode > 1 ) then hSelectTheLastModule = MakroAus.getSelText()
+
+end function
-*****
+'*******************************************************************************
function hCreateModuleForDoc( optional cName as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_control_objects.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_control_objects.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_control_objects.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_control_objects.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,16 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Functions to manipulate controls by accessing them as objects
+'*
+'\******************************************************************************
-*****
+private const MSG1 = "Incorrect default setting: "
+
+'*******************************************************************************
function cb_test( oControl as object, def_state as string, issueid as string ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_docfuncs.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_docfuncs.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_docfuncs.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_docfuncs.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,65 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : misc functions to handle documents
+'*
+'\******************************************************************************
+
+function hUseImpressAutopilot( bEnable as boolean ) as boolean
+
+ '///<h3>Enable/disable the Impress Autopilot in Tools/Options</h3>
+ '///<i>Starting point: Any plain document</i>
+ '///<ul>
+ const CFN = "global::tools::includes::optional::t_docfuncs.inc::hUseImpressAutopilot::"
+
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
+
+ '///+<li>Create a new IMPRESS document</li>
+ gApplication = "IMPRESS"
+ hCreateDocument()
+
+ '///+<li>Open Tools/Options, go to Presentataion/General page</li>
+ ToolsOptions
+ hToolsOptions( gApplication , "General" )
+
+ '///+<li>Check or uncheck to start with autopilot</li>
+ Kontext "TabSonstigesDraw"
+ if ( mitAutopilotStarten.exists( 2 ) ) then
+
+ if ( bEnable ) then
+ mitAutopilotStarten.check()
+ if ( GVERBOSE ) then printlog( CFN & "Enable Impress Autopilot" )
+ else
+ mitAutopilotStarten.uncheck()
+ if ( GVERBOSE ) then printlog( CFN & "Disable Impress Autopilot" )
+ endif
+
+ '///+<li>Return Status of Checkbox (checked=TRUE)</li>
+ hUseImpressAutopilot() = mitAutopilotStarten.isChecked()
-*****
+ else
+
+ warnlog( CFN & "Cannot find Autopilot Checkbox" )
+
+ endif
+
+ '///+<li>Close Tools/Options</li>
+ Kontext "OptionenDlg"
+ hCloseDialog( OptionenDlg, "ok" )
+
+ '///+<li>Close IMPRESS document</li>
+ hDestroyDocument()
+
+ '///+<li>Returncode is undefined</li>
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hNumericDocType( doctype as integer ) as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_extension_manager_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,278 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools to ease working with the extension manager
+'*
+'\******************************************************************************
+
+function hExtensionAddGUI( _path as string, _flags as string ) as integer
+
+ '///<h3>Install an extension using the OpenOffice.org Extension Manager UI</h3>
+ '///<p>This function is intended for use with the new Extension Manager UI
+ '///+ and replaces an older function with the same name. Please note that
+ '///+ the interface has changed significantly. <br>This has become necessary
+ '///+ because the Extension Manager can turn up with a really huge number
+ '///+ of different dialogs, warnings, errormessages etc. <br>
+ '///+ As this function is designed to handle the most common installation
+ '///+ scenarios it needs quite a number of differnt options.<br>
+ '///+ Please have a look at the usage sample:<br><br></p>
+ '///+ <p align="center"><i>hExtensionAddGUI( sMyExtension,
+ '///+ "InstallForAll,BrokenDeps,DenyUpdate" )</i<p><br>
+
+
+ '///<u>Input:</u><br>
+ '///<ol>
+ '///+<li>Path to extension (String)</li>
+ '///<ul>
+ '///+<li>The path has to be fully qualified</li>
+ '///+<li>The path may be platform specific</li>
+ '///</ul>
+
+ '///+<li>Flags (String), defaults underlined</li>
+ '///<ul>
+ '///+<li>The string is non optional but may be empty. Allowed flags are:</li>
+ '///<ul>
+ '///+<li>InstallForAll | <u>InstallForUser</u><br>Used when running office with administrator rights</li>
+ '///+<li>AllowUpdate | DenyUpdate | <u>NoUpdate</u><br>Reinstall already installed extension/update</li>
+ '///+<li>AcceptLicense | DenyLicense | <u>NoLicense</u><br>How to handle possible license dialog</li>
+ '///+<li>BrokenDeps<br>Close exactly one broken dependencies warning</li>
+ '///+<li>UseSlot<br>Use the File Open slot to load the extension (faster)</li>
+ '///</ul>
+ '///+<li>It is recommended to use the comma as delimiter between flags</li>
+ '///</ul>
+ '///</ol>
+
+ '///<u>Return Value:</u><br>
+ '///<ol>
+ '///+<li>Installation status (Integer)</li>
+ '///<ul>
+ '///+<li>> 0 = Installation completed with no errors, number of installed extensions</li>
+ '///+<li>-1 = The requested extension does not exist</li>
+ '///+<li>-2 = The Add-button could not be accessed</li>
+ '///+<li>-3 = The Extension Manager did not open</li>
+ '///+<li>-4 = Unknown messagebox before the file Open dialog exists</li>
+ '///+<li>-5 = Broken dependency warning displayed</li>
+ '///+<li>-6 = The File Open dialog did not pop up</li>
+ '///+<li>-7 = Unknown and unhandled messagebox. function exit</li>
+ '///</ul>
+ '///</ol>
+
+ dim flags as string : flags = lcase( _flags )
+ dim path as string : path = convertpath( _path )
+ dim bLogs as boolean : bLogs = FALSE
+
+ const CFN = "hExtensionAddGUI()::"
+
+ '///<u>Description</u>
+ '///<ul>
-*****
+ ' set defaults if string is empty
+ if ( flags = "" ) then flags = "installforuser,noupdate,nolicense"
+ if ( instr( flags , "verbose" ) <> 0 ) then bLogs = TRUE
+
+ if ( bLogs ) then printlog( CFN & "Flags: " & flags )
+
+ '///+<li>Verify that the requested extension exists (filesystem level)</li>
+ if ( not FileExists( path ) ) then
+ printlog( CFN & "Requested extension does not exist" )
+ printlog( CFN & path )
+ hExtensionAddGUI() = -1
+ exit function
+ endif
+
+
+ if ( bLogs ) then
+ printlog( "" )
+ printlog( "********** Installing extension begin **********" )
+ endif
+
+ '///+<li>Open the Extension Manager - optionally using the slot (CWS oxtsysint01)</li>
+ if ( instr( flags , "useslot" ) <> 0 ) then
+ hFileOpen( path )
+ else
+ ToolsPackageManager
+ kontext "PackageManager"
+
+ if ( PackageManager.exists( 2 ) ) then
+
+ '///+<li>Verify that the "Add.." button is available</li>
+ if ( add.exists() and add.isEnabled() ) then
+
+ '///+<li>Click the "Add..." button</li>
+ add.click()
+ else
+ printlog( CFN & "Add button is missing or disabled" )
+ hExtensionAddGUI() = -2
+ exit function
+ endif
+
+ '///+<li>Test for the dreaded "The office workdirectory does not exist" warning, close it</li>
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ if ( Active.getButtonCount() = 1 ) then
+ if ( bLogs ) then printlog( Active.getText() )
+ active.ok()
+ else
+ printlog( CFN & "Unexpected/unknown messagebox" )
+ printlog( Active.getText() )
+ hExtensionAddGUI() = -4
+ exit function
+ endif
+ endif
+
+ '///+<li>Enter the extension name into the file picker, open the file</lI>
+ kontext "OeffnenDlg"
+ if ( OeffnenDlg.exists( 2 ) ) then
+ DateiName.setText( path )
+ Oeffnen.click()
+ else
+ printlog( CFN & "The File Open dialog did not open" )
+ hExtensionAddGUI() = -6
+ exit function
+ endif
+
+ else
+ printlog( CFN & "Extension Manager is not open" )
+ hExtensionAddGUI() = -3
+ exit function
+ endif
+ endif
+
+ '///+<li>Test for the installation target dialog that comes up as soon as the
+ '///+ user has administrator rights or works on a userspace installation.
+ '///+ Handle the dialog as specified by the function flags</li>
+ if ( instr( flags, "installfor" ) <> 0 ) then
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ if ( Active.getButtonCount() = 3 ) then
+
+ if ( bLogs ) then
+ printlog( CFN & "Installation target dialog found" )
+ printlog( Active.getText() )
+ endif
+
+ if ( instr( flags , "installforall" ) <> 0 ) then
+ printlog( CFN & "Installing for all users" )
+ Active.no()
+ else
+ printlog( CFN & "Installing for user only" )
+ Active.yes()
+ endif
+ else
+ if ( bLogs ) then
+ printlog( CFN & "Unexpected/unknown dialog" )
+ printlog( Active.getText() )
+ endif
+ endif
+ else
+ if ( bLogs ) then printlog( CFN & "Skipping handling of installation target" )
+ endif
+ else
+ if ( bLogs ) then printlog( CFN & "Not handling userspace installations" )
+ endif
+
+ '///+<li>Test for the broken dependencies exception, close it with ok.</li>
+ if ( instr( flags , "brokendeps" ) <> 0 ) then
+ if ( bLogs ) then printlog( CFN & "Testing for dependencies messagebox" )
+ kontext "UnsatisfiedDependencies"
+ if ( UnsatisfiedDependencies.exists( 1 ) ) then
+ printlog( CFN & "Closing Unsatisfied Dependencies dialog." )
+ UnsatisfiedDependencies.ok()
+ hExtensionAddGUI() = -5
+ else
+ printlog( CFN & "No unsatisfied dependencies dialog" )
+ endif
+ else
+ if ( bLogs ) then printlog( CFN & "Skipping handling of broken dependencies dialog" )
+ endif
+
+ '///+<li>Test for the extension update dialog which pops up if an extension
+ '///+ is already installed. Handle as specified by flags</li>
+ if ( instr( flags, "update" ) ) then
+ if ( bLogs ) then printlog( CFN & "Testing for version message/update" )
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+
+ if ( bLogs ) then
+ printlog( CFN & "Found update dialog" )
+ printlog( Active.getText() )
+ endif
+
+ if ( Active.getButtonCount() = 2 ) then
+ if ( instr( flags, "denyupdate" ) <> 0 ) then
+ printlog( CFN & "Denying update" )
+ Active.cancel()
+ else
+ printlog( CFN & "Allowing update" )
+ Active.ok()
+ endif
+ else
+ printlog( CFN & "Unexpected/unknown dialog displayed" )
+ printlog( Active.getText() )
+ hExtensionAddGUI() = -7
+ exit function
+ endif
+ else
+ if ( instr( flags , "noupdate" ) <> 0 ) then
+ printlog( CFN & "No update dialog present. Good" )
+ else
+ printlog( CFN & "Update messagebox is missing" )
+ endif
+ endif
+ else
+ if ( bLogs ) then printlog( CFN & "Skipping handling of update dialog" )
+ endif
+
+ '///+<li>Test for the Software License Agreement dialog. Handle as specified by
+ '///+ flags</li>
+ if ( instr( flags, "license" ) <> 0 ) then
+ if ( bLogs ) then printlog( CFN & "Testing software license dialog" )
+ kontext "ExtensionSoftwareLicenseAgreement"
+ if ( ExtensionSoftwareLicenseAgreement.exists( 5 ) ) then
+ if ( bLogs ) then printlog( CFN & "Software license dialog found" )
+ if ( instr( flags , "denylicense" ) <> 0 ) then
+ printlog( CFN & "Cancelling software license dialog" )
+ ExtensionSoftwareLicenseAgreement.cancel()
+ else
+ printlog( CFN & "Accepting software license" )
+ do while ( not accept.isEnabled() )
+ ScrollDown.click()
+ WaitSlot()
+ loop
+ accept.click()
+ endif
+ else
+ if ( instr( flags , "nolicense" ) <> 0 ) then
+ printlog( CFN & "No license dialog displayed. Good." )
+ else
+ warnlog( CFN & "Expected license dialog is missing" )
+ endif
+ endif
+ else
+ if ( bLogs ) then printlog( CFN & "Skipping handling of license dialog" )
+ endif
+
+ '///+<li>Retrieve the number of installed extensions</li>
+ kontext "PackageManager"
+ wait( 500 )
+ hExtensionAddGUI() = BrowsePackages.getItemCount()
+
+ '///+<li>Close the Extension Manager</li>
+ hCloseDialog( PackageManager , "close" )
+
+ if ( bLogs ) then
+ printlog( "********** Installing extension end **********" )
+ printlog( "" )
+ endif
+ '///</ul>
+
+end function
+
+
+'*******************************************************************************
function hExtensionRemoveGUI( cExtensionName as string ) as integer
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_filetools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_filetools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_filetools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_filetools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,155 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Functions that work with files like deleting, loading...
+'*
+'\******************************************************************************
+
+function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean
+
+ '///<h3>Handle any dialogs that might pop up when loading a file</h3>
+ '///<i>Beware: This function gives only limited control over the dialogs closed,
+ '///+ it just closes anything it can.</i><br>
+ '///<i>Please refer to the inline documentation for further details</i><br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Number of dialogs to be closed (integer)</li>
+ '///<ul>
+ '///+<li>Number of dialogs not limited though more than 3 is not useful</li>
+ '///</ul>
+ '///+<li>Additional dialogs (integer).</li>
+ '///<ul>
+ '///+<li>Number of dialogs to handle in case of unexpected behavior. If unsure set it to 2</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Errorcondition (boolean)</li>
+ '///<ul>
+ '///+<li>TRUE: The expected number of dialogs were closed</li>
+ '///+<li>FALSE: On any other condition</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+ '///+<li>OK to create a new document based on a template</li>
+ '///+<li>YES to update links</li>
+ '///+<li>YES to execute macros</li>
+ '///</ul>
+
+ use "global/tools/includes/optional/t_stringtools.inc"
+
+ const CFN = "hHandleActivesOnLoad::"
+
+ dim iTry as integer
+ dim iActives as integer
+ dim cMessage as string
+ dim bSkip as boolean
+
+ if ( GVERBOSE ) then printlog( CFN & "Enter" )
-*****
+ ' not good but apparently required - else hDestroyDocument will handle the
+ ' dialogs and warn about them.
+
+ ' think positive: preset the returnvalue with "true"
+ hHandleActivesOnLoad() = true
+
+ for iTry = 1 to iTries + iAdd
+
+ ' handle three possible dialogs:
+ ' 1. The warning that the user should create a new document based
+ ' on this Sample/Template (the document is write protected)
+ ' 2. The question to update links to the internet. Note: If you
+ ' use proxies, they must be set correctly otherwise the result
+ ' is undefined.
+ ' 3. Some weird usage information dialog which is an active with just
+ ' one OK button.
+
+ ' Although this works quite well, there is a flaw that we will not
+ ' get information about an "active" dialog that cannot be closed by
+ ' .yes() or .ok(). If this happens, we probably run into an error
+ kontext "Active"
+ try
+ if ( active.exists( 1 ) ) then
+
+ iActives = iActives + 1
+ cMessage = hRemoveLineBreaks( active.getText() )
+ printlog( CFN & "MSG (" & iActives & "): " & cMessage )
+ printlog( CFN & "Ressource type is: " & Active.getRT() )
+ printlog( CFN & "Buttoncount is: " & Active.getButtonCount() )
+ bSkip = false
+
+ ' ok to create a new document
+ try
+ active.cancel()
+ printlog( CFN & "MSG (" & iActives & "): closed with Cancel" )
+ bSkip = true
+ catch
+ printlog( CFN & "Missed - this dialog has no Cancel button (create new document)" )
+ active.ok()
+ endcatch
+
+ if ( not bSkip ) then
+ if ( Active.getRT() = 304 ) then
+ if ( Active.getButtonCount() = 1 ) then
+ active.ok()
+ printlog( CFN & "MSG (" & iActives & "): closed with OK" )
+ bSkip = true
+ endif
+ else
+ endif
+ endif
+
+ if ( not bSkip ) then
+ ' no to update links
+ try
+ active.no()
+ printlog( CFN & "MSG (" & iActives & "): closed with NO" )
+ catch
+ printlog( CFN & "Missed - this dialog has no NO button (update links)" )
+ endcatch
+ endif
+
+ endif
+ catch
+ kontext "Active"
+ if ( Active.exists( 1 ) ) then
+ if ( Active.getButtonCount() = 2 ) then
+ printlog( CFN & "<Update links dialog> or <File corruption warning>" )
+ active.yes()
+ hFileWait( FALSE )
+ kontext "Active"
+ if ( Active.exists( 2 ) ) then
+ qaerrorlog( "#105670# - File corruption warning, the template is broken" )
+ qaerrorlog( CFN & "Trying to recover." )
+ Active.ok()
+ hHandleActivesOnLoad() = FALSE
+ exit function
+ endif
+ endif
+ endif
+
+ qaerrorlog( "Problem while trying to handle messageboxes" )
+ hHandleActivesOnLoad() = false
+ endcatch
+
+ next iTry
+
+ ' now see how many dialogs were allowed and how many have been closed
+ ' this does not change the return value of the function
+ if ( iActives > iTries ) then
+ printlog( CFN & "Exit: The test closed more dialogs than expected" )
+ hHandleActivesOnLoad() = false
+ else
+ if ( GVERBOSE ) then printlog( CFN & "Exit" )
+ endif
+
+end function
+
+'*******************************************************************************
function hHandleInitialDialogs() as integer
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_key_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_key_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_key_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_key_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,12 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
-
-*****
+'
+'**************************************************************
+'*
+'* short description : tools for evaluation of key=value datalists
+'*
+'*******************************************************************************
' **
' #1 hGetDataPairAsString ' retrieve key=value from a list
' #1 hGetValueForPairAsString ' retrieve value from a key=value as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_listfuncs.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_listfuncs.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_listfuncs.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_listfuncs.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,51 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Replacements for routines in t_lists.inc adds some
+'*
+'\******************************************************************************
+
+function hListDelete( aList() as string, iItemToDelete as integer ) as boolean
+
+ '///<h3>Delete one item from a list specified by index</h3>
+ '///<i>Prerequisite: Array compatible with those from t_lists.inc</i><br>
+ '///<i>About listfunctions: All listfunctions rely on a special type of
+ '///+ array. This can be string arrays and - in some cases - numeric
+ '///+ arrays. What makes the arrays unique is that the first item which
+ '///+ has the index 0 contains the number of items in the list to be used,
+ '///+ anything that is stored beyond this number is ignored. This has three
+ '///+ consequences: 1) all listfunctions that alter an array must update
+ '///+ the index stored in array(0) and 2) it is possible that the index
+ '///+ point beyond ubound of the array which will most likely cause a
+ '///+ runtime error. 3) Means that arrays may only have an upper boundary
+ '///+ declared, all loops must start with index array(1) and must end with
+ '///+ index array(val( array(0))</i><br>
+
+ const CFN = "hListDelete::"
+ const INDEX_CORRECTION = 1
+ dim iCurrentItem as integer ' Increment-Variable
+
+ if ( GVERBOSE ) then
+ printlog( CFN & "Removing: " & aList( iItemToDelete ) & " at pos " & iItemToDelete )
+ endif
+
+ ' Move all items down by one in the list beginning with the item after
+ ' iItemToDelete
+ for iCurrentItem = ( iItemToDelete + INDEX_CORRECTION ) to ListCount( aList() )
+ aList( iCurrentItem - INDEX_CORRECTION ) = aList( iCurrentItem )
+ next iCurrentItem
+
+ ' Delete the last entry, it is no longer used and it is duplicate to the item
+ ' at iListSizeOld-1 (iListSizeNew)
+ aList( iCurrentItem ) = ""
+ aList( 0 ) = iCurrentItem - INDEX_CORRECTION
+
+end function
-*****
+'*******************************************************************************
function hListAppend( sNewString as string, aTargetList() as string ) as integer
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_macro_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_macro_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_macro_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_macro_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,77 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+' **
+' ** short description : Helper functions for Macro tests
+' **
+'\******************************************************************************
+
+function hInsertMacroFromFile( cMacroId as string, optional cSource as string ) as integer
+
+ '///<h3>Paste a macro (taken from a file) to the basic IDE</h3>
+ '///<i>uses: framework/tools/input/macros.txt</i><br>
+ '///<i>Starting point: Basic IDE</i><br>
+ '///<u>Note</u>: Overwrites any existing macros in the current module<br>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Name (ID) of the macro to be inserted (string)</li>
+ '///<ul>
+ '///+<li>Allowed is any string that corresponds to a section in the source file</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Number of lines inserted (integer)</li>
+ '///<ul>
+ '///+<li>0: Error, no lines inserted</li>
+ '///+<li>> 0: Number of lines</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+
+ const CFN = "hInsertMacroFromFile::"
+ const RETVAL_FAILURE = 0
+ const MAX_LINES_IN_MACRO_FILE = 10000
+
+ '///+<li>Find the path to the source file</li>
+ dim cFile as string
+ dim aInstructionList( MAX_LINES_IN_MACRO_FILE ) as string
+ dim iInstructionCount as integer
+ dim iCurrentInstruction as integer
+
+ if ( IsMissing( cSource ) ) then cFile = gTesttoolPath & "global/input/macros.txt"
+
+ '///+<li>retrieve the macro from the file with ID as section</li>
+ iInstructionCount = hGetDataFileSection( cFile, aInstructionList(), cMacroId, "", "" )
+
+ '///+<li>Delete all content from the BASIC IDE edit window</li>
+ '///+<li>Insert the code into the IDE line by line</li>
+ kontext "BasicIDE"
+ if ( EditWindow.exists() ) then
+ if ( hDeleteMacro() ) then
+ for iCurrentInstruction = 1 to iInstructionCount
+ EditWindow.TypeKeys( "<HOME>" )
+ EditWindow.TypeKeys( aInstructionList( iCurrentInstruction ) )
+ EditWindow.TypeKeys( "<RETURN>" )
+ next iCurrentInstruction
+ printlog( CFN & "Inserted macro: " & cMacroId )
+ hInsertMacroFromFile() = iInstructionCount
+ else
+ printlog( CFN & "IDE is not empty, will not insert macro" )
+ hInsertMacroFromFile() = RETVAL_FAILURE
+ endif
+ else
+ printlog( CFN & "Editwindow is not visible" )
+ hInsertMacroFromFile() = RETVAL_FAILURE
+ endif
+ '///</ul>
+
+end function
-*****
+'*******************************************************************************
function hMacroOrganizerRunMacro( cMacroName as string ) as integer
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ole.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ole.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ole.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ole.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,42 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools for OLE objects
+'*
+'\******************************************************************************
+
+function hGetOfficeVersion() as string
+
+ ' The "Insert OLE object" dialog lists the OLE Objects with application name
+ ' and version number. THe version numbers are tracked in the officeinfo.txt
+ ' file which must be adjusted each time we change to a new major version.
+
+ const CFN = "global::tools::includes::optional::t_ole.inc::hGetOfficeVersion(): "
+ const DATAFILE = "global/input/officeinfo.txt"
+ const MAX_LINES_IN_DATAFILE = 20
+
+ dim cPath as string
+ dim aItemList( MAX_LINES_IN_DATAFILE ) as string
+
+ ' Path to info file
+ cPath = convertpath( gTesttoolPath & DATAFILE )
+ if ( GVERBOSE ) then printlog( CFN & "Reading: " & cPath )
+
+ ' Read the file, store the list of known office versions
+ hGetDatafileSection( cPath, aItemList(), "", "", "" )
+
+ ' Search for the version number matching the product name, store value in global variable
+ gOfficeVersion = hGetValueForKeyAsString( aItemList(), gProductName )
+
+ ' Return content of the global variable as well
+ hGetOfficeVersion() = gOfficeVersion
+
+end function
-*****
+'*******************************************************************************
function hGetOleObjectName( cApplication as string ) as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_security_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_security_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_security_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_security_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,95 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Tools to ease testing of security related funtionality
+'*
+'\******************************************************************************
+
+function hSetPasswordRecommendation( bEnable as boolean ) as boolean
+
+ '///<h3>Toggle Tools/Options/OOo/Security: Password recommendation</h3>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Mode (boolean)</li>
+ '///<ul>
+ '///+<li>TRUE: Switch password recommendation on</li>
+ '///+<li>FALSE: Switch password recommendation off</li>
+ '///</ul>
+ '///</ol>
+
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Prior state (boolean)</li>
+ '///<ul>
+ '///+<li>TRUE: Password recommendation was on</li>
+ '///+<li>FALSE: Password recommendation was off</li>
+ '///</ul>
+ '///</ol>
+
+ '///<u>Description</u>:
+ '///<ul>
+
+ const CFN = "hSetPasswordRecommendation::"
+
+ '///+<li>Open Tools/Options</li>
+ ToolsOptions
+
+ kontext "OptionenDlg"
+ if ( OptionenDlg.exists( 2 ) ) then
+
+ '///+<li>Go to the security page</li>
+ hToolsOptions( "STAROFFICE" , "SECURITY" )
+
+ '///+<li>Click on the "Options..." button</li>
+ kontext "TabSecurity"
+ if ( hClickButton( Options ) ) then
+
+ kontext "TabSecurityOptionsAndWarnings"
+ if ( TabSecurityOptionsAndWarnings.exists( 1 ) ) then
+
+ '///+<li>Retrieve the current setting for passwor recommendation</li>
+ if ( RecommendPasswordProtectionOnSaving.isChecked() ) then
+ hSetPasswordRecommendation() = true
+ else
+ hSetPasswordRecommendation() = false
+ endif
+
+ '///+<li>Set the requested state</li>
+ if ( bEnable ) then
+ printlog( CFN & "Enabled password recommendation" )
+ RecommendPasswordProtectionOnSaving.check()
+ else
+ printlog( CFN & "Disabled password recommendation" )
+ RecommendPasswordProtectionOnSaving.uncheck()
+ endif
+
+ hCloseDialog( TabSecurityOptionsAndWarnings, "ok" )
+
+ else
+ warnlog( "Failed to open security options page" )
+ hSetPasswordRecommendation() = false
+ endif
+
+ else
+ warnlog( CFN & "Unable to click options button" )
+ hSetPasswordRecommendation() = false
+ endif
+
+ '///+<li>Close Tools/Options</li>
+ Kontext "ToolsOptionsDlg"
+ hCloseDialog( ToolsOptionsDlg, "ok" )
+
+ else
+ warnlog( "Failed to open Tools/Options" )
+ endif
+ '///</ul>
+
+end function
-****
+'******************************************************************************
function hOpenDigitalSignaturesDialog() as boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_set_standard_controls.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_set_standard_controls.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_set_standard_controls.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_set_standard_controls.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,12 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
-
-************************
+'
+'**************************************************************
+'*
+'* short description : Tool library for setting controls and verifying the functionality
+'*
+'**************************************************************************************************
'*
' #0 fSetListBoxByItem 'Function to select item in list box
' #0 fSetListBoxByString 'Function to select item by string in list box
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_stringtools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_stringtools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_stringtools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_stringtools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,24 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Functions for manipulation of strings
+'*
+'\******************************************************************************
+
+function hRemoveLineBreaks( cString as string ) as string
+
+ dim myString as string : myString = cString
+ myString = hStringReplaceChar( myString, CHR$(09), " " )
+ myString = hStringReplaceChar( myString, CHR$(13), " " )
+ myString = hStringReplaceChar( myString, CHR$(10), "" )
+ hRemoveLineBreaks() = myString
-*****
+end function
+
+'*******************************************************************************
function hCompareSubStrings( cRef as string, cSub as string ) as integer
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_tools1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_tools1.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_tools1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_tools1.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,12 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
-
-*************
+'
+'**************************************************************
+'*
+'* short description : Toolbar tools 1
+'*
+'***************************************************************************************
'*
' #1 fActiveObjectInToolbar ' active/inactive image button in toolbar
'*
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_writer.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_writer.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_writer.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_toolbar_writer.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,12 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
-
-*************
+'
+'**************************************************************
+'*
+'* short description : Toolbar tools - Writer
+'*
+'***************************************************************************************
'*
' #0 fGetObjectWriter
' #0 fGetObjectCalc
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_treelist_tools.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,71 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Helpers for accessing treelists
+'*
+'\******************************************************************************
+
+function hGetNodeCount( oControl as object ) as integer
+
+ '///<h3>Retrieve the number of visible (open) nodes from a treelist</h3>
+ '///<u>Input</u>:
+ '///<ol>
+ '///+<li>Treelist control object (Object)</li>
+ '///<ul>
+ '///+<li>Object must exist in current context</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Returns</u>:
+ '///<ol>
+ '///+<li>Number of items in treelist</li>
+ '///<ul>
+ '///+<li>0 on any error</li>
+ '///+<li>> 0 Number of items</li>
+ '///</ul>
+ '///</ol>
+ '///<u>Description</u>:
+ '///<ul>
+
+
+ const CFN = "hGetNodeCount::"
+ const RETVAL_FAILURE = 0
+ dim iCount as integer
+
+ '///+<li>Verify that the control exists</li>
+ if ( oControl.exists( 5 ) ) then
+
+ '///+<li>Verify that the control is enabled</li>
+ if ( oControl.isEnabled() ) then
-*****
+ if ( GVERBOSE ) then printlog( CFN & "Regular access, control available and enabled" )
+
+ '///+<li>get the number of items from the control</li>
+ iCount = oControl.getItemCount()
+ else
+ printlog( CFN & "Failure: Control claims to be disabled." )
+ iCount = RETVAL_FAILURE
+ endif
+ else
+ try
+ printlog( CFN & "Forcing access to non existing control" )
+ iCount = oControl.getItemCount()
+ catch
+ printlog( CFN & "Failure: Control not available." )
+ iCount = RETVAL_FAILURE
+ endcatch
+ endif
+
+ if ( GVERBOSE ) then printlog( CFN & "Exit with nodecount = " & iCount )
+
+ hGetNodeCount = iCount
+ '///</ul>
+
+end function
+
+'*******************************************************************************
function hSelectTopNode( oControl as object ) as boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_ui_filters.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,22 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Get the UI names for default filters
+'*
+'\******************************************************************************
+
+global gWriterFilter as String
+global gCalcFilter as String
+global gImpressFilter as String
+global gMasterDocFilter as String
+global gMathFilter as String
+global gDrawFilter as String
+global gHTMLFilter as String
-*****
+'*******************************************************************************
sub GetDefaultFilterNames()
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/optional/t_xml1.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,12 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
-
-*********
+'
+'**************************************************************
+'*
+'* short description : simple XML-Parser for XML-Files from Registration-Database and Routines to work with SAX-Parser in Testtool
+'*
+'***********************************************************************************
' #1 hXMLGotoElement
' #1 hXMLGetFirstCharsForElement
' #1 ExtractSections
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_doc1.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,364 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
+'
+'**************************************************************
+'*
+'* short description : Global Routines for Document Handling
+'*
+'\*************************************************************************************
+
+sub hNewDocument ( optional bANewDoc )
+ '/// hNewDocument : open a new document dependent on 'gApplication' ///'
+ dim sTemp as string
+
+ if IsMissing ( bANewDoc ) <> TRUE then
+ if bANewDoc = TRUE then
+ gNoNewDoc = FALSE
+ else
+ gNoNewDoc = TRUE
+ end if
+ end if
+
+ select case gApplication
+ case "WRITER"
+ Kontext "DocumentWriter"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/swriter", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/swriter", "FrameName", "_default", "SynchronMode", TRUE
+ end if
+ if ( DocumentWriter.IsMax() = false ) then
+ DocumentWriter.Maximize()
+ Wait( 2000 )
+ end if
+ case "CALC"
+ Kontext "DocumentCalc"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/scalc", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/scalc", "FrameName", "_default", "SynchronMode", TRUE
+ end if
+ if ( DocumentCalc.IsMax() = false ) then
+ DocumentCalc.Maximize()
+ Wait( 2000 )
+ end if
+ case "IMPRESS"
+ Kontext "DocumentImpress"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/simpress", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/simpress", "FrameName", "_default", "SynchronMode", TRUE
+ Kontext "AutoPilotPraesentation1"
+ if AutoPilotPraesentation1.Exists (2) then
+ Printlog "------------------------------The Impress-Autopilot was active------------------"
+ Startwithwizard.Check ' opposite of the checkboxs' title
+ AutoPilotPraesentation1.OK
+ Sleep 2
+ Kontext "SeitenLayout"
+ SeitenLayout.Cancel
+ end if
+ Kontext "DocumentImpress"
+ Sleep 2
+ if ( DocumentImpress.IsMax() = false ) then
+ DocumentImpress.Maximize()
+ Wait( 2000 )
+ end if
+ end if
+ case "DRAW"
+ Kontext "DocumentDraw"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/sdraw", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/sdraw", "FrameName", "_default", "SynchronMode", TRUE
+ end if
+ if ( DocumentDraw.IsMax() = false ) then
+ DocumentDraw.Maximize()
+ Wait( 2000 )
+ end if
+ case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/swriter/GlobalDocument", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/swriter/GlobalDocument", "FrameName", "_default", "SynchronMode", TRUE
+ end if
+ Kontext "Navigator"
+ sleep (1)
+ if Navigator.Exists(5) then Navigator.Close
+ Kontext "DocumentMasterDoc"
+ if ( DocumentMasterDoc.IsMax() = false ) then
+ DocumentMasterDoc.Maximize()
+ Wait( 2000 )
+ end if
+ case "MATH"
+ Kontext "DocumentMath"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/smath", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/smath", "FrameName", "_default", "SynchronMode", TRUE
+ end if
+ Kontext "DocumentMath"
+ if ( DocumentMath.IsMax() = false ) then
+ DocumentMath.Maximize()
+ Wait( 2000 )
+ end if
+ case "HTML"
+ Kontext "DocumentWriterWeb"
+ if gNoNewDoc = TRUE then
+ FileOpen "FileName", "private:factory/swriter/web", "SynchronMode", TRUE
+ else
+ FileOpen "FileName", "private:factory/swriter/web", "FrameName", "_default", "SynchronMode", TRUE
+ end if
+ Kontext "DocumentWriterWeb"
+ if ( DocumentWriterWeb.IsMax() = false ) then
+ DocumentWriterWeb.Maximize()
+ Wait( 2000 )
+ end if
+ case "DATABASE"
+ FileOpen "FileName", "private:factory/sdatabase?Interactive", "FrameName", "_default", "SynchronMode", TRUE
+ Kontext "DatabaseWizard"
+ if DatabaseWizard.exists(5) then
+ FinishBtn.click
+ kontext "SpeichernDlg"
+ if SpeichernDlg.exists(5) then
+ if (Dateiname.getSelText = "") then
+ sTemp = convertPath(gOfficePath + "user/work/hNewDocument.odb")
+ if fileExists(sTemp) then
+ app.kill(sTemp)
+ endif
+ qaErrorlog "## lost default filename"
+ Dateiname.setText "hNewDocument"
+ endif
+ Speichern.click
+ Kontext "DATABASE"
+ else
+ warnlog "t_doc1.inc::hNewDocument():: Can't create Database Document 2"
+ endif
+ else
+ warnlog "t_doc1.inc::hNewDocument():: Can't create Database Document 1"
+ endif
+ case "BASIC"
+ ToolsMacroMacro
+ kontext "makro"
+ if makro.exists(5) then
+ MakroAus.typeKeys "<home>"
+ sTemp = ""
+ while (NOT bearbeiten.isEnabled) AND (sTemp <> MakroAus.getSelText)
+ sTemp = MakroAus.getSelText
+ MakroAus.typeKeys "<down>+"
+ wend
+ if (bearbeiten.isEnabled) then
+ bearbeiten.click
+ else
+ qaErrorlog "Can't edit document."
+ endif
+ else
+ warnlog "Can't open Basic IDE."
+ endif
+ case else : WarnLog "hNewDocument: No Applikation named '" + gApplication + "' exists in this routine!"
+ end select
+ Sleep 2
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+function hCreateLabels() as Boolean
+
+ hCreateLabels() = false
+
+ FileOpen( "FileName", "private:factory/swriter?slot=21051", "FrameName", "_default", "SynchronMode", TRUE )
+
+ Kontext
+ if ( Active.exists( 5 ) ) then
+ Active.setPage TabEtiketten
+
+ if ( TabEtiketten.exists( 1 ) ) then
+ if ( Tabetiketten.isVisible() ) then
+ hCreateLabels() = true
+ else
+ warnlog( "<TabEtiketten> is not visible" )
+ endif
+ else
+ warnlog( "<TabEtiketten> not open" )
+ endif
+ else
+ warnlog( "Failed to open <TabEtiketten>" )
+ endif
+
+end function
+'
+'-------------------------------------------------------------------------------
+'
+function hCreateBusinessCards() as Boolean
+
+ hCreateBusinessCards() = false
+
+ FileOpen( "FileName", "private:factory/swriter?slot=21052", "FrameName", "_default", "SynchronMode", TRUE )
+
+ Kontext
+ if ( Active.exists( 5 ) ) then
+ Active.setPage TabEtikettenMedium
+
+ if ( TabEtikettenMedium.exists( 1 ) ) then
+ if ( TabetikettenMedium.isVisible() ) then
+ hCreateBusinessCards() = true
+ else
+ warnlog( "<TabEtikettenMedium> is not visible" )
+ endif
+ else
+ warnlog( "<TabEtikettenMedium> not open" )
+ endif
+ else
+ warnlog( "Failed to open <TabEtikettenMedium>" )
+ endif
+
+end function
+'
+'-------------------------------------------------------------------------------
+'
+function hCloseDocument()
+
+ hUseAsyncSlot( "FileClose")
+
+ Kontext "Active"
+ if ( Active.Exists( 2 ) ) then
+ try
+ Active.No
+ catch
+ Active.click( 202 )
+ endcatch
+ end if
+
+ WaitSlot( 2000 )
+
+end function
+'
+'-------------------------------------------------------------------------------
+'
+sub gMouseClick ( X%, Y%, optional _mousebutton )
+
+ dim oDocument as object
+ dim mousebutton as integer
+
+ ' Handle infamous optional parameter
+ if ( IsMissing( _mousebutton ) ) then
+ mousebutton = 1
+ else
+ mousebutton = _mousebutton
+ endif
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' get the current document object
+
+ autoexecute = false
+ oDocument.MouseDown ( X%, Y%, mousebutton )
+ oDocument.MouseUp ( X%, Y%, mousebutton )
+ autoexecute = true
+ wait( 1000 )
+
+end sub
+'
+'-------------------------------------------------------------------------------
'
-'*************************************************************************
+sub gMouseDoubleClick ( X%, Y% )
-*****
+ dim oDocument as object
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' get the current document object
+ oDocument.MouseDoubleClick ( X%, Y% )
+ wait( 1000 )
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub gMouseMove ( BeginX%, BeginY%, EndX%, EndY% )
+
+ dim oDocument as object
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' get the current document object
+ oDocument.MouseDown ( BeginX%, BeginY% )
+ oDocument.MouseMove ( EndX%, EndY%)
+ oDocument.MouseUp ( EndX%, EndY% )
+ wait( 1000 )
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub gMouseDown ( BeginX%, BeginY% )
+
+ dim oDocument as object
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' get the current document object
+ oDocument.MouseDown ( BeginX%, BeginY% )
+ wait( 300 )
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub gMouseMove2 ( EndX%, EndY% )
+
+ dim oDocument as object
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' get the current document object
+ oDocument.MouseMove ( EndX%, EndY%)
+ wait( 300 )
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub gMouseUp ( EndX%, EndY% )
+
+ dim oDocument as object
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' get the current document object
+ oDocument.MouseUp ( EndX%, EndY% )
+ wait( 300 )
+
+end sub
+'
+'-------------------------------------------------------------------------------
+'
+sub hTypeKeys ( OutputText , optional _iLoop as Integer )
+
+ const CFN = "global::tools::includes::required::t_doc1.inc::hTypeKeys(): "
+
+ dim iRepeat as integer
+ dim iLoop as integer
+ dim oDocument as object
+
+ ' Handle infamous optional parameter
+ If ( IsMissing( _iLoop ) ) then
+ iLoop = 1
+ else
+ iLoop = _iLoop
+ endif
+
+ hSetDocumentContext() ' set kontext to current document type
+ oDocument = hSetDocumentObject() ' Get the document object we want to write to
+
+ try
+ for iRepeat = 1 to iLoop
+ oDocument.TypeKeys( OutputText )
+ wait( 200 )
+ next iRepeat
+ catch
+ warnlog( CFN & "Failed to send keystroke to given context" )
+ endcatch
+
+end sub
+
+'*******************************************************************************
function hSetDocumentContext() as string
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_files.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,20 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Global routines for loading, saving, printing, export
+'*
+'\******************************************************************************
+
+function hGrafikEinfuegen( cFile as string ) as Boolean
-*****
+ hGrafikEinfuegen() = hInsertGraphic( cFile, "Static" )
+
+end function
+
+'*******************************************************************************
function hGrafikVerknuepftEinfuegen( cFile as string ) as Boolean
Modified: incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc?rev=1231427&r1=1231426&r2=1231427&view=diff
==============================================================================
--- incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc (original)
+++ incubator/ooo/trunk/main/testautomation/global/tools/includes/required/t_filters.inc Sat Jan 14 00:57:08 2012
@@ -1,6 +1,6 @@
'encoding UTF-8 Do not remove or change this line!
-'*************************************************************************
-'
+'**************************************************************
+'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
@@ -17,10 +17,30 @@
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
-'
-'*************************************************************************
+'
+'**************************************************************
+'*
+'* short description : Retrieve and set filternames and suffixes
+'*
+'\******************************************************************************
+
+private const LENGTH_OF_FILTERFILE = 100
+private const FILE_DATA_SIZE = 300
-*****
+function hCheckForBinfilters() as boolean
+
+ try
+ hGetSuffix( "569" )
+ hCheckForBinfilters() = true
+ catch
+ warnlog( "Optional legacy filters package is not installed" )
+ printlog( "Please restart the setup to install the missing filters" )
+ hCheckForBinfilters() = false
+ endcatch
+
+end function
+
+'*******************************************************************************
function hGetSuffix( optional cBuildId as string ) as string