diff --git a/testautomation/chart2/optional/ch2_lvl1_wizard.bas b/testautomation/chart2/optional/ch2_lvl1_wizard.bas index 4e96ca2d0819..cc0b1a8938e2 100755 --- a/testautomation/chart2/optional/ch2_lvl1_wizard.bas +++ b/testautomation/chart2/optional/ch2_lvl1_wizard.bas @@ -49,11 +49,13 @@ sub main use "chart2\tools\ch_tools_tab_pages.inc" use "chart2\tools\ch_tools_select.inc" use "chart2\optional\includes\wizard\ch2_lvl1_wizard.inc" + use "chart2\optional\includes\wizard\ch2_lvl1_wizard2.inc" Call hStatusIn ( "Chart2", "ch2_lvl1_wizard.bas" ) Call tCreateNew3DChart Call tCreateNewLineChart Call tCreateNewBubbleChart + Call tCreateNewFilledNetChart Call hStatusOut end sub diff --git a/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc new file mode 100644 index 000000000000..1fc47ae73662 --- /dev/null +++ b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc @@ -0,0 +1,130 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_lvl1_wizard2.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: obo $ $Date: 2008-07-22 10:36:56 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : oliver.craemer@sun.com +'* +'* short description : New chart types +'* +'************************************************************************ +'* +' #1 tCreateNewFilledNetChart ' Create a new filled netchart and check the preserved values +'* +'\************************************************************************ + +testcase tCreateNewFilledNetChart + Dim sInputFile as STRING + Dim sOutputFile as STRING + Dim sControlString as STRING + Dim iChartVariant as integer + Dim iChartVariantText as string + + + sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" ) + sOutputFile = convertpath ( gOfficePath & "user/work/tCreateNewFilledChart.ods" ) + + + printlog "Load test document TesttoolPath/chart2/optional/input/randomData.ods" + call hFileOpen(sInputFile) + sleep(2) + printlog "Save document as OfficePath/user/work/tCreateNewFilledNetChart.ods" + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then + warnlog "Saving test document localy failed -> Aborting" + call hCloseDocument + goto endsub + endif + printlog "Insert / Chart" + InsertChart + sleep(5) + Kontext "ChartType" + if NOT ChartType.Exists(5) then + warnlog "Chart Wizard was not visible. EXITING!" + goto endsub + else + printlog "Chart Wizard visible." + end if + printlog "Choose the Chart type net (should be the eights in the top-down list)" + if fSetChartType( "net" ) > 0 then + warnlog "Something went wrong setting chart type to BAR." + endif + printlog "Select 4th chart variant from left (filled)" + if fSetChartTypeVariant( 4 ) > 0 then + warnlog "Something went wrong setting chart type VARIANT." + endif + printlog "Create Chart by clicking Finish-button" + Kontext "ChartWizard" + ChartWizard.OK + sleep(2) + printlog "File / Save" + FileSave + Kontext "DocumentCalc" + printlog "Press twice -key" + DocumentCalc.TypeKeys "" , 2 + printlog "File / Close document" + Call hCloseDocument + sleep(2) + printlog "Open saved file again" + call hFileOpen(sOutputFile) + sleep(2) + printlog "Open the Navigator (F5)" + printlog "Select the first OLE object in the Navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit to enter Inplace Mode" + EditObjectEdit + printlog "Format / Chart Type" + FormatChartType + Kontext "ChartType" + if ChartType.Exists(2) then + printlog "Check if chart type is NET CHART" + if ChooseType.GetSelIndex <> 8 then + warnlog "Selected chart type wasn't preserved after save and reload." + endif + printlog "Check if chart variant is Filled Net CHART (4th variant in non-CTL versions from the left)" + if Variant.GetSelIndex <> 4 then + warnlog "Selected chart type variant wasn't preserved after save and reload." + end if + printlog "Leave Chart Type dialog with Cancel" + Kontext "ChartType" + if ChartType.Exists(2) then + ChartType.Cancel + else + warnlog "ChartType dialog was not visible!?" + end if + else + warnlog "Chart Type dialog was not up!" + end if + printlog "Press ESCAPE button (deselecting the OLE object)" + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + printlog "Close document" + Call hCloseDocument +endcase diff --git a/testautomation/chart2/required/includes/ch2_insert_ctl.inc b/testautomation/chart2/required/includes/ch2_insert_ctl.inc index 5f84969dfd4d..3a72c13a3e59 100644 --- a/testautomation/chart2/required/includes/ch2_insert_ctl.inc +++ b/testautomation/chart2/required/includes/ch2_insert_ctl.inc @@ -318,8 +318,15 @@ testcase tEquationTextDirection printlog "Leave the dialog with OK" InsertTrendlinesDialog.OK Kontext "DocumentChart" - printlog "Type thrice in the Chart document to select the equation" - DocumentChart.TypeKeys "" , 3 + printlog "Leave Chart by ESC and reenter Chart" + DocumentChart.TypeKeys "" , 2 + call fSelectFirstOLE + EditObjectEdit + Kontext "DocumentChart" + printlog "Type thrice in the Chart document, press F3 and to select the equation" + DocumentChart.TypeKeys "" , 3 + DocumentChart.TypeKeys "" + DocumentChart.TypeKeys "" printlog "Format / Object properties" FormatObjectProperties Kontext diff --git a/testautomation/chart2/tools/ch_tools_chart_type.inc b/testautomation/chart2/tools/ch_tools_chart_type.inc index 0ab824aef05f..1dd55c54c291 100644 --- a/testautomation/chart2/tools/ch_tools_chart_type.inc +++ b/testautomation/chart2/tools/ch_tools_chart_type.inc @@ -254,8 +254,8 @@ function fSetChartTypeVariant ( iChartTypeVariant as INTEGER ) as INTEGER iMaximumVariant = 3 endif case 7 : iMaximumVariant = 1 - case 4, 8 : iMaximumVariant = 3 - case 3, 5, 6, 9 : iMaximumVariant = 4 + case 4 : iMaximumVariant = 3 + case 3, 5, 6, 8 ,9 : iMaximumVariant = 4 case 10 : iMaximumVariant = 2 end select diff --git a/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc b/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc index 2adae7652dd3..be1544c81b34 100755 --- a/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc +++ b/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc @@ -172,11 +172,20 @@ testcase tOpenNoneDatabaseDocument Kontext "DocumentCalc" if (DocumentCalc.exists()) then - printlog "the spreadsheet is loaded" - printlog "close spreadsheet again" + warnlog "the spreadsheet should not appear" call hCloseDocument() else - warnlog "the spreadsheet is not loaded" + Kontext "MessageBox" + if(MessageBox.exists(1)) then + printlog "messagebox appear ->> OK" + MessageBox.OK + Kontext "DatabaseWizard" + DatabaseWizard.Cancel + else + warnlog "there should be a message box about the fact that this is no database" + Kontext "DatabaseWizard" + DatabaseWizard.Cancel + endif endif endcase diff --git a/testautomation/extensions/optional/includes/fileopen.inc b/testautomation/extensions/optional/includes/fileopen.inc index 6d457df6d58e..ad700a404005 100755 --- a/testautomation/extensions/optional/includes/fileopen.inc +++ b/testautomation/extensions/optional/includes/fileopen.inc @@ -70,12 +70,16 @@ testcase tExtensionFileOpen printlog( "Reopen Extension Manager UI, click Add.. and check the directory" ) ToolsPackageManager + kontext "PackageManager" if ( PackageManager.exists( 3 ) ) then Add.click() + Kontext "OeffnenDlg" if ( OeffnenDlg.exists( 2 ) ) then - DateiAuswahl.select( DateiAuswahl.getItemCount() ) + + printlog( "Select the last item in the list which should be the extension" ) + DateiAuswahl.select( Dateiauswahl.getItemCount() ) cString = DateiAuswahl.getSelText() if ( cString <> EXTENSION_NAME ) then warnlog( "Incorrect extension listed. Please check path and filename" ) @@ -85,11 +89,13 @@ testcase tExtensionFileOpen else printlog( "Found correct extension, the dialog remembers the path" ) endif + kontext "OeffnenDlg" OeffnenDlg.cancel() else warnlog( "Could not access Add Extensions Dialog" ) endif + kontext "PackageManager" PackageManager.close() else diff --git a/testautomation/framework/optional/includes/basic_eventbinding.inc b/testautomation/framework/optional/includes/basic_eventbinding.inc index 8ef77ac40108..75771c0897e2 100755 --- a/testautomation/framework/optional/includes/basic_eventbinding.inc +++ b/testautomation/framework/optional/includes/basic_eventbinding.inc @@ -234,9 +234,14 @@ endcase testcase tAssignComponentFunction dim x,i,a as integer dim sTemp as string + dim sPath as string + sPath = gTesttoolPath & "framework\optional\input/eventbinding/" + dim sExtension as string + sExtension = "DialogComponent.oxt" sExtensionCLI("list","") - sExtensionCLI("add","DialogComponent.oxt",convertPath(gTestToolPath + "framework\optional\input/eventbinding/") ) + 'sExtensionCLI("add","DialogComponent.oxt",convertPath(gTestToolPath + "framework\optional\input/eventbinding/") ) + hExtensionAddGUI( sPath & sExtension, "" ) hFileOpen(convertPath(gTestToolPath + "framework\optional\input/eventbinding/DialogComponent.odt")) kontext "SecurityWarning" if SecurityWarning.exists(5) then @@ -312,5 +317,6 @@ testcase tAssignComponentFunction ' vnd.sun.star.UNO:copyText sExtensionCLI("remove","DialogComponent.oxt" ) + 'hExtension RemoveGUI( sExtension ) hCloseDocument() endcase diff --git a/testautomation/framework/optional/includes/basic_formcontrols.inc b/testautomation/framework/optional/includes/basic_formcontrols.inc index 02179e12d605..c6c9278ed57b 100755 --- a/testautomation/framework/optional/includes/basic_formcontrols.inc +++ b/testautomation/framework/optional/includes/basic_formcontrols.inc @@ -39,10 +39,7 @@ testcase tAllControlsOnDialog( cMajor as string ) - '///

Basic test for macro controls

- '///This test opens the applications and creates a basic dialog. - '///+On this dialog all control are inserted, the document is saved and reloaded - '///+to see if the dialog and the controls still exist.

+ printlog( "Insert all available controls into a BASIC dialog and verify that changed settings persist a save/load cycle" ) dim iApplication as Integer ' numeric expression for gApplication dim cApplication as string ' Name of the current application @@ -64,29 +61,21 @@ testcase tAllControlsOnDialog( cMajor as string ) const CMODULE = "tacod" ' abbreviation for tAllControlsOnDialog - - '///save/load-test for controls on a basic-dialog in all applications - '///
    - '///+
  • open a new doc (for Writer only)
  • - - ' If you want to test all applications, make iApplication = 1 to 6 + printlog( "Perform the test for one application only: WRITER" ) for iApplication = 1 to 1 - ' switch documenttype (writer, calc, impress, draw ...) + printlog( "Set document type" ) cApplication = hNumericDoctype( iApplication ) - ' get the name of the workfile dependent on gApplication - '///+
  • Build a path and a filename (path from UNO, Suffix from global-module)
  • + printlog( "Build the filename" ) sFile = hGetWorkPath() & "basic" & hGetSuffix( cMajor ) sFile = ConvertPath( sFile ) printlog( "Using file: " & sFile ) - ' delete the file if it exists, the outcome has no influence on the test - ' so the returnvalue is ignored + printlog( "Delete the file, if it exists" ) hDeleteFile( sFile ) - ' open a new document to work with (2 open AFTER this) - '///+
  • Open a new document to work with
  • + printlog( "Open a second document" ) printlog( "" ) printlog( cApplication ) brc = hCreateDocument() @@ -95,9 +84,9 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Create a new module for the new document
  • - '///+
  • Create a new dialog in BasicIDE
  • - '///+
  • Open the macro controls float
  • + printlog( "Create a new module for the new document" ) + printlog( "Create a new dialog in BasicIDE" ) + printlog( "Open the macro controls float" ) bOpen = hInitFormControls( CMODULE ) if ( not bOpen ) then printlog( "Aborting due to previous errors" ) @@ -118,7 +107,7 @@ testcase tAllControlsOnDialog( cMajor as string ) Kontext "BASICIDE" - '///+
  • close the BASIC-IDE
  • + printlog( "close the BASIC-IDE" ) hCloseBasicIde() @@ -144,7 +133,7 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Click 'Edit' to edit the module
  • + printlog( "Click 'Edit' to edit the module" ) printlog( "Edit the module" ) Bearbeiten.Click() if ( WaitSlot <> WSFinished ) then @@ -152,7 +141,7 @@ testcase tAllControlsOnDialog( cMajor as string ) endif kontext "BasicIDE" - '///+
  • Find the dialog we created before
  • + printlog( "Find the dialog we created before" ) ' try to find our dialog again by stepping through the tabbar bOpen = hFindFirstDialog() if ( not bOpen ) then @@ -162,7 +151,7 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Open the macro controls float
  • + printlog( "Open the macro controls float" ) ' if the dialog is open, open the macro controls toolbar as well, ' we need access to the "properties" button bOpen = hShowMacroControls() @@ -173,7 +162,7 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Select every control, open its properties and verify its name, close properties
  • + printlog( "Select every control, open its properties and verify its name, close properties" ) for iCurrentControl = 1 to ICONTROLCOUNT if ( instr( gtSysName, "Solaris" ) > 0 ) then @@ -191,7 +180,7 @@ testcase tAllControlsOnDialog( cMajor as string ) ' we need to delete the list-content otherwise we run into index-problems ListAllDelete( lsControlNames() ) - '///+
  • Cleanup: Close the BASIC-IDE
  • + printlog( "Cleanup: Close the BASIC-IDE" ) printlog( "Close the BASIC IDE" ) hCloseBasicIde() @@ -200,25 +189,22 @@ testcase tAllControlsOnDialog( cMajor as string ) endif printlog "Save the document" - '///+
  • save the document
  • + printlog( "save the document" ) Call hFileSaveAsKill( sFile ) printlog "Close it" - '///+
  • close the document
  • - '///
+ printlog( "close the document" ) brc = hDestroyDocument() printlog( "" ) printlog( "Test case 2: Verify that all items keep their names after close and reload of the document" ) - '///check all controls in the saved document - printlog "Open the file again" - '///
    - '///+
  • open the document
  • + printlog( "Open the file again" ) + printlog( "Open the document" ) hFileOpen( sFile ) printlog "Open tools/macro and select the last module for the current document" - '///+
  • open the basic-IDE of this document, open controls, activate 'Select-mode' and open the properties
  • + printlog( "open the basic-IDE of this document, open controls, activate 'Select-mode' and open the properties" ) ToolsMacro_uno kontext "Makro" irc = hSelectNodeByName( MakroAus , CMODULE ) @@ -238,7 +224,7 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Click 'Edit' to edit the module
  • + printlog( "Click 'Edit' to edit the module" ) printlog( "Edit the module" ) Bearbeiten.Click() if ( WaitSlot <> WSFinished ) then @@ -246,7 +232,7 @@ testcase tAllControlsOnDialog( cMajor as string ) endif kontext "BasicIDE" - '///+
  • Find the dialog we created before
  • + printlog( "Find the dialog we created before" ) ' try to find our dialog again by stepping through the tabbar bOpen = hFindFirstDialog() if ( not bOpen ) then @@ -256,7 +242,7 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Open the macro controls float
  • + printlog( "Open the macro controls float" ) ' if the dialog is open, open the macro controls toolbar as well, ' we need access to the "properties" button bOpen = hShowMacroControls() @@ -267,7 +253,7 @@ testcase tAllControlsOnDialog( cMajor as string ) goto endsub endif - '///+
  • Select every control, open its properties and verify its name, close properties
  • + printlog( "Select every control, open its properties and verify its name, close properties" ) for iCurrentControl = 1 to ICONTROLCOUNT if ( instr( gtSysName, "Solaris" ) > 0 ) then @@ -285,19 +271,18 @@ testcase tAllControlsOnDialog( cMajor as string ) ' we need to delete the list-content otherwise we run into index-problems ListAllDelete( lsControlNames() ) - '///+
  • Cleanup: Close the BASIC-IDE
  • + printlog( "Cleanup: Close the BASIC-IDE" ) printlog( "Close the BASIC IDE" ) hCloseBasicIde() - '///+
  • Cleanup: Close the document
  • + printlog( "Cleanup: Close the document" ) printlog( "Close the document" ) brc = hDestroyDocument() - '///+
  • Cleanup: Delete the file we created
  • + printlog( "Cleanup: Delete the file we created" ) hDeleteFile( sFile ) - '///+
  • Repeat this for every application
  • - '///
+ printlog( "Repeat this for every application" ) next iApplication diff --git a/testautomation/framework/optional/includes/basic_library_export.inc b/testautomation/framework/optional/includes/basic_library_export.inc index 4110482cdf69..779e9ba60ce4 100755 --- a/testautomation/framework/optional/includes/basic_library_export.inc +++ b/testautomation/framework/optional/includes/basic_library_export.inc @@ -163,15 +163,20 @@ testcase tBasicLibraryExport printlog( "Close the macro/libraries organizer" ) kontext "TabBibliotheken" - TabBibliotheken.cancel() - - printlog( "Cancel macro organizer" ) - kontext "Makro" - Makro.cancel() - - while( getDocumentCount > 0 ) - hDestroyDocument() - wend + if ( TabBibliotheken.exists( 1 ) ) then + TabBibliotheken.cancel() + + printlog( "Cancel macro organizer" ) + kontext "Makro" + Makro.cancel() + + while( getDocumentCount > 0 ) + hDestroyDocument() + wend + else + warnlog( "Dialog could not be accessed" ) + call exitRestartTheOffice() + endif endcase diff --git a/testautomation/framework/optional/includes/options_ooo_view.inc b/testautomation/framework/optional/includes/options_ooo_view.inc index 3949625529fd..6cd38ac5396e 100755 --- a/testautomation/framework/optional/includes/options_ooo_view.inc +++ b/testautomation/framework/optional/includes/options_ooo_view.inc @@ -136,11 +136,27 @@ sub checkPage( sFile as string , bDisabled as boolean, optional iMiddleMouseButt iTemp = 2 ' Automatic scrolling endif if Itemp = iMiddleMouseButton then - printlog " * Middle mouse button: OK" + printlog " * Middle mouse button: ok" else - warnlog "Middle mouse button: expected: '" + iTemp + "' '" + MausAktion.getItemText(iTemp) + "'; is: '" + iMiddleMouseButton + "' '" + MausAktion.getItemText(iMiddleMouseButton) + "'" + warnlog "Middle mouse button: expected: '" + iTemp + "' '" _ + + MausAktion.getItemText(iTemp) + "'; is: '" _ + + iMiddleMouseButton + "' '" _ + + MausAktion.getItemText(iMiddleMouseButton) + "'" endif endif + + if ( Transparency.isEnabled() ) then + if ( Transparency.isChecked() ) then + checkCheckBox( sFile , "*" , transparency ) + checkEntryField( sFile , "*", selectionopacity ) + else + Transparency.check() + checkEntryField( sFile , "*", selectionopacity, "i104150" ) + Transparency.unCheck() + endif + else + printlog( "Transparency is not available on this system" ) + endif Kontext "OptionenDLG" OptionenDLG.OK @@ -205,6 +221,18 @@ sub changePage( sFile as string , bInverted as boolean, optional iMiddleMouseBut MausAktion.select(2) ' Automatic scrolling endif endif + + if ( Transparency.isEnabled() ) then + if ( Transparency.isChecked() ) then + setEntryField( sFile , "*", selectionopacity ) + setCheckBox( sFile , "*" , transparency ) + else + setCheckBox( sFile , "*" , transparency ) + setEntryField( sFile , "*", selectionopacity ) + endif + else + printlog( "Transparency is not available on this system" ) + endif Kontext "OptionenDLG" OptionenDLG.OK diff --git a/testautomation/framework/optional/input/options/ooo_view_changed.ref b/testautomation/framework/optional/input/options/ooo_view_changed.ref index 8cd60a485def..3ef98848078f 100755 --- a/testautomation/framework/optional/input/options/ooo_view_changed.ref +++ b/testautomation/framework/optional/input/options/ooo_view_changed.ref @@ -15,4 +15,6 @@ UseHardwareAcceleration=checked useantialiasing=unchecked mousepositioning=2 mausaktion=1 +transparency=unchecked +selectionopacity=10% diff --git a/testautomation/framework/optional/input/options/ooo_view_defaults.ref b/testautomation/framework/optional/input/options/ooo_view_defaults.ref index 83715feb11d8..f56b0062e4bf 100755 --- a/testautomation/framework/optional/input/options/ooo_view_defaults.ref +++ b/testautomation/framework/optional/input/options/ooo_view_defaults.ref @@ -14,4 +14,6 @@ useantialiasing=checked usehardwareacceleration=disabled mousepositioning=3 mausaktion=2 +transparency=checked +selectionopacity=75% diff --git a/testautomation/framework/required/f_tools_customize.bas b/testautomation/framework/required/f_tools_customize.bas index 0b437177112e..7adc48243085 100755 --- a/testautomation/framework/required/f_tools_customize.bas +++ b/testautomation/framework/required/f_tools_customize.bas @@ -39,6 +39,8 @@ sub main + GLOBAL_USE_NEW_SLEEP = TRUE + use "framework\required\includes\tools_customize.inc" dim cApp as string diff --git a/testautomation/framework/required/includes/tools_customize.inc b/testautomation/framework/required/includes/tools_customize.inc index 69d09f9252f7..56654d8a9c39 100755 --- a/testautomation/framework/required/includes/tools_customize.inc +++ b/testautomation/framework/required/includes/tools_customize.inc @@ -39,41 +39,24 @@ testcase tUpdtCustomize( cApp as string ) - '///

Update test for the Tools/Customize Dialog

- '///
    - const CANCEL_BUTTON = 1 - dim brc as boolean - - '///+
  • Open a new document (abort test on failure)
  • - brc = hCreateDocument() - if ( not brc ) then - warnlog( "Abort: Failed to create requested document: " & gApplication ) - goto endsub + printlog( "Tools/Customize dialog" ) + const CLOSE_METHOD = 1 ' 1 = Cancel button + + if ( hCreateDocument() ) then + if ( hToolsCustomizeOpen() ) then + hUpdtToolsCustomizeKeyboard() + hUpdtToolsCustomizeMenu() + hUpdtToolsCustomizeToolbars() + hUpdtToolsCustomizeEvents() + hToolsCustomizeClose( CLOSE_METHOD ) + else + warnlog( "Tools/Customize dialog did not open" ) + endif + hDestroyDocument + else + warnlog( "Failed to create initial document" ) endif - '///+
  • Open Tools Customize
  • - brc = hToolsCustomizeOpen() - - '///+
  • Look at the Keyboard-Tabpage
  • - hUpdtToolsCustomizeKeyboard() - - '///+
  • Look at the Menu-Tabpage
  • - hUpdtToolsCustomizeMenu() - - '///+
  • Look at the Toolbars-Tabpage
  • - hUpdtToolsCustomizeToolbars() - - '///+
  • Look at the Events-Tabpage
  • - hUpdtToolsCustomizeEvents() - - '///+
  • Close Tools Customize
  • - brc = hToolsCustomizeClose( CANCEL_BUTTON ) - - '///+
  • Close the document
  • - brc = hDestroyDocument - - '///
- endcase '******************************************************************************* @@ -142,7 +125,7 @@ function hUpdtToolsCustomizeMenu() '///+
  • Click the Menu List-Button
  • printlog( CFN & "Click the menu listbutton" ) kontext "TabCustomizeMenu" - MenuBtn.click() + hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu() '///+
  • Select the first entry (Move...) to open the Menu Organiser
  • printlog( CFN & "Select Move..." ) @@ -165,7 +148,7 @@ function hUpdtToolsCustomizeMenu() '///+
  • Click the Menu List-Button
  • printlog( CFN & "Click the menu listbutton" ) kontext "TabCustomizeMenu" - MenuBtn.click() + hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu() '///+
  • Select the second entry (Rename...) to open the Rename dialog
  • printlog( CFN & "Select Rename..." ) @@ -179,7 +162,7 @@ function hUpdtToolsCustomizeMenu() '///+
  • Click the Menu List-Button
  • printlog( CFN & "Click the menu listbutton" ) kontext "TabCustomizeMenu" - MenuBtn.click() + hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu() '///+
  • Select the third entry (Delete) to delete the new menu
    '///+Note that there will be no warning as the menu is empty
  • @@ -361,8 +344,9 @@ function hUpdtToolsCustomizeToolbars() '///+
  • Access the "Toolbar"-Button and rename the toolbar
  • printlog( CFN & "Rename the toolbar via Toolbar-Button" ) kontext "TabCustomizeToolbars" - MenuBtn.click() - waitslot + hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu() + + printlog( "Select rename" ) hMenuSelectNr( 1 ) '///+
  • Cancel the renaming-dialog
  • @@ -379,8 +363,9 @@ function hUpdtToolsCustomizeToolbars() '///+Note that there will be no deletion warning printlog( CFN & "Delete the toolbar via Toolbar-Button" ) kontext "TabCustomizeToolbars" - MenuBtn.click() - waitslot + hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu() + + printlog( "Select delete" ) hMenuSelectNr( 2 ) '///+
  • Click the "Add Commands..." button
  • @@ -399,7 +384,6 @@ function hUpdtToolsCustomizeToolbars() endif '///+
  • Click "Down"
  • - WaitSlot() printlog( CFN & "Down..." ) if ( BtnDown.isEnabled() ) then BtnDown.click() @@ -846,4 +830,91 @@ function hToolsCustomizeTestSaveIn( iItems as integer ) as boolean end function +'******************************************************************************* +function hOpenMenuButton( oControl as object ) as integer + + ' This function is very evil. + ' It was written to hopefully workaround the infamous menubutton which is a button + ' that - when clicked - opens a menu. This feature is shaky and depends on + ' a lot of factors. There is a simple working implemantation in t_menu.inc + ' which has the drawback of being absolutely slow, costing the tools_customize + ' test a lot of time waiting for the control (30% of testtime spent waiting). + ' This approach tries to be dynamic: Machines that can do it the fast way + ' use it automatically, machines that are too slow get two retries with the + ' slower approach. + ' The menubutton is one of the last remaining places where none of the + ' speed optmizations and enhancements apply, so neither WaitSlot() nor + ' synchronous slot execution help here. + + dim iClick as integer + dim bUseSlowMethod as boolean : bUseSlowMethod = false + + const CFN = "hOpenMenuButton: " + + hOpenMenuButton() = -1 ' this is the general failure returnvalue + + for iClick = 1 to 3 + + if ( bUseSlowMethod ) then + wait( 1000 ) + oControl.OpenMenu() + wait( 3000 ) + else + oControl.click() + endif + + try + hOpenMenuButton() = MenuGetItemCount + printlog( CFN & "Success on " & iClick & ". attempt" ) + exit function + catch + qaerrorlog( CFN & "#i96753 - Failed to retrieve itemcount from Menu-/Command-button" ) + bUseSlowMethod = true + endcatch + + next iClick + +end function + +'******************************************************************************* + +function hClickCommandButton( iItemToClick as integer ) as boolean + + const CFN = "hClickCommandButton::" + printlog( CFN & "Enter" ) + + dim brc as boolean 'a multi purpose boolean returnvalue + dim iMenuItems as integer + + iMenuItems = hOpenMenuButton( Command ) + + ' exit on error + if ( iMenuItems < 0 ) then + warnlog( CFN & "Menu apparently not open, giving up." ) + hClickCommandButton() = false + exit function + endif + + hMenuSelectNr( iItemToClick ) + wait( 500 ) + ' check for the rename dialog (menu) + kontext "CustomizeMenuReName" + if ( CustomizeMenuReName.exists() ) then + printlog( CFN & "Opened dialog: Rename Menu" ) + hClickCommandButton() = true + exit function + endif + + ' check for the rename dialog (toolbar) + kontext "CustomizeToolbarsRename" + if ( CustomizeToolbarsRename.exists() ) then + printlog( CFN & "Opened dialog: Rename Toolbar" ) + hClickCommandButton() = true + exit function + endif + + printlog( CFN & "Exit" ) + hClickCommandButton() = true + +end function diff --git a/testautomation/framework/required/includes/window_functions.inc b/testautomation/framework/required/includes/window_functions.inc index e4f6de4bb886..b562120c1c4e 100755 --- a/testautomation/framework/required/includes/window_functions.inc +++ b/testautomation/framework/required/includes/window_functions.inc @@ -39,180 +39,114 @@ testcase tWindowFunctions + printlog( "Update test for window functions" ) + if ( gtSysName = "Mac OS X" ) then printlog( "No testing for Mac as some Window attributes do not exist" ) goto endsub endif - '///

    Update test for window functionality

    - '///
      - dim brc as boolean - '///+
    • Verify that we have one initial document open
    • printlog( "Create initial document" ) gApplication = "WRITER" hInitSingleDoc() hInitWriteDocIdentifier( "F_updt_windowfuncs.bas" ) - '///+
    • Create a new document
    • printlog( "New document" ) - hCreateDocument() + hNewDocument() if ( getDocumentCount <> 2 ) then warnlog( "Two open documents were expected, found " & getDocumentCount ) endif - DocumentWriter.restore() - - '///+
    • Use .close()-method to close document
    • - kontext "documentwriter" + kontext "DocumentWriter" printlog( "Close document" ) DocumentWriter.close() - '///+
    • Verify that the document is closed
    • if ( getDocumentCount <> 1 ) then warnlog( "One open document was expected, found " & getDocumentCount ) endif - '///+
    • Create a new document
    • printlog( "New document" ) - hCreateDocument() + hNewDocument() if ( getDocumentCount <> 2) then warnlog( "Two open documents were expected, found " & getDocumentCount ) endif - '///+
    • Write some text into the second writer document
    • - '///+
    • Use .close()-method to close document
    • printlog( "Enter some text into the second writer document" ) - kontext "documentwriter" + kontext "DocumentWriter" DocumentWriter.TypeKeys( "test" ) DocumentWriter.close() - '///+
    • Close the message (Document changed)
    • kontext "active" if ( Active.exists() ) then + printlog( "Close messagebox with Cancel (leaves the document open)" ) Active.Cancel() - printlog( "Close messagebox" ) else warnlog( "No warning that data will be lost on close of this document" ) endif - '///+
    • Verify that exactly two documents are open
    • + kontext "DocumentWriter" if ( getDocumentCount = 2 ) then - printlog( "One document open. Good." ) + printlog( "Two documents open. Good." ) else warnlog( "Incorrect document count. Expected two, found " & getDocumentCount ) endif - '///+
    • Close the document using FileClose
    • - hDestroyDocument() ' note tha hCloseDoc/hDestroyDocument use FileClose + kontext "DocumentWriter" + printlog( "Close the document" ) + FileClose() - '///+
    • Verify that exactly one document is open
    • + kontext "Active" + if ( Active.exists() ) then + printlog( "Do not save the document" ) + Active.No() + else + warnlog( "Warning: No data loss warning" ) + endif + + kontext "DocumentWriter" if ( getDocumentCount = 1 ) then printlog( "One document open. Good." ) else warnlog( "Incorrect document count. Expected one, found " & getDocumentCount ) endif - '///+
    • Create a new document
    • - printlog( "New document" ) - brc = hCreateDocument() - if ( not brc ) then - warnlog( "Two open documents were expected, found " & getDocumentCount() ) - endif - - - kontext "documentwriter" - '///+
    • Maximize Window
    • - '///
        - printlog( "Maximize window" ) - DocumentWriter.Maximize() - sleep( 2 ) - - '///+
      • Verify state: Maximized (true)
      • - if ( DocumentWriter.IsMax() ) then - printlog( " * Window is maximized" ) - else - warnlog( " * Window not maximized" ) - endif - - - '///+
      • Verify state: Minimized (false)
      • - if ( DocumentWriter.IsMin() ) then - warnlog( " * Window is minimized" ) - else - printlog( " * Window not minimized" ) - endif - - '///+
      • Verify state: Restored (false)
      • - if ( DocumentWriter.IsRestore() ) then - warnlog( " * Window is Restored" ) - else - printlog( " * Window not Restored" ) - endif - '///
      - - '///
    • Minimize Window
    • - '///
        + Kontext "DocumentWriter" printlog( "Minimize window" ) DocumentWriter.Minimize() - sleep( 2 ) + Wait( 2000 ) - '///+
      • Verify state: Minimized (true)
      • + kontext "DocumentWriter" if ( DocumentWriter.IsMin() ) then - printlog( " * Window is minimized" ) + printlog( "Window is minimized" ) else qaerrorlog( "#i32672# Window not minimized" ) endif - '///+
      • Verify state: Maximized (false)
      • - if ( DocumentWriter.IsMax() ) then - warnlog( " * Window is maximized" ) - else - printlog( " * Window not maximized" ) - endif - - '///+
      • Verify state: Restored (false)
      • - if ( DocumentWriter.IsRestore() ) then - qaerrorlog( "#i32672# Window is Restored" ) - else - printlog( " * Window not Restored" ) - endif - '///
      - - '///
    • Restore Window
    • - '///
        + kontext "DocumentWriter" printlog( "Restore window" ) DocumentWriter.Restore() - sleep( 2 ) + Wait( 2000 ) - '///+
      • Verify state: Restored (true)
      • if ( DocumentWriter.IsRestore() ) then - printlog( " * Window is Restored" ) + printlog( "Window is Restored" ) else warnlog( " * Window not Restored" ) endif - '///+
      • Verify state: Maximized (false)
      • - if ( DocumentWriter.IsMax() ) then - warnlog( " * Window is maximized" ) - else - printlog( " * Window not maximized" ) - endif - - '///+
      • Verify state: Minimized (false)
      • - if ( DocumentWriter.IsMin() ) then - warnlog( " * Window is minimized" ) - else - printlog( " * Window not minimized" ) - endif - - '///
      + kontext "DocumentWriter" + printlog( "Maximize window" ) + DocumentWriter.Maximize() + Wait( 2000 ) - '///+
    • Close the documents
    • - brc = hDestroyDocument() - brc = hDestroyDocument() + kontext "DocumentWriter" + if ( DocumentWriter.IsMax() ) then + printlog( "Window is maximized" ) + else + warnlog( " * Window not maximized" ) + endif - '///
    + hDestroyDocument() endcase diff --git a/testautomation/framework/tools/includes/customize_tools.inc b/testautomation/framework/tools/includes/customize_tools.inc index d072d74dfbaf..8c0cbf80f1c9 100755 --- a/testautomation/framework/tools/includes/customize_tools.inc +++ b/testautomation/framework/tools/includes/customize_tools.inc @@ -316,24 +316,29 @@ function hDeselectSeparator() as integer const CFN = "hDeselectSeparator::" kontext "ToolsCustomizeToolbars" - iCurrentItem = ToolbarContents.getSelIndex() - cString = ToolbarContents.getSelText() + if ( ToolbarContents.getItemCount > 0 ) then - '///+
  • Check whether the selected item contains a number of minus-chars (---)
  • - if ( instr( cString , "----" ) ) then - - '///+
  • If we are at the beginning of the list: Move up
  • - if ( iCurrentItem = 1 ) then - irc = 2 - ToolbarContents.select( irc ) - printlog( CFN & " Moved away from separator (up)" ) - else - '///+
  • If we are somewhere else in the list, move down
  • - irc = iCurrentItem - 1 - ToolbarContents.select( irc ) - printlog( CFN & " Moved away from separator (down)" ) - endif + iCurrentItem = ToolbarContents.getSelIndex() + cString = ToolbarContents.getSelText() + '///+
  • Check whether the selected item contains a number of minus-chars (---)
  • + if ( instr( cString , "----" ) ) then + + '///+
  • If we are at the beginning of the list: Move up
  • + if ( iCurrentItem = 1 ) then + irc = 2 + ToolbarContents.select( irc ) + printlog( CFN & " Moved away from separator (up)" ) + else + '///+
  • If we are somewhere else in the list, move down
  • + irc = iCurrentItem - 1 + ToolbarContents.select( irc ) + printlog( CFN & " Moved away from separator (down)" ) + endif + + endif + else + irc = 0 endif hDeselectSeparator() = irc @@ -341,85 +346,5 @@ function hDeselectSeparator() as integer end function - '******************************************************************************* -function hClickCommandButton( iItemToClick as integer ) as boolean - - - '///

    Click a given entry on the command button


    - - '///Parameter(s):
    - '///
      - - '///+
    1. Position of the item to click (Integer)
    2. - '///
        - '///+
      • Only active items are selectable
      • - '///+
      • Position must be > than 0 and ≤ number of active items in menu
      • - '///+
      • Set context (kontext) before calling this function
      • - '///
      - - '///
    - - - '///Returns:
    - '///
      - '///+
    1. Success or failure (Boolean)
    2. - '///
        - '///+
      • TRUE on success
      • - '///+
      • FALSE on failure or unknown status
      • - '///
      - '///
    - - const CFN = "hClickCommandButton::" - printlog( CFN & "Enter" ) - - dim brc as boolean 'a multi purpose boolean returnvalue - dim iMenuItems as integer - - '///Description: - '///
      - '///+
    • Click the command button
    • - command.click() - - '///+
    • Verify that the menu is open
    • - try - iMenuItems = hMenuItemGetCount() - catch - qaerrorlog( CFN & "Menu not open" ) - hClickCommandButton() = false - exit function - endcatch - - '///+
    • Verify that the selected menuitem is valid
    • - printlog( CFN & "Found items: " & iMenuItems ) - if ( iItemToClick > iMenuItems ) then - warnlog( CFN & "#i90134# Selected item is not available: " & iItemToClick ) - hClickCommandButton() = false - exit function - endif - - '///+
    • Now click on the requested item
    • - hMenuSelectNr( iItemToClick ) - - '///+
    • Look for the Menu renaming dialog
    • - kontext "CustomizeMenuReName" - if ( CustomizeMenuReName.exists( 1 ) ) then - printlog( CFN & "Opened dialog: Rename Menu" ) - hClickCommandButton() = true - exit function - endif - - '///+
    • Look for the Toolbar renaming dialog
    • - kontext "CustomizeToolbarsRename" - if ( CustomizeToolbarsRename.exists() ) then - printlog( CFN & "Opened dialog: Rename Toolbar" ) - hClickCommandButton() = true - exit function - endif - '///
    - - printlog( CFN & "Exit" ) - hClickCommandButton() = true - -end function diff --git a/testautomation/framework/tools/includes/pbrowser_tools.inc b/testautomation/framework/tools/includes/pbrowser_tools.inc index 2e3072277b72..dbf91221b1bc 100755 --- a/testautomation/framework/tools/includes/pbrowser_tools.inc +++ b/testautomation/framework/tools/includes/pbrowser_tools.inc @@ -69,28 +69,34 @@ function hOpenPropertyBrowser() as boolean const CFN = "hOpenPropertyBrowser::" '///+
  • Open the property browser (call slot)
  • - ContextProperties - - '///+
  • Verify that the property browser is open
  • - kontext "ControlPropertiesTabControl" - if ( ControlPropertiesTabControl.exists( 2 ) ) then + try + ContextProperties - '///+
  • Activate General-tabpage
  • - ControlPropertiesTabControl.setPage( TabGeneralControl ) - - '///+
  • Verify that the General-tabpage is visible
  • - kontext "TabGeneralControl" - if ( TabGeneralControl.isVisible() ) then - printlog( CFN & "ok" ) - hOpenPropertyBrowser() = true + '///+
  • Verify that the property browser is open
  • + kontext "ControlPropertiesTabControl" + if ( ControlPropertiesTabControl.exists( 2 ) ) then + + '///+
  • Activate General-tabpage
  • + ControlPropertiesTabControl.setPage( TabGeneralControl ) + + '///+
  • Verify that the General-tabpage is visible
  • + kontext "TabGeneralControl" + if ( TabGeneralControl.isVisible() ) then + printlog( CFN & "ok" ) + hOpenPropertyBrowser() = true + else + printlog( CFN & "General-tab is not visible." ) + hOpenPropertyBrowser() = false + endif else - printlog( CFN & "General-tab is not visible." ) - hOpenPropertyBrowser() = false - endif - else - printlog( CFN & "Could not open property browser" ) - hOpenPropertyBrowser() = false - endif + printlog( CFN & "Could not open property browser" ) + hOpenPropertyBrowser() = false + endif + catch + hOpenPropertyBrowser() = false + printlog( CFN & "Slot not available" ) + endcatch + '/// end function @@ -127,7 +133,7 @@ function hClosePropertyBrowser() as boolean '///+
  • Verify that the property browser is open
  • kontext "ControlPropertiesTabControl" - if ( ControlPropertiesTabControl.exists() ) then + if ( ControlPropertiesTabControl.exists( 1 ) ) then '///+
  • Execute the ContextProperties slot
  • ContextProperties @@ -183,9 +189,10 @@ function hPBSetControlName( cControl as string ) as boolean '///+
  • Set the new name
  • WaitSlot() + ' Name the control and append some Spaces which should be truncated. printlog( CFN & "Naming control: " & cControl ) NameText.setText( cControl ) - TabGeneralControl.typeKeys( "" ) + TabGeneralControl.typeKeys( " " ) WaitSlot() printlog( CFN & "Verifying rename..." ) diff --git a/testautomation/global/input/macros.txt b/testautomation/global/input/macros.txt index 45514c4a7059..d3f000e81d53 100755 --- a/testautomation/global/input/macros.txt +++ b/testautomation/global/input/macros.txt @@ -218,3 +218,4 @@ MsgBox ("Value : " & CDbl(v)) End Sub # ---------------------------------------------------------------------------- # + diff --git a/testautomation/global/required/includes/g_option.inc b/testautomation/global/required/includes/g_option.inc index fe3fb9b23236..5dc71a9f18cd 100755 --- a/testautomation/global/required/includes/g_option.inc +++ b/testautomation/global/required/includes/g_option.inc @@ -36,18 +36,15 @@ '* short description : update and resouce test for all option pages (at tools/options) '* '\*********************************************************************** + global sErrMes as String global iSectionNumber as Integer -'******************************************************************************* - sub tToolsOptionsTest dim sPreviousApplication as string sPreviousApplication = gApplication - ' Document- and database related options are placed in the g_option2.inc library - use "global\required\includes\g_option2.inc" ' subs and functions has been placed there use "global/tools/includes/required/t_option2.inc" @@ -70,33 +67,19 @@ sub tToolsOptionsTest Call tToolsOptionsImprovementProgram ' these tabpages only exist in the respective application - gApplication = "WRITER" - iSectionNumber = 8 - Call tToolsOptionsTextdocument - - gApplication = "HTML" - Call tToolsOptionsHTMLDocument - - gApplication = "CALC" - iSectionNumber = 7 - Call tToolsOptionsSpreadsheet - - gApplication = "IMPRESS" - iSectionNumber = 7 - Call tToolsOptionsPresentation - - gApplication = "DRAW" - iSectionNumber = 7 - Call tToolsOptionsDrawing - - gApplication = "MATH" - iSectionNumber = 7 - Call tToolsOptionsFormula + select case uCase(gApplication) + case "WRITER" : Call tToolsOptionsTextdocument + case "HTML" : Call tToolsOptionsHTMLDocument + case "CALC" : Call tToolsOptionsSpreadsheet + case "IMPRESS" : Call tToolsOptionsPresentation + case "DRAW" : Call tToolsOptionsDrawing + case "MATH" : Call tToolsOptionsFormula + end select gApplication = sPreviousApplication end sub -'******************************************************************************* +'------------------------------------------------------------------------- testcase tToolsOptionsStarOffice @@ -788,4 +771,669 @@ testcase tToolsOptionsImprovementProgram endcase +'------------------------------------------------------------------------- + +testcase tToolsOptionsTextdocument + dim EchteAnzahl as Integer, i as Integer + dim gefunden as Boolean + + PrintLog "- Tools/Options/Text document ( Extras/Optionen/Textdokument )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if + '/// Tools / Options / Text document + ToolsOptions + Kontext "Active" + if Active.Exists (3) then + if Active.GetText <> sErrMes then Warnlog "A messagebox exists => BUG : " + Active.GetText + Active.OK + end if + ToPosInOptionlist ( 4 ) + EchteAnzahl = Optionsliste.GetItemCount - iSectionNumber + if EchteAnzahl = 10 AND ( gAsianSup = TRUE OR gCTLSup = TRUE ) then + Warnlog "There are only 10 pages in 'text document'-section, but asian support or CTL support are activated! => a section is missing?" + else + printlog "Asian support and CTL support are not activated ( on languages-page )!" + end if + if bDebugVersion = TRUE then EchteAnzahl = EchteAnzahl - 1 + if gAsianSup = FALSE then EchteAnzahl = EchteAnzahl + 1 + if gCTLSup = FALSE then EchteAnzahl = EchteAnzahl + 1 + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + if gAsianSup = FALSE AND gCTLSup = FALSE AND i=6 then i=i+2 + if gAsianSup = FALSE AND gCTLSup = TRUE AND i=6 then i=i+1 + if gAsianSup = TRUE AND gCTLSup = FALSE AND i=7 then i=i+1 + select case i + case 1 : Kontext "TabLaden" + '///+
    • General
    • + printlog " - General / Allgemein" + if TabLaden.IsVisible then + gefunden = TRUE + Call DialogTest ( TabLaden ) + end if + case 2 : Kontext "TabInhalteWriter" + '///+
    • View
    • + printlog " - View / Ansicht" + if TabInhalteWriter.IsVisible then + gefunden = TRUE + Call DialogTest ( TabInhalteWriter ) + end if + case 3 : Kontext "TabDirektCursor" + '///+
    • Formating aids
    • + printlog " - Formating aids / Formatierungshilfen" + if TabDirektCursor.IsVisible then + gefunden = TRUE + Call DialogTest ( TabDirektCursor ) + end if + case 4 : Kontext "TabRaster" + '///+
    • Grid
    • + printlog " - Grid / Raster" + if TabRaster.IsVisible then + gefunden = TRUE + Call DialogTest ( TabRaster ) + end if + case 5 : Kontext "TabGrundschriften" + '///+
    • Default fonts
    • + printlog " - Default Fonts / Grundschriften" + if TabGrundschriften.IsVisible then + gefunden = TRUE + Call DialogTest ( TabGrundschriften ) + end if + case 6 : Kontext "TabGrundschriftenAsian" + '///+
    • Default fonts asian
    • + printlog " - Default Fonts Asian / Grundschriften Asiatisch" + if TabGrundschriftenAsian.IsVisible then + gefunden = TRUE + Call DialogTest ( TabGrundschriftenAsian ) + end if + case 7 : Kontext "TabGrundschriftenCTL" + '///+
    • Default fonts CTL
    • + printlog " - Default Fonts CTL / Grundschriften CTL" + if TabGrundschriftenCTL.IsVisible then + gefunden = TRUE + Call DialogTest ( TabGrundschriftenCTL ) + end if + case 8 : Kontext "TabDruckenWriter" + '///+
    • Print
    • + printlog " - Print / Drucken" + if TabDruckenWriter.IsVisible then + gefunden = TRUE + Call DialogTest ( TabDruckenWriter ) + end if + case 9 : Kontext "TabTabelleOptionen" + '///+
    • Table
    • + printlog " - Table / Tabellen" + if TabTabelleOptionen.IsVisible then + gefunden = TRUE + Call DialogTest ( TabTabelleOptionen ) + end if + case 10: Kontext "TabAenderungenWriter" + '///+
    • Changes
    • + printlog " - Changes / Aenderungen" + if TabAenderungenWriter.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAenderungenWriter ) + end if + case 11: Kontext "TabCompatibility" + '///+
    • Compatibility
    • + printlog " - Compatibility" + if TabCompatibility.IsVisible then + gefunden = TRUE + Call DialogTest ( TabCompatibility ) + end if + case 12: Kontext "TabAutoCaption" + '///+
    • AutoCaption
    • + printlog " - AutoCaption" + if TabAutoCaption.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAutoCaption ) + end if + case 13: Kontext "TabMailMergeEMail" + '///+
    • Mail Merge E-mail
    + printlog " - Mail Merge E-mail" + if TabMailMergeEMail.IsVisible then + gefunden = TRUE + Call DialogTest ( TabMailMergeEMail ) + ServerAuthentication.click + kontext "ServerAuthentication" + Call DialogTest ( ServerAuthentication ) + ServerAuthentication.cancel + Kontext "TabMailMergeEMail" + TestSettings.click + + ' in case java is not enabled + sleep( 2 ) + try + Kontext "Messagebox" + if ( MessageBox.exists()) then + sleep(2) + warnlog(Messagebox.GetText()) + try + Messagebox.Cancel() + sleep( 2 ) + catch + Messagebox.OK() ' if "OK" works, we are in an undefined state + warnlog( "" ) + endcatch + end if + catch + warnlog( "A messagebox was displayed but coul not be closed." ) + endcatch + + Kontext "TestaccountSettings" + Call DialogTest ( TestaccountSettings ) + TestaccountSettings.cancel + end if + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 12 then + i=13 + else + i=1-1 + end if + end if + next i +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel +'/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsHTMLDocument + dim EchteAnzahl as Integer, i as Integer + dim gefunden as Boolean + + PrintLog "- Tools/Options/HTML-Document ( Extras/Optionen/HTML-Dokument )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if + '/// Tools / options / HTML Document + ToolsOptions + ToPosInOptionlist ( 5 ) + i = 6 + if bDebugVersion = TRUE then i = i + 1 ' here exists the special debug-tabpage, too + EchteAnzahl = OptionTabPageZaehler (i) + if bDebugVersion = TRUE then EchteAnzahl = EchteAnzahl - 1 + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + select case i + case 1 : Kontext "TabInhalteHTML" + '/// View + printlog " - View / Ansicht" + if TabInhalteHTML.IsVisible then + gefunden = TRUE + Call DialogTest ( TabInhalteHTML ) + end if + case 2 : Kontext "TabDirektCursor" + '/// Formating aids + printlog " - Formatting aids / Formatierungshilfen" + if TabDirektCursor.IsVisible then + gefunden = TRUE + Call DialogTest ( TabDirektCursor ) + end if + case 3 : Kontext "TabRaster" + '/// Grid + printlog " - Grid / Raster" + if TabRaster.IsVisible then + gefunden = TRUE + Call DialogTest ( TabRaster ) + end if + case 4 : Kontext "TabDruckenHTML" + '/// Print + printlog " - Print / Drucken" + if TabDruckenHTML.IsVisible then + gefunden = TRUE + Call DialogTest ( TabDruckenHTML ) + end if + case 5 : Kontext "TabTabelleOptionen" + '/// Table + printlog " - Table / Tabelle" + if TabTabelleOptionen.IsVisible then + gefunden = TRUE + Call DialogTest ( TabTabelleOptionen ) + end if + case 6 : Kontext "TabHintergrund" + '/// Background + printlog " - Background / Hintergrund" + Sleep 1 + if TabHintergrund.IsVisible then + gefunden = TRUE + Call DialogTest ( TabHintergrund ) + end if + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 6 then + i=11 + else + i=1-1 + end if + end if + next i +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel +'/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsSpreadsheet + dim EchteAnzahl as Integer, i as Integer + dim gefunden as Boolean + + PrintLog "- Tools/Options/Spreadsheet ( Extras/Optionen/Tabellendokument )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if + '/// Tools / Options / Spreadsheet + ToolsOptions + ToPosInOptionlist ( 4 ) + EchteAnzahl = OptionTabPageZaehler ( 7, FALSE ) + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + select case i + case 1 : Kontext "TabLayoutCalc" + '/// General + printlog " - General / Allgemein" + if TabLayoutCalc.IsVisible then + gefunden = TRUE + Call DialogTest ( TabLayoutCalc ) + end if + case 2 : Kontext "TabInhaltCalc" + '/// View + printlog " - View / Ansicht" + if TabInhaltCalc.IsVisible then + gefunden = TRUE + Call DialogTest ( TabInhaltCalc ) + end if + case 3 : Kontext "TabBerechnen" + '/// Calculate + printlog " - Calculate / Berechnen" + if TabBerechnen.IsVisible then + gefunden = TRUE + Call DialogTest ( TabBerechnen ) + end if + case 4 : Kontext "TabSortierlisten" + '/// Sort lists + printlog " - Sort Lists / Sortierliste" + if TabSortierlisten.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSortierlisten ) + end if + case 5 : Kontext "TabAenderungenCalc" + '/// Changes + printlog " - Changes / Aenderungen" + if TabAenderungenCalc.IsVisible then + gefunden = TRUE + Call DialogTest ( TabAenderungenCalc ) + end if + case 6 : Kontext "TabRaster" + '/// Grid + printlog " - Grid / Raster" + if TabRaster.IsVisible then + gefunden = TRUE + Call DialogTest ( TabRaster ) + end if + case 7 : Kontext "TabPrintCalcOptions" + '/// Print + printlog " - Print / Drucken" + if TabPrintCalcOptions.IsVisible then + gefunden = TRUE + Call DialogTest ( TabPrintCalcOptions ) + end if + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 7 then + i=11 + else + i=1-1 + end if + end if + next i +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel +'/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsPresentation + dim EchteAnzahl as Integer, i as Integer + dim gefunden as Boolean + dim iTemp as integer + + PrintLog "- Tools/Options/Presentation ( Extras/Optionen/Praesentation )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if + kontext "DocumentImpress" + if DocumentImpress.exists(5) then + printlog " - An application of type Presentation is available." + '--- workaround #i48383# + DocumentImpress.MouseDown (10,10) + DocumentImpress.MouseUp (10,10) + else + qaErrorLog " - No application of type Presentation is available" + end if + '/// Tools / Options / Presentation + ToolsOptions + ToPosInOptionlist ( 4 ) + EchteAnzahl = OptionTabPageZaehler ( 4, FALSE ) + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + select case i + case 1 : Kontext "TabSonstigesDraw" + '/// General + printlog " - General / Allgemein" + if TabSonstigesDraw.exists then + if TabSonstigesDraw.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSonstigesDraw ) + end if + else + ' Trying to get root cause on some systems it seems the backing window is used. #i48383# + Kontext "OptionenDlg" + OptionenDlg.SnapShot convertPath(gOfficePath + "user/work/"+gApplication+".bmp") + qaErrorLog "#i48383# Trying to get root cause for wrong window; check picture: " + convertPath(gOfficePath + "user/work/"+gApplication+".bmp") + for iTemp = 1 to Optionsliste.getItemCount + qaErrorLog "" + iTemp + ": '" + Optionsliste.getItemText(iTemp) + "'" + next iTemp + gefunden = TRUE + end if + case 2 : Kontext "TabInhalteDraw" + '/// View + printlog " - View / Ansicht" + if TabInhalteDraw.IsVisible then + gefunden = TRUE + Call DialogTest ( TabInhalteDraw ) + end if + case 3 : Kontext "TabRaster" + '/// Grid + printlog " - Grid / Raster" + if TabRaster.IsVisible then + gefunden = TRUE + Call DialogTest ( TabRaster ) + end if + case 4 : Kontext "TabDruckenDraw" + '/// Print + printlog " - Print / Drucken" + if TabDruckenDraw.IsVisible then + gefunden = TRUE + Call DialogTest ( TabDruckenDraw ) + end if + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 4 then + i=11 + else + i=1-1 + end if + end if + next i +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel +'/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsDrawing + Dim EchteAnzahl as Integer, i as Integer + Dim gefunden as Boolean + + PrintLog "- Tools/Options/Drawing ( Extras/Optionen/Zeichnung )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + end if +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if + Kontext "DocumentDraw" + if DocumentDraw.exists(5) then + printlog " - An application of type Draw is available." + '--- workaround #i48383# + DocumentDraw.MouseDown (10,10) + DocumentDraw.MouseUp (10,10) + else + qaErrorLog " - No application of type Draw is available" + end if +'/// Tools / Options / Drawing + ToolsOptions + ToPosInOptionlist ( 4 ) + EchteAnzahl = OptionTabPageZaehler ( 4, FALSE ) + for i=1 to EchteAnzahl + gefunden = FALSE + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + select case i + case 1 : Kontext "TabSonstigesDraw" + '/// General + printlog " - General / Allgemein" + if TabSonstigesDraw.exists then + if TabSonstigesDraw.IsVisible then + gefunden = TRUE + Call DialogTest ( TabSonstigesDraw ) + end if + else + ' Trying to get root cause on some systems it seems the backing window is used. #i48383# + Kontext "OptionenDlg" + qaErrorLog "#i48383# wrong focus on opening options" + gefunden = TRUE + end if + case 2 : Kontext "TabInhalteDraw" + '/// View + printlog " - View / Ansicht" + if TabInhalteDraw.IsVisible then + gefunden = TRUE + Call DialogTest ( TabInhalteDraw ) + end if + case 3 : Kontext "Active" + if Active.Exists then + Warnlog "A messagebox exists => BUG : " + Active.GetText + try + Active.No + catch + Active.OK + endcatch + end if + Kontext "TabRaster" + '/// Grid + printlog " - Grid / Raster" + if TabRaster.IsVisible then + gefunden = TRUE + Call DialogTest ( TabRaster ) + end if + case 4 : Kontext "TabDruckenDraw" + '/// Print + printlog " - Print / Drucken" + if TabDruckenDraw.IsVisible then + gefunden = TRUE + Call DialogTest ( TabDruckenDraw ) + end if + end select + if gefunden=FALSE then + Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" + EchteAnzahl = EchteAnzahl - 1 + if EchteAnzahl < 4 then + i=11 + else + i=1-1 + end if + end if + next i +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel +'/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsFormula + dim EchteAnzahl as Integer, i as Integer + + PrintLog "- Tools/Options/Formula ( Extras/Optionen/Formel )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if +'/// Tools / Options / Formula + ToolsOptions + ToPosInOptionlist ( 4 ) + EchteAnzahl = OptionTabPageZaehler ( 1, FALSE ) + Kontext "OptionenDlg" + '/// Print + Optionsliste.TypeKeys "" + printlog " - Print / Drucken" + Kontext "TabDruckenMath" + Call DialogTest ( TabDruckenMath ) +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel +'/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsChart + Dim EchteAnzahl as Integer, i as Integer + + PrintLog "- Tools/Options/Chart ( Extras/Optionen/Diagramme )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif +'/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if +'/// Tools / Options / Chart + ToolsOptions + ToPosInOptionlist ( iSectionNumber -1 ) + EchteAnzahl = OptionTabPageZaehler ( 1, FALSE ) + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" +'/// Default colors + printlog " - Default Colors / Grundfarben" + Kontext "TabGrundfarben" + Call DialogTest ( TabGrundfarben ) +'/// Close the options dialog + Kontext "OptionenDlg" + OptionenDlg.Cancel + if gApplication <> "BACKGROUND" then +'/// Close bthe document + Call hCloseDocument + end if +endcase + +'------------------------------------------------------------------------- + +testcase tToolsOptionsDataSources + Dim EchteAnzahl as Integer, i as Integer + + PrintLog "- Tools/Options/Data Sources ( Extras/Optionen/Datenbank )" + if (0 = iSectionNumber) then + warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" + goto endsub + endif + '/// Create a new document + if gApplication <> "BACKGROUND" then + Call hNewDocument + end if + '/// Tools / Options / Data source + ToolsOptions + ToPosInOptionlist ( iSectionNumber -2) + EchteAnzahl = OptionTabPageZaehler ( 2 , FALSE ) + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + printlog " - Connections / Verbindungen" + Kontext "TabConnections" + '/// Connections + Call DialogTest ( TabConnections ) + Kontext "OptionenDlg" + Optionsliste.TypeKeys "" + printlog " - Databases / Datenbanken" + Kontext "TabRegisteredDatabase" + '/// Databases + Call DialogTest ( TabRegisteredDatabase ) + NewBtn.click + Kontext "CreateDatabaseLink" + call DialogTest( CreateDatabaseLink ) + Browse.click + Kontext "OeffnenDlg" + OeffnenDlg.cancel + Kontext "CreateDatabaseLink" + CreateDatabaseLink.cancel + Kontext "OptionenDlg" + '/// Close the options dialog + OptionenDlg.Cancel + '/// Close the document + if gApplication <> "BACKGROUND" then + Call hCloseDocument + end if +endcase diff --git a/testautomation/global/required/includes/g_option2.inc b/testautomation/global/required/includes/g_option2.inc deleted file mode 100644 index 83d666e1adfd..000000000000 --- a/testautomation/global/required/includes/g_option2.inc +++ /dev/null @@ -1,714 +0,0 @@ -'encoding UTF-8 Do not remove or change this line! -'************************************************************************** -'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -'* -'* Copyright 2008 by Sun Microsystems, Inc. -'* -'* OpenOffice.org - a multi-platform office productivity suite -'* -'* $RCSfile: g_option2.inc,v $ -'* -'* $Revision: 1.1 $ -'* -'* last change: $Author: jsi $ $Date: 2008-06-13 10:27:04 $ -'* -'* This file is part of OpenOffice.org. -'* -'* OpenOffice.org is free software: you can redistribute it and/or modify -'* it under the terms of the GNU Lesser General Public License version 3 -'* only, as published by the Free Software Foundation. -'* -'* OpenOffice.org is distributed in the hope that it will be useful, -'* but WITHOUT ANY WARRANTY; without even the implied warranty of -'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -'* GNU Lesser General Public License version 3 for more details -'* (a copy is included in the LICENSE file that accompanied this code). -'* -'* You should have received a copy of the GNU Lesser General Public License -'* version 3 along with OpenOffice.org. If not, see -'* -'* for a copy of the LGPLv3 License. -'* -'/************************************************************************ -'* -'* owner : thorsten.bosbach@sun.com -'* -'* short description : update and resouce test for all option pages (at tools/options) -'* -'************************************************************************ -'* -' #1 tToolsOptionsTextdocument -' #1 tToolsOptionsHTMLDocument -' #1 tToolsOptionsSpreadsheet -' #1 tToolsOptionsPresentation -' #1 tToolsOptionsDrawing -' #1 tToolsOptionsFormula -' #1 tToolsOptionsChart -' #1 tToolsOptionsDataSources -'* -'\*********************************************************************** - -testcase tToolsOptionsTextdocument - dim EchteAnzahl as Integer, i as Integer - dim gefunden as Boolean - - PrintLog "- Tools/Options/Text document ( Extras/Optionen/Textdokument )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if - '/// Tools / Options / Text document - ToolsOptions - Kontext "Active" - if Active.Exists (3) then - if Active.GetText <> sErrMes then Warnlog "A messagebox exists => BUG : " + Active.GetText - Active.OK - end if - ToPosInOptionlist ( 4 ) - EchteAnzahl = Optionsliste.GetItemCount - iSectionNumber - if EchteAnzahl = 10 AND ( gAsianSup = TRUE OR gCTLSup = TRUE ) then - Warnlog "There are only 10 pages in 'text document'-section, but asian support or CTL support are activated! => a section is missing?" - else - printlog "Asian support and CTL support are not activated ( on languages-page )!" - end if - if bDebugVersion = TRUE then EchteAnzahl = EchteAnzahl - 1 - if gAsianSup = FALSE then EchteAnzahl = EchteAnzahl + 1 - if gCTLSup = FALSE then EchteAnzahl = EchteAnzahl + 1 - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - if gAsianSup = FALSE AND gCTLSup = FALSE AND i=6 then i=i+2 - if gAsianSup = FALSE AND gCTLSup = TRUE AND i=6 then i=i+1 - if gAsianSup = TRUE AND gCTLSup = FALSE AND i=7 then i=i+1 - select case i - case 1 : Kontext "TabLaden" - '///+
    • General
    • - printlog " - General / Allgemein" - if TabLaden.IsVisible then - gefunden = TRUE - Call DialogTest ( TabLaden ) - end if - case 2 : Kontext "TabInhalteWriter" - '///+
    • View
    • - printlog " - View / Ansicht" - if TabInhalteWriter.IsVisible then - gefunden = TRUE - Call DialogTest ( TabInhalteWriter ) - end if - case 3 : Kontext "TabDirektCursor" - '///+
    • Formating aids
    • - printlog " - Formating aids / Formatierungshilfen" - if TabDirektCursor.IsVisible then - gefunden = TRUE - Call DialogTest ( TabDirektCursor ) - end if - case 4 : Kontext "TabRaster" - '///+
    • Grid
    • - printlog " - Grid / Raster" - if TabRaster.IsVisible then - gefunden = TRUE - Call DialogTest ( TabRaster ) - end if - case 5 : Kontext "TabGrundschriften" - '///+
    • Default fonts
    • - printlog " - Default Fonts / Grundschriften" - if TabGrundschriften.IsVisible then - gefunden = TRUE - Call DialogTest ( TabGrundschriften ) - end if - case 6 : Kontext "TabGrundschriftenAsian" - '///+
    • Default fonts asian
    • - printlog " - Default Fonts Asian / Grundschriften Asiatisch" - if TabGrundschriftenAsian.IsVisible then - gefunden = TRUE - Call DialogTest ( TabGrundschriftenAsian ) - end if - case 7 : Kontext "TabGrundschriftenCTL" - '///+
    • Default fonts CTL
    • - printlog " - Default Fonts CTL / Grundschriften CTL" - if TabGrundschriftenCTL.IsVisible then - gefunden = TRUE - Call DialogTest ( TabGrundschriftenCTL ) - end if - case 8 : Kontext "TabDruckenWriter" - '///+
    • Print
    • - printlog " - Print / Drucken" - if TabDruckenWriter.IsVisible then - gefunden = TRUE - Call DialogTest ( TabDruckenWriter ) - end if - case 9 : Kontext "TabTabelleOptionen" - '///+
    • Table
    • - printlog " - Table / Tabellen" - if TabTabelleOptionen.IsVisible then - gefunden = TRUE - Call DialogTest ( TabTabelleOptionen ) - end if - case 10: Kontext "TabAenderungenWriter" - '///+
    • Changes
    • - printlog " - Changes / Aenderungen" - if TabAenderungenWriter.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAenderungenWriter ) - end if - case 11: Kontext "TabCompatibility" - '///+
    • Compatibility
    • - printlog " - Compatibility" - if TabCompatibility.IsVisible then - gefunden = TRUE - Call DialogTest ( TabCompatibility ) - end if - case 12: Kontext "TabAutoCaption" - '///+
    • AutoCaption
    • - printlog " - AutoCaption" - if TabAutoCaption.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAutoCaption ) - end if - case 13: Kontext "TabMailMergeEMail" - '///+
    • Mail Merge E-mail
    - printlog " - Mail Merge E-mail" - if TabMailMergeEMail.IsVisible then - gefunden = TRUE - Call DialogTest ( TabMailMergeEMail ) - ServerAuthentication.click - kontext "ServerAuthentication" - Call DialogTest ( ServerAuthentication ) - ServerAuthentication.cancel - Kontext "TabMailMergeEMail" - TestSettings.click - - ' in case java is not enabled - sleep( 2 ) - try - Kontext "Messagebox" - if ( MessageBox.exists()) then - sleep(2) - warnlog(Messagebox.GetText()) - try - Messagebox.Cancel() - sleep( 2 ) - catch - Messagebox.OK() ' if "OK" works, we are in an undefined state - warnlog( "" ) - endcatch - end if - catch - warnlog( "A messagebox was displayed but coul not be closed." ) - endcatch - - Kontext "TestaccountSettings" - Call DialogTest ( TestaccountSettings ) - TestaccountSettings.cancel - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 12 then - i=13 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - -testcase tToolsOptionsHTMLDocument - dim EchteAnzahl as Integer, i as Integer - dim gefunden as Boolean - - PrintLog "- Tools/Options/HTML-Document ( Extras/Optionen/HTML-Dokument )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if - '/// Tools / options / HTML Document - ToolsOptions - ToPosInOptionlist ( 5 ) - i = 6 - if bDebugVersion = TRUE then i = i + 1 ' here exists the special debug-tabpage, too - EchteAnzahl = OptionTabPageZaehler (i) - if bDebugVersion = TRUE then EchteAnzahl = EchteAnzahl - 1 - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - select case i - case 1 : Kontext "TabInhalteHTML" - '/// View - printlog " - View / Ansicht" - if TabInhalteHTML.IsVisible then - gefunden = TRUE - Call DialogTest ( TabInhalteHTML ) - end if - case 2 : Kontext "TabDirektCursor" - '/// Formating aids - printlog " - Formatting aids / Formatierungshilfen" - if TabDirektCursor.IsVisible then - gefunden = TRUE - Call DialogTest ( TabDirektCursor ) - end if - case 3 : Kontext "TabRaster" - '/// Grid - printlog " - Grid / Raster" - if TabRaster.IsVisible then - gefunden = TRUE - Call DialogTest ( TabRaster ) - end if - case 4 : Kontext "TabDruckenHTML" - '/// Print - printlog " - Print / Drucken" - if TabDruckenHTML.IsVisible then - gefunden = TRUE - Call DialogTest ( TabDruckenHTML ) - end if - case 5 : Kontext "TabTabelleOptionen" - '/// Table - printlog " - Table / Tabelle" - if TabTabelleOptionen.IsVisible then - gefunden = TRUE - Call DialogTest ( TabTabelleOptionen ) - end if - case 6 : Kontext "TabHintergrund" - '/// Background - printlog " - Background / Hintergrund" - Sleep 1 - if TabHintergrund.IsVisible then - gefunden = TRUE - Call DialogTest ( TabHintergrund ) - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 6 then - i=11 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - -testcase tToolsOptionsSpreadsheet - dim EchteAnzahl as Integer, i as Integer - dim gefunden as Boolean - - PrintLog "- Tools/Options/Spreadsheet ( Extras/Optionen/Tabellendokument )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if - '/// Tools / Options / Spreadsheet - ToolsOptions - ToPosInOptionlist ( 4 ) - EchteAnzahl = OptionTabPageZaehler ( 7, FALSE ) - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - select case i - case 1 : Kontext "TabLayoutCalc" - '/// General - printlog " - General / Allgemein" - if TabLayoutCalc.IsVisible then - gefunden = TRUE - Call DialogTest ( TabLayoutCalc ) - end if - case 2 : Kontext "TabInhaltCalc" - '/// View - printlog " - View / Ansicht" - if TabInhaltCalc.IsVisible then - gefunden = TRUE - Call DialogTest ( TabInhaltCalc ) - end if - case 3 : Kontext "TabBerechnen" - '/// Calculate - printlog " - Calculate / Berechnen" - if TabBerechnen.IsVisible then - gefunden = TRUE - Call DialogTest ( TabBerechnen ) - end if - case 4 : Kontext "TabSortierlisten" - '/// Sort lists - printlog " - Sort Lists / Sortierliste" - if TabSortierlisten.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSortierlisten ) - end if - case 5 : Kontext "TabAenderungenCalc" - '/// Changes - printlog " - Changes / Aenderungen" - if TabAenderungenCalc.IsVisible then - gefunden = TRUE - Call DialogTest ( TabAenderungenCalc ) - end if - case 6 : Kontext "TabRaster" - '/// Grid - printlog " - Grid / Raster" - if TabRaster.IsVisible then - gefunden = TRUE - Call DialogTest ( TabRaster ) - end if - case 7 : Kontext "TabPrintCalcOptions" - '/// Print - printlog " - Print / Drucken" - if TabPrintCalcOptions.IsVisible then - gefunden = TRUE - Call DialogTest ( TabPrintCalcOptions ) - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 7 then - i=11 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - -testcase tToolsOptionsPresentation - dim EchteAnzahl as Integer, i as Integer - dim gefunden as Boolean - dim iTemp as integer - - PrintLog "- Tools/Options/Presentation ( Extras/Optionen/Praesentation )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if - kontext "DocumentImpress" - if DocumentImpress.exists(5) then - printlog " - An application of type Presentation is available." - '--- workaround #i48383# - DocumentImpress.MouseDown (10,10) - DocumentImpress.MouseUp (10,10) - else - qaErrorLog " - No application of type Presentation is available" - end if - '/// Tools / Options / Presentation - ToolsOptions - ToPosInOptionlist ( 4 ) - EchteAnzahl = OptionTabPageZaehler ( 4, FALSE ) - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - select case i - case 1 : Kontext "TabSonstigesDraw" - '/// General - printlog " - General / Allgemein" - if TabSonstigesDraw.exists then - if TabSonstigesDraw.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSonstigesDraw ) - end if - else - ' Trying to get root cause on some systems it seems the backing window is used. #i48383# - Kontext "OptionenDlg" - OptionenDlg.SnapShot convertPath(gOfficePath + "user/work/"+gApplication+".bmp") - qaErrorLog "#i48383# Trying to get root cause for wrong window; check picture: " + convertPath(gOfficePath + "user/work/"+gApplication+".bmp") - for iTemp = 1 to Optionsliste.getItemCount - qaErrorLog "" + iTemp + ": '" + Optionsliste.getItemText(iTemp) + "'" - next iTemp - gefunden = TRUE - end if - case 2 : Kontext "TabInhalteDraw" - '/// View - printlog " - View / Ansicht" - if TabInhalteDraw.IsVisible then - gefunden = TRUE - Call DialogTest ( TabInhalteDraw ) - end if - case 3 : Kontext "TabRaster" - '/// Grid - printlog " - Grid / Raster" - if TabRaster.IsVisible then - gefunden = TRUE - Call DialogTest ( TabRaster ) - end if - case 4 : Kontext "TabDruckenDraw" - '/// Print - printlog " - Print / Drucken" - if TabDruckenDraw.IsVisible then - gefunden = TRUE - Call DialogTest ( TabDruckenDraw ) - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 4 then - i=11 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - -testcase tToolsOptionsDrawing - Dim EchteAnzahl as Integer, i as Integer - Dim gefunden as Boolean - - PrintLog "- Tools/Options/Drawing ( Extras/Optionen/Zeichnung )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - end if -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if - Kontext "DocumentDraw" - if DocumentDraw.exists(5) then - printlog " - An application of type Draw is available." - '--- workaround #i48383# - DocumentDraw.MouseDown (10,10) - DocumentDraw.MouseUp (10,10) - else - qaErrorLog " - No application of type Draw is available" - end if -'/// Tools / Options / Drawing - ToolsOptions - ToPosInOptionlist ( 4 ) - EchteAnzahl = OptionTabPageZaehler ( 4, FALSE ) - for i=1 to EchteAnzahl - gefunden = FALSE - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - select case i - case 1 : Kontext "TabSonstigesDraw" - '/// General - printlog " - General / Allgemein" - if TabSonstigesDraw.exists then - if TabSonstigesDraw.IsVisible then - gefunden = TRUE - Call DialogTest ( TabSonstigesDraw ) - end if - else - ' Trying to get root cause on some systems it seems the backing window is used. #i48383# - Kontext "OptionenDlg" - qaErrorLog "#i48383# wrong focus on opening options" - gefunden = TRUE - end if - case 2 : Kontext "TabInhalteDraw" - '/// View - printlog " - View / Ansicht" - if TabInhalteDraw.IsVisible then - gefunden = TRUE - Call DialogTest ( TabInhalteDraw ) - end if - case 3 : Kontext "Active" - if Active.Exists then - Warnlog "A messagebox exists => BUG : " + Active.GetText - try - Active.No - catch - Active.OK - endcatch - end if - Kontext "TabRaster" - '/// Grid - printlog " - Grid / Raster" - if TabRaster.IsVisible then - gefunden = TRUE - Call DialogTest ( TabRaster ) - end if - case 4 : Kontext "TabDruckenDraw" - '/// Print - printlog " - Print / Drucken" - if TabDruckenDraw.IsVisible then - gefunden = TRUE - Call DialogTest ( TabDruckenDraw ) - end if - end select - if gefunden=FALSE then - Warnlog "Error with the " + i + ".page, perhaps this page is deleted or change the place!" - EchteAnzahl = EchteAnzahl - 1 - if EchteAnzahl < 4 then - i=11 - else - i=1-1 - end if - end if - next i -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - -testcase tToolsOptionsFormula - dim EchteAnzahl as Integer, i as Integer - - PrintLog "- Tools/Options/Formula ( Extras/Optionen/Formel )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if -'/// Tools / Options / Formula - ToolsOptions - ToPosInOptionlist ( 4 ) - EchteAnzahl = OptionTabPageZaehler ( 1, FALSE ) - Kontext "OptionenDlg" - '/// Print - Optionsliste.TypeKeys "" - printlog " - Print / Drucken" - Kontext "TabDruckenMath" - Call DialogTest ( TabDruckenMath ) -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel -'/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase -'------------------------------------------------------------------------- -testcase tToolsOptionsChart - Dim EchteAnzahl as Integer, i as Integer - - PrintLog "- Tools/Options/Chart ( Extras/Optionen/Diagramme )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif -'/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if -'/// Tools / Options / Chart - ToolsOptions - ToPosInOptionlist ( iSectionNumber -1 ) - EchteAnzahl = OptionTabPageZaehler ( 1, FALSE ) - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" -'/// Default colors - printlog " - Default Colors / Grundfarben" - Kontext "TabGrundfarben" - Call DialogTest ( TabGrundfarben ) -'/// Close the options dialog - Kontext "OptionenDlg" - OptionenDlg.Cancel - if gApplication <> "BACKGROUND" then -'/// Close bthe document - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - -testcase tToolsOptionsDataSources - Dim EchteAnzahl as Integer, i as Integer - - PrintLog "- Tools/Options/Data Sources ( Extras/Optionen/Datenbank )" - if (0 = iSectionNumber) then - warnlog "You can't run this testcase seperated! Ending now! Please run it via: tToolsOptionsTest" - goto endsub - endif - '/// Create a new document - if gApplication <> "BACKGROUND" then - Call hNewDocument - end if - '/// Tools / Options / Data source - ToolsOptions - ToPosInOptionlist ( iSectionNumber -2) - EchteAnzahl = OptionTabPageZaehler ( 2 , FALSE ) - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - printlog " - Connections / Verbindungen" - Kontext "TabConnections" - '/// Connections - Call DialogTest ( TabConnections ) - Kontext "OptionenDlg" - Optionsliste.TypeKeys "" - printlog " - Databases / Datenbanken" - Kontext "TabRegisteredDatabase" - '/// Databases - Call DialogTest ( TabRegisteredDatabase ) - NewBtn.click - Kontext "CreateDatabaseLink" - call DialogTest( CreateDatabaseLink ) - Browse.click - Kontext "OeffnenDlg" - OeffnenDlg.cancel - Kontext "CreateDatabaseLink" - CreateDatabaseLink.cancel - Kontext "OptionenDlg" - '/// Close the options dialog - OptionenDlg.Cancel - '/// Close the document - if gApplication <> "BACKGROUND" then - Call hCloseDocument - end if -endcase - -'------------------------------------------------------------------------- - diff --git a/testautomation/global/tools/includes/required/t_dir.inc b/testautomation/global/tools/includes/required/t_dir.inc index ca88c6eda974..31f9bc210a34 100755 --- a/testautomation/global/tools/includes/required/t_dir.inc +++ b/testautomation/global/tools/includes/required/t_dir.inc @@ -180,23 +180,27 @@ function GetDirList ( sPath$, sMatch$ ,lsFile() as String ) as integer '/// Get Subdirectories from a directory and append them to a list (with path) '/// Input: Directory with complete path; Search Pattern, e.g *; List '/// Return: count of appended entries; updated list - Dim Count% - Dim i as Integer - Dim Verzeichnis as String + Dim iFolderCount as integer + Dim Folder as String ' at the end of the string has to be teh path seperator, else the dir-command doesn't work if right ( sPath$, 1 ) <> gPathSigne then sPath$ = sPath$ + gPathSigne - Verzeichnis = app.Dir( sPath$ + sMatch$ , 16) - Count% = 0 + Folder = app.Dir( sPath$ + sMatch$ , 16) + iFolderCount = 0 - do until Len(Verzeichnis) = 0 - if Verzeichnis <> "." AND Verzeichnis <> ".." AND Lcase(Verzeichnis) <> ".svn" then + do until Len( Folder ) = 0 + select case ( lcase( Folder ) ) + case "." + case ".." + case ".svn" + case ".hg" + case else lsFile(0) = Val(lsFile(0)) + 1 - lsFile( lsFile(0) ) = sPath$ + Verzeichnis + gPathSigne - Count% = Count% + 1 - end if - Verzeichnis = app.Dir + lsFile( lsFile(0) ) = sPath$ + Folder + gPathSigne + iFolderCount = iFolderCount + 1 + end select + Folder = app.Dir loop - GetDirList = Count% + GetDirList = iFolderCount end function ' '------------------------------------------------------------------------------- diff --git a/testautomation/global/tools/includes/required/t_files.inc b/testautomation/global/tools/includes/required/t_files.inc index d103428d4d6c..7d81f7b565fb 100755 --- a/testautomation/global/tools/includes/required/t_files.inc +++ b/testautomation/global/tools/includes/required/t_files.inc @@ -442,7 +442,7 @@ function hExportAsPDFmulti (iTypeOfCall as integer, bExecute as boolean, sFileNa endif '/// click on the button 'Export...' ///' if (bExecute) then - Export.Click + speichern.Click kontext "AlienWarning" if AlienWarning.exists(5) then warnlog "#i41983# Alien Warning on export not allowed." @@ -567,8 +567,8 @@ function hExportAsPDFmulti (iTypeOfCall as integer, bExecute as boolean, sFileNa end if end if ' only if the type is 1 OR 3 then the File Save dialog appear + kontext "ExportierenDLG" if (iTypeOfCall = 1 OR iTypeOfCall = 3) then - kontext "ExportierenDLG" if ExportierenDLG.exists(5) then try Dateityp.Select sPDF @@ -610,7 +610,11 @@ function hExportAsPDFmulti (iTypeOfCall as integer, bExecute as boolean, sFileNa wEnd endif else + try ExportierenDLG.Cancel + catch + printlog "export not there" + endcatch end if ' if file exists, there is a message... diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win index 21175f97bebb..0d64547f5e0a 100755 --- a/testautomation/global/win/dial_d_h.win +++ b/testautomation/global/win/dial_d_h.win @@ -253,14 +253,14 @@ PopuplisteRechts sfx2:ListBox:DLG_ORGANIZE:LB_RIGHT_TYP AddressBook sfx2:PushButton:DLG_ORGANIZE:BTN_ADDRESSTEMPLATE *EinfuegenSpalten FN_TABLE_INSERT_COL_DLG -Anzahl sw:NumericField:DLG_INS_ROW_COL:ED_COUNT -Davor sw:RadioButton:DLG_INS_ROW_COL:CB_POS_BEFORE -Dahinter sw:RadioButton:DLG_INS_ROW_COL:CB_POS_AFTER +Anzahl svx:NumericField:DLG_INS_ROW_COL:ED_COUNT +Davor svx:RadioButton:DLG_INS_ROW_COL:CB_POS_BEFORE +Dahinter svx:RadioButton:DLG_INS_ROW_COL:CB_POS_AFTER *EinfuegenZeilen FN_TABLE_INSERT_ROW_DLG -Anzahl sw:NumericField:DLG_INS_ROW_COL:ED_COUNT -Davor sw:RadioButton:DLG_INS_ROW_COL:CB_POS_BEFORE -Dahinter sw:RadioButton:DLG_INS_ROW_COL:CB_POS_AFTER +Anzahl svx:NumericField:DLG_INS_ROW_COL:ED_COUNT +Davor svx:RadioButton:DLG_INS_ROW_COL:CB_POS_BEFORE +Dahinter svx:RadioButton:DLG_INS_ROW_COL:CB_POS_AFTER *EbeneEinfuegenDlg SID_INSERTLAYER EbenenName sd:Edit:DLG_INSERT_LAYER:EDT_NAME diff --git a/testautomation/global/win/edia_i_o.win b/testautomation/global/win/edia_i_o.win index 47031e0c0e31..569012019ec0 100755 --- a/testautomation/global/win/edia_i_o.win +++ b/testautomation/global/win/edia_i_o.win @@ -303,3 +303,8 @@ OleDatei svx:EDIT:MD_INSERT_OLEOBJECT:ED_FILEPATH Verknuepfen svx:CHECKBOX:MD_INSERT_OLEOBJECT:CB_FILELINK Durchsuchen svx:PUSHBUTTON:MD_INSERT_OLEOBJECT:BTN_FILEPATH +*InsertTableImpress svx:ModalDialog:RID_SVX_NEWTABLE_DLG +NumberOfColumns svx:NumericField:RID_SVX_NEWTABLE_DLG:NF_COLUMNS +NumberOfRows svx:NumericField:RID_SVX_NEWTABLE_DLG:NF_ROWS + +*TableDesign sd:ModalDialog:DLG_TABLEDESIGNPANE diff --git a/testautomation/global/win/edia_p_s.win b/testautomation/global/win/edia_p_s.win index 0825b223f7cc..ea5e9cf266db 100755 --- a/testautomation/global/win/edia_p_s.win +++ b/testautomation/global/win/edia_p_s.win @@ -41,7 +41,7 @@ TransitionEffects filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTBOOKMARKS FormsFormat filter:ListBox:RID_PDF_TAB_GENER:LB_FORMSFORMAT ExportBlankPages filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES -*PDFOptionsInitialView PDF1TBO +*PDFOptionsInitialView HID_FILTER_PDF_INITIAL_VIEW PageOnly filter:RadioButton:RID_PDF_TAB_OPNFTR:RB_OPNMODE_PAGEONLY BookmarksAndPage filter:RadioButton:RID_PDF_TAB_OPNFTR:RB_OPNMODE_OUTLINE ThumbnailsAndPage filter:RadioButton:RID_PDF_TAB_OPNFTR:RB_OPNMODE_THUMBS @@ -54,7 +54,7 @@ SinglePage filter:RadioButton:RID_PDF_TAB_OPNFTR:RB_PGLY_SINGPG Continuous filter:RadioButton:RID_PDF_TAB_OPNFTR:RB_PGLY_CONT ContinuousFacing filter:RadioButton:RID_PDF_TAB_OPNFTR:RB_PGLY_CONTFAC -*PDFOptionsUserInterface PDF2TBO +*PDFOptionsUserInterface HID_FILTER_PDF_USER_INTERFACE ResizeWindow filter:CheckBox:RID_PDF_TAB_VPREFER:CB_WNDOPT_RESINIT CenterWindow filter:CheckBox:RID_PDF_TAB_VPREFER:CB_WNDOPT_CNTRWIN OpenInFullscreen filter:CheckBox:RID_PDF_TAB_VPREFER:CB_WNDOPT_OPNFULL @@ -71,15 +71,6 @@ Currency HID_DLGDEPOT_LSTMARKETS OKButton HID_DLGDEPOT_0_CMDGOON_HISTORY CancelButton HID_DLGDEPOT_0_CMDCANCEL_HISTORY -*PurchaseStarOffice HID_LICENSING_DIALOG -TabPurchase HID_TP_PURCHASE -getSerialNumber tab:PushButton:TP_PURCHASE:PB_PURCHASE_GET -TabUnlockStarOffice HID_TP_UNLOCK -SerialNumberA tab:Edit:TP_UNLOCK:ED_UNLOCK_A -SerialNumberB tab:Edit:TP_UNLOCK:ED_UNLOCK_B -SerialNumberC tab:Edit:TP_UNLOCK:ED_UNLOCK_C -TabSummary HID_TP_SUMMARY - *QueryEditWindow HID_CTL_QRYSQLEDIT *QueryDesignTable HID_CTL_QRYDGNTAB @@ -393,6 +384,10 @@ SolverSettingsEdit sc:PushButton:RID_SCDLG_SOLVEROPTIONS:BTN_EDIT *SolverEditSetting HID_SC_SOLVER_INTEGER SolverNumeric sc:NumericField:RID_SCDLG_SOLVER_INTEGER:NF_VALUE +*SolvingResult HID_SC_SOLVER_SUCCESS + +*NoSolution HID_SC_SOLVER_NOSOLUTION + *SortOrder HID_DLG_ORDERCRIT Fieldname1 dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD1 Order1 dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE1 diff --git a/testautomation/global/win/etab_a_d.win b/testautomation/global/win/etab_a_d.win index 93ee44581331..3c84eb9ef9ae 100755 --- a/testautomation/global/win/etab_a_d.win +++ b/testautomation/global/win/etab_a_d.win @@ -405,7 +405,7 @@ DataSource HID_PROP_DATASOURCE ContentType HID_PROP_CURSORSOURCETYPE Content HID_PROP_CURSORSOURCE AnalyzeSQLCommand HID_PROP_ESCAPE_PROCESSING -Filter HID_PROP_FILTER_CRITERIA +Filter HID_PROP_FILTER FilterDLGButton UID_PROP_DLG_FILTER Sort HID_PROP_SORT_CRITERIA AllowAdditions HID_PROP_ALLOW_ADDITIONS diff --git a/testautomation/global/win/reportdesigner.win b/testautomation/global/win/reportdesigner.win index b57e66bcdc3e..f5e0baccf1ba 100755 --- a/testautomation/global/win/reportdesigner.win +++ b/testautomation/global/win/reportdesigner.win @@ -71,7 +71,7 @@ ContentType HID_PROP_CURSORSOURCETYPE Content HID_PROP_CURSORSOURCE OpenQueryDesign UID_PROP_DLG_SQLCOMMAND AnalyzeSQLCommand HID_PROP_ESCAPE_PROCESSING -Filter HID_PROP_FILTER_CRITERIA +Filter HID_PROP_FILTER FilterDLGButton UID_PROP_DLG_FILTER DataField HID_RPT_PROP_DATAFIELD OpenFormularWizard UID_RPT_PROP_FORMULA diff --git a/testautomation/global/win/tab_a_d.win b/testautomation/global/win/tab_a_d.win index d97b2423c1e1..fbcba2599a74 100755 --- a/testautomation/global/win/tab_a_d.win +++ b/testautomation/global/win/tab_a_d.win @@ -58,6 +58,8 @@ IconsInMenueAnzeigen svx:ListBox:OFA_TP_VIEW:LB_MENU_ICONS MausAktion svx:ListBox:OFA_TP_VIEW:LB_MOUSEMIDDLE MousePositioning svx:ListBox:OFA_TP_VIEW:LB_MOUSEPOS UseSystemFont svx:CheckBox:OFA_TP_VIEW:CB_SYSTEM_FONT +Transparency svx:CheckBox:OFA_TP_VIEW:CB_SELECTION +SelectionOpacity svx:MetricField:OFA_TP_VIEW:MF_SELECTION *TabAusnahmen HID_OFAPAGE_AUTOCORR_EXCEPT Abkuerzungen svx:Edit:RID_OFAPAGE_AUTOCORR_EXCEPT:ED_ABBREV diff --git a/testautomation/graphics/optional/g_tables.bas b/testautomation/graphics/optional/g_tables.bas index 0ebad8bc7506..261c018248f3 100755 --- a/testautomation/graphics/optional/g_tables.bas +++ b/testautomation/graphics/optional/g_tables.bas @@ -54,7 +54,7 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" call tiInsertTableUsingMenu - call tiInsertTableUsingButton + call tiInsertTableUsingToolbarbutton call tiTableObjectBar call hStatusOut diff --git a/testautomation/graphics/optional/gallery.bas b/testautomation/graphics/optional/gallery.bas index 81b97beb68da..433069691dff 100755 --- a/testautomation/graphics/optional/gallery.bas +++ b/testautomation/graphics/optional/gallery.bas @@ -43,7 +43,7 @@ sub main call hStatusIn ( "Graphics", "gallery.bas") use "graphics\tools\id_tools_2.inc" - use "graphics\required\includes\global\gallery.inc" + use "graphics\optional\includes\global\gallery.inc" printlog "------------------------ F u n c t i o n a l i t y ----------------------" call tGallery_DialogTest ' open gallery, pin - unpin, dock - undock, close gallery diff --git a/testautomation/graphics/optional/gallery2.bas b/testautomation/graphics/optional/gallery2.bas index d8f5be67daca..ebecd8eba567 100755 --- a/testautomation/graphics/optional/gallery2.bas +++ b/testautomation/graphics/optional/gallery2.bas @@ -43,7 +43,7 @@ sub main use "graphics\tools\id_tools.inc" use "graphics\tools\id_tools_2.inc" - use "graphics\required\includes\global\gallery2.inc" + use "graphics\optional\includes\global\gallery2.inc" printlog "------------------------------- T h e m e s -----------------------------" call tSettingsToCM diff --git a/testautomation/graphics/optional/includes/global/g_export_html.inc b/testautomation/graphics/optional/includes/global/g_export_html.inc index e35a94da89f9..978172e747c5 100755 --- a/testautomation/graphics/optional/includes/global/g_export_html.inc +++ b/testautomation/graphics/optional/includes/global/g_export_html.inc @@ -50,7 +50,7 @@ testcase tHtmlExport dim sTemp as string dim sFile as string - '/// open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' ///' + printlog "open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' " ToolsOptions hToolsOptions ("STAROFFICE","USERDATA") VorName.SetText "Garfield" @@ -59,7 +59,7 @@ testcase tHtmlExport Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - '/// create directory if not exists and delete the content, if exists user\\work\\html\\ ///' + printlog "create directory if not exists and delete the content, if exists user\\work\\html\\ " app.mkDir ((ConvertPath (gOfficePath + "user\work\html\")) Liste(0) = 0 GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) @@ -69,43 +69,43 @@ testcase tHtmlExport next i endif - '/// open application ///' + printlog "open application " Call hNewDocument WaitSlot (3000) -'---------------------------------- simple document ----------------------------------------------- - '/// create a rectrangle ///' +'------------------ simple document -------------------- + printlog "create a rectrangle " hTextrahmenErstellen ("This is a test text",10,10,40,20) WaitSlot (2000) - '/// create another rectrangle ///' + printlog "create another rectrangle " hRechteckErstellen (50,50,70,70) WaitSlot (3000) -'################################################################################################### - Printlog "'/// test if no file is created, if dialog is canceld ///'" - '/// call 'File->Export'///' +'#################################### + Printlog "test if no file is created, if dialog is canceld" + printlog "call 'File->Export'" FileExport Kontext "ExportierenDlg" WaitSlot (1000) gHTMLFilter = Dateityp.GetItemText(1) Dateityp.Select(gHTMLFilter) - '/// set Filename to 'user\\work\\html\\expo0.html' ///' + printlog "set Filename to 'user\\work\\html\\expo0.html' " sFile = ConvertPath (gOfficePath + "user\work\html\expo0") Dateiname.SetText sFile WaitSlot (2000) - '/// click button 'Save' ///' + printlog "click button 'Save' " Speichern.Click WaitSlot (3000) Kontext "Active" if Active.Exists Then Active.Yes -'-------------------------------------------------------------------------- - '/// now we are on the dialog -1- 'Assign design' ///' +'--------------------------------------------------------- + printlog "now we are on the dialog -1- 'Assign design' " Kontext "HTMLExport1" - '/// click button 'Cancel' ///' + printlog "click button 'Cancel' " HTMLExport1.Cancel WaitSlot (5000) Liste(0) = 0 GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) WaitSlot (1000) - Printlog "used file name: '" + sFile + "'" + Printlog "used file name: " + sFile if (ListCount (Liste()) > 0) then warnlog "dialog for export was canceled, but file was created :-(" for i = 1 to ListCount (Liste()) @@ -113,88 +113,89 @@ testcase tHtmlExport next i KillFileList (Liste()) end if -'################################################################################################### - Printlog "'/// test if files are created ///'" - '/// call 'File->Export'///' +'#################################### + Printlog "'test if files are created" + printlog "call 'File->Export'" FileExport Kontext "ExportierenDlg" WaitSlot (1000) try - '/// select Filetype 'HTML...' aka 'WebPage' ///' + printlog "select Filetype 'HTML...' aka 'WebPage' " Dateityp.Select gHTMLFilter catch errorlog " Filter not available :-( : '"+gHTMLFilter+"'" - Dateityp.Select 1 '/// Selects the first entry - which should be html ///' + Dateityp.Select 1 + printlog "Selects the first entry - which should be html " endcatch WaitSlot (1000) - '/// set Filename to 'user\\work\\html\\expo.html' ///' + printlog "set Filename to 'user\\work\\html\\expo.html' " sFile = ConvertPath (gOfficePath + "user\work\html\expo.html") Dateiname.SetText sFile WaitSlot (2000) - '/// click button 'Save' ///' + printlog "click button 'Save' " Speichern.Click WaitSlot (3000) Kontext "Active" if Active.Exists Then Active.Yes -'-------------------------------------------------------------------------- - Printlog "'/// now we are on the dialog -1- 'Assign design' ///'" +'--------------------------------------------------------- + Printlog "now we are on the dialog -1- 'Assign design' " Kontext "HTMLExport1" - '/// 'New design' should be checked ///' + printlog "'New design' should be checked " if (NeuesDesign.IsEnabled <> TRUE) then warnlog "NewDesign is not enabled by default :-(" endif - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (1000) - Printlog "'/// now we are on the dialog -2- 'Publication Type & Options' ///'" + Printlog "now we are on the dialog -2- 'Publication Type & Options' " Kontext "HTMLExport2" - '/// checkbox 'Standard HTML Format' is checked by default ///' + printlog "checkbox 'Standard HTML Format' is checked by default " if (Standard.IsChecked <> TRUE) then warnlog "Standard is not enabled by default :-(" Standard.Check end if - '/// checkbox 'Title Page' is checked by default ///' + printlog "checkbox 'Title Page' is checked by default " if Not TitelseiteErzeugen.IsChecked Then TitelSeiteErzeugen.Check Warnlog "- 'create Titlepage' should be checked as default :-(" end if if (gApplication = "IMPRESS") then - '/// if applcation is impress: the checkbox 'Show notes' is enabled by default///' + printlog "if application is impress: the checkbox 'Show notes' is enabled by default" If (Notizenanzeigen.IsChecked <> TRUE) Then warnlog "- 'Show notes' checked as default :-(" Notizenanzeigen.Check end if end if - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click - Printlog "'/// now we are on the dialog -3- 'png/gif/jpeg & resolution & sound' ///'" + Printlog "now we are on the dialog -3- 'png/gif/jpeg & resolution & sound' " Kontext "HTMLExport3" - '/// checkbox 'PNG' is checked by default ///' + printlog "checkbox 'PNG' is checked by default " if (PNG.isChecked <> TRUE) then warnlog "Save Graphic as 'PNG' is not checked as default :-(" PNG.Check end if - '/// Listbox compression '75%' is selected by default ///' + printlog "Listbox compression '75%' is selected by default " if (Kompressionswert.GetSelText <> "75%") then warnlog "'Compression' should be '75%', but is: '" + Kompressionswert.GetSelText + "'" Kompressionswert.Select "75%" end if - '/// checkbox 'low monitor resolution' is checked by default ///' + printlog "checkbox 'low monitor resolution' is checked by default " if (NiedrigeAufloesung.IsChecked <> TRUE)Then warnlog "Monitor resolution 'low' is not selected as default :-(" NiedrigeAufloesung.Check end if - '/// checkbox 'export sounds' is checked by default ///' + printlog "checkbox 'export sounds' is checked by default " if (KlaengeExportieren.IsChecked <> true) then warnlog "'Export Sounds' is not checked as default :-(" KlaengeExportieren.Check end if - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (1000) - Printlog "'/// now we are on the dialog -4- 'Information for the title page' ///'" + Printlog "now we are on the dialog -4- 'Information for the title page' " Kontext "HTMLExport4" - '/// the names you entered in the options have to appeare here! ///' + printlog "the names you entered in the options have to appeare here! " sTemp = Autor.GetText Autor1=Autor.GetText if (sTemp <> "Garfield Peanuts") then @@ -205,24 +206,24 @@ testcase tHtmlExport if (sTemp <> "recumbent@sun.com") then warnlog "Value for 'Email' is other than expected, should be 'recumbent@sun.com', is: '"+sTemp+"'" end if - '/// set text in field 'your homepage' ///' + printlog "set text in field 'your homepage' " Homepage.SetText "mahler" AdditionalInformation.SetText "QualityApprooved" - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (2000) - Printlog "'/// now we are on the dialog -5- 'select button style' ///'" + Printlog "now we are on the dialog -5- 'select button style' " Kontext "HTMLExport5" WaitSlot (5000) - '/// checkbox 'Text only' should be checked by default ///' + printlog "checkbox 'Text only' should be checked by default " if (NurText.ischecked <> TRUE) then warnlog "'Text only' is not checked by default :-(" NurText.check end if - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (1000) - Printlog "'/// now we are on the dialog -6- 'select color scheme' ///'" + printlog "now we are on the dialog -6- 'select color scheme' " Kontext "HTMLExport6" WaitSlot (2000) ' maybe check if colour dialog comes up ?! TBO @@ -231,16 +232,16 @@ testcase tHtmlExport 'AktiverLink 'GesichteterLink 'Hintergrund - '/// 'Apply color schemes from document' should be checked per default :-) ///' + printlog "'Apply color schemes from document' should be checked per default :-) " if (FarbenAusDok.IsChecked <> TRUE) Then warnlog "'Apply color schemes from document' should be checked per default :-(" FarbenAusDok.Check end if WaitSlot (2000) - '/// click button 'Create' ///' + printlog "click button 'Create' " HTMLExport6.OK WaitSlot (5000) - Printlog "'/// now we are on the dialog -7- 'Name HTML Design' ///'" + Printlog "now we are on the dialog -7- 'Name HTML Design' " Kontext "HTMLDesign" WaitSlot (1000) Designname.SetText "Lem's Standard" @@ -248,17 +249,15 @@ testcase tHtmlExport WaitSlot (3000) Kontext "active" if active.exists (5) then - printlog " the name for this design already exists : '" + active.GetText+ "'" - printlog " SAY YES!------------------" + printlog " the name for this design already exists : '" + active.GetText+ "'" active.yes end if - '/// check number and names of created files ///' + printlog "check number and names of created files " Printlog "used file name: '" + sFile + "'" Liste(0) = 0 GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() ) WaitSlot (1000) x = ListCount(Liste()) -' Printlog "gApplication is: " + gApplication ' For debugging - FHA if gApplication = "DRAW" then if (x <> "3") then Warnlog "- Number of files is not correct, it should be:3 but it is: '" + x + "' - Draw" @@ -274,7 +273,7 @@ testcase tHtmlExport next end if end if - '/// check if fileextension is common - .htm or .html for all files the same ///' + printlog "check if fileextension is common - .htm or .html for all files the same " Liste(0) = 0 GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.htm" , Liste() ) WaitSlot (1000) @@ -288,36 +287,36 @@ testcase tHtmlExport Warnlog " htm : " + x Warnlog " html: " + i end if -'------------------------------------------------------------------------------------------------------------------------------ - Printlog "'/// check if design is created in dialog ///'" +'-------------------------------------------------------- + Printlog "check if design is created in dialog" WaitSlot (3000) - '/// File->Export ///' + printlog "File->Export " FileExport Kontext "ExportierenDlg" - '/// Set Filename to "user\\work\\html\\expo.html" ///' + printlog "Set Filename to user\\work\\html\\expo.html " Dateiname.SetText sFile try - '/// select Filetype 'HTML...' aka 'WebPage' ///' + printlog "select Filetype 'HTML...' aka 'WebPage' " Dateityp.Select gHTMLFilter catch errorlog " Filter not available :-( : '"+gHTMLFilter+"'" endcatch WaitSlot (1000) - '/// click button 'save' ///' + printlog "click button 'save' " Speichern.Click WaitSlot (1000) Kontext "Active" ' active about overwriting existing file if Active.Exists Then Active.Yes -'-------------------------------------------------------------------------- +'--------------------------------------------------------- WaitSlot (1000) Kontext "HTMLExport1" WaitSlot (1000) try - '/// now 'existing design' is checkable -> check it ///' + printlog "now 'existing design' is checkable -> check it " ExistierendesDesign.Check WaitSlot (3000) - '/// there has to be 1 design in the list, select and delete it ///' + printlog "there has to be 1 design in the list, select and delete it " x = Designliste.GetItemCount if (x <> 1) then warnlog "there is an unexpected count on designs in the list, expected 1, but there are : '" + x + "'" @@ -344,9 +343,11 @@ testcase tHtmlExport Call hCloseDocument Printlog "used file name: '" + sFile + "'" ' TBOTODO CHECK files contenet ! - + endcase 'tHtmlExport -'------------------------------------------------------------------------------- + +'--------------------------------------------------------- + testcase tHtmlExport_Webcast Dim iWaitIndex as integer @@ -356,7 +357,7 @@ testcase tHtmlExport_Webcast dim Liste ( 200 ) as String dim sFile as string - '/// create directories if not exists and delete the content, if exists user\\work\\html\\[asp|perl]\\ ///' + printlog "create directories if not exists and delete the content, if exists user\\work\\html\\[asp|perl]\\ " app.mkDir (ConvertPath (gOfficePath + "user\work\html\asp\")) app.mkDir (ConvertPath (gOfficePath + "user\work\html\perl\")) Liste(0) = 0 @@ -376,8 +377,8 @@ testcase tHtmlExport_Webcast next i end if - '/// File->Autopillot->Presentation... ///'---------------------------------- - FileAutopilotPresentation + printlog "File->Autopillot->Presentation... " '--------- + FileAutopilotPresentation Kontext "Active" if Active.Exists(1) then WarnlogActive.GetText @@ -388,18 +389,18 @@ testcase tHtmlExport_Webcast endcatch goto endsub end if - '/// Page 1 of autopilot///' + printlog "Page 1 of autopilot" Kontext "AutopilotPraesentation1" - '/// uncheck 'preview' ///' + printlog "uncheck 'preview' " Preview.Uncheck - '/// click on button 'create' ///' + printlog "click on button 'create' " AutopilotPraesentation1.OK WaitSlot (3000) - '************************************************************ Page 1 - Printlog "'/// create a presentation and save it for further references ///'" - '/// start creating the presentation now ///'------------------------------- + '************************************ Page 1 + Printlog "create a presentation and save it for further references" + printlog "start creating the presentation now "'------------------------------ Printlog "- Create presentation" - '/// select 'click to add title' with [TAB] and press [F2] to edit the placeholder title ///' + printlog "select 'click to add title' with [TAB] and press [F2] to edit the placeholder title " hTypeKeys "" WaitSlot (2000) Select Case Ucase(gApplication) @@ -407,32 +408,39 @@ testcase tHtmlExport_Webcast case "IMPRESS" : hMouseClick DocumentImpress,50,50 end select WaitSlot (3000) - '/// Type 'This is a test text', select it. ///' + printlog "Type 'This is a test text', select it. " hTextrahmenErstellen ("This is a test text",10,10,40,20) EditSelectAll + Kontext "TextObjectbar" - '/// click 'bold text' in object toolbar ///' + + if TextObjectbar.Exists <> TRUE then + ViewToolbarsTextFormatting + end if + WaitSlot (3000) + Kontext "TextObjectbar" + printlog "click 'bold text' in object toolbar " Fett.Click WaitSlot (2000) - '/// press [esacpe][tab] to get out of edit mode and select the next placeholder ///' + printlog "press [esacpe][tab] to get out of edit mode and select the next placeholder " hTypeKeys "" WaitSlot (1000) - '/// SlideShow->Effects ///' + printlog "SlideShow->Effects " SlideShowCustomAnimation WaitSlot (1000) Kontext "Tasks" WaitSlot (1000) EffectAdd.Click - '/// Dialog 'Custom Animation' comes up ///' + printlog "Dialog 'Custom Animation' comes up " kontext - '/// Switch to TabPage: Entrance ///' + printlog "Switch to TabPage: Entrance " active.setPage(TabEntrance) Kontext "TabEntrance" if TabEntrance.Exists (5) then WaitSlot (1000) - '/// select effect 'ABC v' :-) ///' + printlog "select effect 'ABC v' :-) " Effects.Select(5) - '/// select speed 'slow' -> first item in list ///' + printlog "select speed 'slow' -> first item in list " Speed.Select 1 try TabEntrance.Ok @@ -447,43 +455,41 @@ testcase tHtmlExport_Webcast end if kontext "Tasks" end if - WaitSlot (3000) - '/// activate grafik insert dialog by typing [return] ///' -'Doesnt work, will work when accessability works better - FHA. + WaitSlot (3000) + printlog "activate grafik insert dialog by typing [return] " -' hTypeKEys "" ' i love accessability feartures .-))))))))))))))))) - InsertGraphicsFromFile - Kontext "GrafikEinfuegenDlg" - if GrafikEinfuegenDlg.Exists <> TRUE then - WaitSlot (1000) + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.Exists <> TRUE then + WaitSlot (1000) end if - '/// insert grafik: global\\input\\graf_inp\\borabora.jpg ///' + printlog "insert grafik: global\\input\\graf_inp\\borabora.jpg " Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg") WaitSlot (3000) Oeffnen.Click WaitSlot (2000) - '/// select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder ///' + printlog "select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder " hTypeKeys "" - '/// insert text and select the words by typing [strg a] ///' + printlog "insert text and select the words by typing [strg a] " hTypeKeys "MecuryVenusEarthMarsJupiterSaturnUranusNeptunePluto" EditSelectAll WaitSlot (1000) - '/// format->character ///' + printlog "format->character " FormatCharacter WaitSlot (2000) Kontext Active.SetPage TabFont Kontext "TabFont" - '/// set font size to '18' on tabpage 'font' ///' + printlog "set font size to '18' on tabpage 'font' " try SizeWest.SetText "18" catch Size.SetText "18" endcatch - '/// click button OK ///' + printlog "click button OK " TabFont.OK WaitSlot (1000) - '/// click 'bold text' in object toolbar ///' + printlog "click 'bold text' in object toolbar " Kontext "TextObjectbar" try usebindings @@ -504,14 +510,14 @@ testcase tHtmlExport_Webcast endcatch endcatch WaitSlot (2000) - '/// SlideShow-> CustomAnimation ///' + printlog "SlideShow-> CustomAnimation " SlideShowCustomAnimation WaitSlot (1000) Kontext "Tasks" WaitSlot (1000) EffectChange.Click kontext - '/// Switch to TabPage: Entrance ///' + printlog "Switch to TabPage: Entrance " active.setPage(TabEntrance) kontext "TabEntrance" Effects.TypeKeys "",8 @@ -521,37 +527,37 @@ testcase tHtmlExport_Webcast catch warnlog "select another effect, assign is not possible" endcatch -'************************************************************ Page 2 Merkur - '/// create a 2nd slide with: insert->slide ///' +'******************************** Page 2 Merkur + printlog "create a 2nd slide with: insert->slide " InsertSlide WaitSlot (2000) hTypekeys "" WaitSlot (2000) - '/// select 'click to add title' with [TAB] and press [F2] to edit the placeholder title ///' + printlog "select 'click to add title' with [TAB] and press [F2] to edit the placeholder title " hTypeKeys "" WaitSlot (2000) - '/// Type 'MERKUR', select it via Edit-Select All///' + printlog "Type 'MERKUR', select it via Edit-Select All" hTextrahmenErstellen ("MERKUR",10,10,60,30) EditSelectAll WaitSlot (2000) - '/// click 'bold text' in object toolbar ///' + printlog "click 'bold text' in object toolbar " Kontext "TextObjectbar" Fett.Click WaitSlot (1000) - '/// press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog ///' + printlog "press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog " ' hTypeKeys "" hTypeKeys "" InsertGraphicsFromFile WaitSlot (4000) - '/// insert grafik: global\\input\\graf_inp\\borabora.jpg ///' + printlog "insert grafik: global\\input\\graf_inp\\borabora.jpg " Kontext "GrafikEinfuegenDlg" Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg") WaitSlot (3000) Oeffnen.Click WaitSlot (2000) - '/// select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder ///' + printlog "select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder " hTypeKeys "" - '/// insert text and select the words by typing [strg a] ///' + printlog "insert text and select the words by typing [strg a] " WaitSlot (1000) hTypeKeys "Reciprocal Mass *5972000Mass (Erde=1) 0,0558Mass in kg 3,30310" hTypeKeys "Equator-radius (km) 2440Equator-radius (Erde=1)0,382Middle density (kg/m^3) 5400" @@ -560,22 +566,22 @@ testcase tHtmlExport_Webcast hTypeKeys "Temperatur at night -170CDiameter (km) 4800" EditSelectAll WaitSlot (1000) - '/// format->character ///' + printlog "format->character " FormatCharacter WaitSlot (2000) Kontext Active.SetPage TabFont Kontext "TabFont" - '/// set font size to '18' on tabpage 'font' ///' + printlog "set font size to '18' on tabpage 'font' " try SizeWest.SetText "16" catch Size.SetText "16" endcatch - '/// click button OK ///' + printlog "click button OK " TabFont.OK WaitSlot (2000) - '/// click 'bold text' in object toolbar ///' + printlog "click 'bold text' in object toolbar " Kontext "TextObjectbar" try Fett.Click 'culprint @@ -594,65 +600,66 @@ testcase tHtmlExport_Webcast endcatch endcatch WaitSlot (2000) - '/// save file with impress filter : "user\\work\\webcast.odp" ///' + printlog "save file with impress filter : user\\work\\webcast.odp " sFile = ConvertPath (gOfficePath + "user\work\webcast") if (Dir (sFile + ".odp") <> "") then app.kill (sFile + ".odp") WaitSlot (2000) hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" ) - Printlog "saved presentation: '" + sFile + ".odp" -'----------------------------------- Exportieren als ASP Web-Cast - Printlog "'/// export as webcast ASP ///'" - '/// File->SaveAs ///' + Printlog "saved presentation: " + sFile + ".odp" +'------------------------- Exportieren als ASP Web-Cast + Printlog "'export as webcast ASP" + printlog "File->SaveAs " FileExport WaitSlot (2000) Kontext "ExportierenDlg" try - '/// select Filetype 'HTML...' aka 'WebPage' ///' + printlog "select Filetype 'HTML...' aka 'WebPage' " gHTMLFilter = Dateityp.GetItemText(1) Dateityp.Select(gHTMLFilter) catch errorlog " Filter not available :-( : '"+gHTMLFilter+"'" - Dateityp.Select 1 '/// Selects the first entry - which should be html ///' + Dateityp.Select 1 + printlog "Selects the first entry - which should be html " endcatch - '/// Set Filename to "user\\work\\webcst_asp.html" ///' + printlog "Set Filename to user\\work\\webcst_asp.html " sFile = ConvertPath (gOfficePath + "user\work\html\asp\webcast.html") Dateiname.SetText sFile - '/// click button 'save' ///' + printlog "click button 'save' " Speichern.Click WaitSlot (5000) Kontext "Active"' ????????? TBO if Active.Exists (5) Then Active.Yes WaitSlot (3000) - '/// now we are on the dialog -1- 'Assign design' ///' + printlog "now we are on the dialog -1- 'Assign design' " Kontext "HTMLExport1" WaitSlot (2000) - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (2000) - '/// now we are on the dialog -2- 'Publication Type & Options' ///' + printlog "now we are on the dialog -2- 'Publication Type & Options' " Kontext "HTMLExport2" WaitSlot (2000) - Printlog "'/// check 'WebCast' ///" + Printlog "check 'WebCast'" WebCast.Check WaitSlot (2000) - Printlog "'/// check 'Active Server Pages (ASP)' ///" + Printlog "check 'Active Server Pages (ASP)'" ASP.Check - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click - '/// now we are on the dialog -3- 'gif/jpeg & resolution & sound' ///' + printlog "now we are on the dialog -3- 'gif/jpeg & resolution & sound' " Kontext "HTMLExport3" WaitSlot (2000) - '/// check Save graphics as 'GIF' ///' + printlog "check Save graphics as 'GIF' " Gif.Check - '/// check 'Medium (monitor) Resolution' ///' + printlog "check 'Medium (monitor) Resolution' " MittlereAufloesung.Check WaitSlot (1000) - '/// click button 'Create' ///' + printlog "click button 'Create' " HTMLExport3.OK WaitSlot (2000) - '/// now we are on the dialog -7- 'Name HTML Design' ///' + printlog "now we are on the dialog -7- 'Name HTML Design' " Kontext "HTMLDesign" - '/// click button 'Do Not Save' ///' + printlog "click button 'Do Not Save' " if HTMLDesign.Exists Then HTMLDesign.Cancel iWaitIndex = 0 do while HTMLDesign.Exists AND iWaitIndex < 30 @@ -671,15 +678,15 @@ testcase tHtmlExport_Webcast printlog "("+i+"/"+x+"): '"+Liste(i)+"'" next end if -'----------------------------------- Exportieren als ASP Web-Cast - Printlog "'/// export as webcast PERL ///'" +'------------------------- Exportieren als ASP Web-Cast + Printlog "export as webcast PERL" Kontext "DocumentImpress" WaitSlot (2000) - '/// File->export ///' + printlog "File->export " FileExport WaitSlot (2000) Kontext "ExportierenDlg" - '/// select Filetype 'HTML...' aka 'WebPage' ///' + printlog "select Filetype 'HTML...' aka 'WebPage' " try Dateityp.Select gHTMLFilter catch @@ -688,51 +695,52 @@ testcase tHtmlExport_Webcast printlog "Selected " + Dateityp.GetSelText + " manually." endcatch WaitSlot (1000) - '/// Set Filename to "user\\work\\wbcst_p.html" ///' + printlog "Set Filename to user\\work\\wbcst_p.html " sFile = ConvertPath (gOfficePath + "user\work\html\perl\webcast") Dateiname.SetText sFile - '/// click button 'save' ///' + printlog "click button 'save' " Speichern.Click WaitSlot (2000) - Kontext "Active" '/// click button 'save' ///' + Kontext "Active" + printlog "click button 'save' " if Active.Exists Then Active.Yes WaitSlot (2000) - '/// now we are on the dialog -1- 'Assign design' ///' + printlog "now we are on the dialog -1- 'Assign design' " Kontext "HTMLExport1" WaitSlot (2000) - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (2000) - '/// now we are on the dialog -2- 'Publication Type & Options' ///' + printlog "now we are on the dialog -2- 'Publication Type & Options' " Kontext "HTMLExport2" WaitSlot (2000) - Printlog "'/// check 'WebCast' ///" + Printlog "check 'WebCast'" WebCast.Check WaitSlot (2000) - Printlog "'/// check 'Perl' ///" + Printlog "check 'Perl'" PERL.Check WaitSlot (1000) - '/// 'URL for listeners' ///' - printlog "URL for listeners compare to to TBO: '"+BeamerURL.GetText+"'" - '/// set 'URL for presentation' to 'wbcst_prl.html' ///' + printlog "'URL for listeners' " + printlog "URL for listeners compare to to TBO: "+BeamerURL.GetText + printlog "set 'URL for presentation' to 'wbcst_prl.html' " PraesentationURL.SetText "wbcst_prl" WaitSlot (1000) - '/// set 'URL for perl scrips' to '/WebCast/cgi-bin/' ///' + printlog "set 'URL for perl scrips' to '/WebCast/cgi-bin/' " ScriptURL.SetText "/WebCast/cgi-bin/" printlog "presentation url? : "+ (gOfficePath + "/WebCast/cgi-bin/wbcst_prl") WaitSlot (1000) - '/// click button 'Next >>' ///' + printlog "click button 'Next >>' " Weiter.Click WaitSlot (1000) - '/// now we are on the dialog -3- 'gif/jpeg & resolution & sound' ///' + printlog "now we are on the dialog -3- 'gif/jpeg & resolution & sound' " Kontext "HTMLExport3" WaitSlot (1000) - '/// check Save graphics as 'GIF' ///' + printlog "check Save graphics as 'GIF' " Gif.Check - '/// check 'Medium (monitor) Resolution' ///' + printlog "check 'Medium (monitor) Resolution' " MittlereAufloesung.Check WaitSlot (3000) - '/// click button 'Create' ///' + printlog "click button 'Create' " HTMLExport3.OK WaitSlot (3000) Kontext "HTMLDesign" diff --git a/testautomation/graphics/optional/includes/global/g_line.inc b/testautomation/graphics/optional/includes/global/g_line.inc index d62428e92ac2..8a1d839b01e6 100755 --- a/testautomation/graphics/optional/includes/global/g_line.inc +++ b/testautomation/graphics/optional/includes/global/g_line.inc @@ -473,10 +473,15 @@ testcase tLineConnect '/// Go through the different Corner-styles ///' hOpenContextMenu + sleep 1 hMenuSelectNr(2) 'Choose "Line" Kontext "TabLinie" - cfirst = CornerStyle.GetSelIndex + if TabLinie.Exists(2) then + cfirst = CornerStyle.GetSelIndex + else + sleep 1 + endif For i = 1 to CornerStyle.GetItemCount Kontext "TabLinie" diff --git a/testautomation/graphics/optional/includes/global/g_tables.inc b/testautomation/graphics/optional/includes/global/g_tables.inc index b018e41f2fd2..616ab1b8c72e 100755 --- a/testautomation/graphics/optional/includes/global/g_tables.inc +++ b/testautomation/graphics/optional/includes/global/g_tables.inc @@ -55,9 +55,17 @@ testcase tiInsertTableUsingMenu printlog "Inserting table into doc using the menu." Call hNewDocument - DocumentImpress.UseMenu - hMenuSelectNr(4) - hMenuSelectNr(13) + printlog "Switching between Draw/Impress" + if (UCase(gApplication)) = "IMPRESS" then + DocumentImpress.UseMenu + hMenuSelectNr(4) + hMenuSelectNr(13) + else + DocumentDraw.UseMenu + hMenuSelectNr(4) + hMenuSelectNr(10) + endif + printlog "Checking if insert Table dialog comes up." Kontext "InsertTableImpress" @@ -208,23 +216,32 @@ endcase 'tiInsertTableUsingToolbarbutton testcase tiTableObjectBar printlog "Testing TableObjectBar." + printlog "Inserting table into doc using the menu." Call hNewDocument - kontext "Standardbar" - - printlog "Checking if button is available." - try - Table.Click - catch - warnlog "Table button in standardbar is not available!" - endcatch + printlog "Switching between Draw/Impress" + if (UCase(gApplication)) = "IMPRESS" then + DocumentImpress.UseMenu + hMenuSelectNr(4) + hMenuSelectNr(13) + else + DocumentDraw.UseMenu + hMenuSelectNr(4) + hMenuSelectNr(10) + endif Kontext "InsertTableImpress" printlog "Inserting table." InsertTableImpress.OK - Kontext "DocumentImpress" printlog "Selecting table for geeting the TableObjectBar." - DocumentImpress.TypeKeys "" + printlog "Switching between Draw/Impress" + if (UCase(gApplication)) = "IMPRESS" then + Kontext "DocumentImpress" + DocumentImpress.TypeKeys "" + else + Kontext "DocumentDraw" + DocumentDraw.TypeKeys "" + endif printlog " Checking Table button." Kontext "TableObjectBar" @@ -247,7 +264,11 @@ testcase tiTableObjectBar Kontext "TableObjectBar" TableObjectBar.Close - Kontext "DocumentImpress" + if (UCase(gApplication)) = "IMPRESS" then + Kontext "DocumentImpress" + else + Kontext "DocumentDraw" + endif Call hToolbarSelect ("Table", true) Kontext "TableObjectBar" @@ -263,7 +284,11 @@ testcase tiTableObjectBar endif Kontext "TableObjectBar" TableObjectBar.Close - Kontext "DocumentImpress" + if (UCase(gApplication)) = "IMPRESS" then + Kontext "DocumentImpress" + else + Kontext "DocumentDraw" + endif Call hToolbarSelect ("Table", true) Kontext "TableObjectBar" @@ -276,12 +301,21 @@ testcase tiTableObjectBar else warnlog "BordersTB is not up!" endif - Kontext "DocumentImpress" + if (UCase(gApplication)) = "IMPRESS" then + Kontext "DocumentImpress" + else + Kontext "DocumentDraw" + endif printlog "Checking merge cells." printlog "Inserting something into cell and select." - DocumentImpress.TypeKeys ("a") - DocumentImpress.TypeKeys "" + if (UCase(gApplication)) = "IMPRESS" then + DocumentImpress.TypeKeys ("a") + DocumentImpress.TypeKeys "" + else + DocumentDraw.TypeKeys ("a") + DocumentDraw.TypeKeys "" + endif Kontext "TableObjectBar" ZellenVerbinden.Click printlog "Cells merged." @@ -289,23 +323,23 @@ testcase tiTableObjectBar printlog "Checking split cells." ZelleTeilen.Click printlog "Cells split." - Kontext "SplitCells" + Kontext "ZellenTeilen" WaitSlot(1000) printlog "SplitCells dialog open." - SplitCellInto.ToMax - printlog "Maximum SplitCellCount is " & SplitCellInto.GetText & "." - SplitCellInto.ToMin - printlog "Minimum SplitCellCount is " & SplitCellInto.GetText & "." - if CellsHorizontally.IsChecked = TRUE then + Anzahl.ToMax + printlog "Maximum SplitCellCount is " & Anzahl.GetText & "." + Anzahl.ToMin + printlog "Minimum SplitCellCount is " & Anzahl.GetText & "." + if Horizontal.IsChecked = TRUE then printlog "Horizontally is clicked." else warnlog "Horizontally should be clicked by default!" endif - SplitEqual.Check + GleichmaessigTeilen.Check printlog "Split Equal checked." - CellsVertically.Check + Vertikal.Check printlog "Cells vertically checked." - SplitCells.OK + ZellenTeilen.OK printlog " Checking optimize button 'ToDo: button not working" 'Kontext "TableObjectBar" 'Optimieren.TearOff @@ -333,14 +367,26 @@ testcase tiTableObjectBar printlog "Checking table design button 'ToDo:needs some further examination here!" tabledesign.Click - kontext "Tasks" - if (NOT Tasks.exists) then - warnlog "Tasks Panel not visible. Opening now." - ViewTaskPane + + printlog "Checking for Table Design in Impress TaskBar or for Dialog in Draw." + if (UCase(gApplication)) = "IMPRESS" then + kontext "Tasks" + if (NOT Tasks.exists) then + warnlog "Tasks Panel not visible. Opening now." + ViewTaskPane + else + printlog "Task Pane visible." + endif else - printlog "Task Pane visible." - endif - + kontext "TableDesign" + if TableDesign.exists then + printlog "Table Design Dialog is up." + TableDesign.Close + else + warnlog "TableDesign Dialog for Draw is missing." + endif + endif + printlog "Checking Properties button." Kontext "TableObjectBar" TableProperties.Click diff --git a/testautomation/graphics/optional/includes/impress/i_pengine2.inc b/testautomation/graphics/optional/includes/impress/i_pengine2.inc index bac399c2f611..7454395dd393 100755 --- a/testautomation/graphics/optional/includes/impress/i_pengine2.inc +++ b/testautomation/graphics/optional/includes/impress/i_pengine2.inc @@ -592,7 +592,7 @@ Function TestAnimations Effects.TypeKeys "" For e = 1 to i If e <> p Then - if AutomaticPreview.isChecked = TRUE then sleep 2 + if AutomaticPreview.isChecked = TRUE then sleep 1 Printlog "Effect has position Nr: " + Effects.GetSelIndex + ". Name of effect: " + Effects.GetSelText '/// Select the next entry ///' Effects.TypeKeys "" diff --git a/testautomation/graphics/required/i_updt_1.bas b/testautomation/graphics/required/i_updt_1.bas index 665143276e4f..c28c2e579728 100755 --- a/testautomation/graphics/required/i_updt_1.bas +++ b/testautomation/graphics/required/i_updt_1.bas @@ -74,7 +74,6 @@ sub LoadIncludeFiles use "global\system\includes\master.inc" use "global\system\includes\gvariabl.inc" use "global\required\includes\g_option.inc" - use "global\required\includes\g_option2.inc" use "global\required\includes\g_customize.inc" gApplication = "IMPRESS" Call GetUseFiles() diff --git a/testautomation/graphics/required/includes/global/id_opt_2.inc b/testautomation/graphics/required/includes/global/id_opt_2.inc index 32e4de03079d..798a2ffc0c6b 100755 --- a/testautomation/graphics/required/includes/global/id_opt_2.inc +++ b/testautomation/graphics/required/includes/global/id_opt_2.inc @@ -45,35 +45,15 @@ testcase tToolsOptionsMeasurementUnit (sApplication as string) dim iCount2 as integer dim sUnitOptions as string dim sUnitDialog as string - dim gApplicationTemp as string - - gApplicationTemp = gApplication - gApplication = "WRITER" - printlog "Take Measurement Units from Writer " - hNewDocument - ToolsOptions - ' Take General Measurement units from writer, there are only 5! - hToolsOptions ("WRITER","General") - - iCount2 = Masseinheit.GetItemCount - for i=1 to iCount2 - Masseinheit.select i - printlog "(" + i + "/" + iCount2 + "): '" + Masseinheit.getSelText + "' - " + GetMeasUnit(Tabulatorenabstand.getText) - next i - Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK - hCloseDocument() - gApplication = gApplicationTemp - - sleep 1 + hNewDocument sleep 1 ToolsOptions hToolsOptions (sApplication,"General") + iCount2 = Masseinheit.GetSelIndex + printlog "current measurement unit is: " & iCount2 iCount = Masseinheit.GetItemCount - if (iCount <> iCount2) then - 'warnlog "Inconsistence between Writer: '" + iCount2 + "' and " + sApplication + ": '" + iCount + "'" - endif + Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK printlog "----------------------" @@ -149,6 +129,13 @@ testcase tToolsOptionsMeasurementUnit (sApplication as string) TabEinzuegeUndAbstaende.cancel next i + + printlog "Setting back measurement to " & iCount2 + ToolsOptions + hToolsOptions (sApplication,"General") + Masseinheit.Select(iCount2) + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK hCloseDocument endcase 'tToolsOptionsMeasurementUnit diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc index db1b96cb33cd..24912b76983c 100755 --- a/testautomation/graphics/tools/id_tools.inc +++ b/testautomation/graphics/tools/id_tools.inc @@ -37,36 +37,73 @@ '* '\****************************************************************************** +'Functions: +' #1 hFindSpellHypLanguage +' #1 GetDecimalSeperator +' #1 LiberalMeasurement +' #1 GetMeasUnit +' #1 StrToDouble +' #1 fGetPositionX +' #1 setStartCurrentPage +' #1 fIsDocumentWritable +' #1 fIsDocumentWritable +' #1 fGetSizeXY +' #1 hCallExport +' #1 checkexppdfwaitmax10sec +' #1 fCompareTwoValues +' #1 fConvertBackslashToSlash +' #1 hScreenFontAntialiasing +' #1 fSaveLoadAllFormats +' #1 setCharacterLanguage +' #1 toggleGermanSpellchecking +' #1 sAnalyseContextMenu +' #1 sLongToBinary +' #1 sBinaryToLong +' #1 fGetIntoDictionary +' #1 hSelectInList +' #1 hWalkTheStyles2 +' #1 fGetSlideNumber +' #1 fGetSlideCount +' #1 fGetSlideName +' #1 fGetSetPageBackground +' #1 CreateTextSetEffectAndAngle +' #1 fGetPresentationStyle +' #1 hPrepareSearchBUG +' #1 makeNumOutOfText +' #1 wIgnorierenlisteLoeschen +' #1 optionstest +' #1 optionstest2 + + +'\***************************************************************** function hFindSpellHypLanguage (optional sBooks()) as string - '/// print all available languages that have a 'language module' ///' + printlog "print all available languages that have a language module" dim iListLength as integer dim i as integer dim sTemp as string - '/// only necessarry for asian languages ///' + printlog "only necessary for asian languages" if (bAsianLan or (iSprache=55)) then - '/// Tools->Options ///' + printlog "Tools->Options" ToolsOptions - '/// select from section 'Language Settings' the item 'Writing Aids' ///' + printlog "select from section 'Language Settings' the item 'Writing Aids'" hToolsOptions ("LANGUAGESETTINGS","WRITINGAIDS") - '/// click button 'Edit...' in section 'Available language modules' ///' + printlog "click button 'Edit...' in section 'Available language modules'" SprachmoduleBearbeiten.click kontext "ModuleBearbeiten" - '/// print all entries from listbox 'Language' ///' + printlog "print all entries from listbox 'Language'" for i = 1 to Sprache.GetItemCount sTemp = Sprache.GetItemText(i) if (NOT isMissing(sBooks())) then listAppend(sBooks(), sTemp) endif - '/// return the first entry in the listbox ///' - if i = 1 then - hFindSpellHypLanguage = sTemp - endif + printlog " return the first entry in the listbox " + if i = 1 then hFindSpellHypLanguage = sTemp next i - '/// close dialog 'Edit Modules' ///' + printlog "close dialog 'Edit Modules'" ModuleBearbeiten.Close Kontext "ExtrasOptionenDlg" - '/// close dialog 'Options - ' ///' + printlog "close dialog 'Options - '" ExtrasOptionenDlg.OK sleep 1 endif @@ -76,69 +113,61 @@ end function function GetDecimalSeperator ( sDummy$ ) as String printlog "Input : number with fractionmark from 'NumericField' as String " - printlog "+ Output: '.' or ',' as String " + printlog "+ Output: '.' or ',' as String " dim i1, i2 as integer - - ' get position of fraction mark / get IT + + printlog "get position of fraction mark / get IT" i1 = instr (sDummy$, ",") i2 = instr (sDummy$, ".") - if i1 > i2 then - GetDecimalSeperator = "," - else - GetDecimalSeperator = "." - endif + if i1 > i2 then GetDecimalSeperator = "," else GetDecimalSeperator = "." end function '------------------------------------------------------------------------------- function LiberalMeasurement ( sShould$, sActual$) as Boolean - '/// Input : (1. Should, 2. Actual) as Number with or without MeasurementUnit 'NumericField' as String ///' - '///+ if input has no MeasurementUnit i take it as 'cm' (was the default in old tests) ///' - '///+ Output: Boolean are they likely the same? - '/// NEEDED: mathematical proofment of iTolerance, by now just some guesses :-| ///' - '/// reason for this function:///' - '///+ because SO counts internaly in 'twip???s' 'twentieth of a point' there are some rounding errors ///' - '///+ there are also some rounding errors because of the internal representatio of floating point numbers in computers ///' - '///+ now lets try to get rid of them and have a nicer output in tests... ///' - '/// measurement units are defined in http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src ///' - + printlog " Input : (1. Should, 2. Actual) as Number with or without MeasurementUnit 'NumericField' as String " + printlog "+ if input has no MeasurementUnit i take it as 'cm' (was the default in old tests) " + printlog "+ Output: Boolean are they likely the same?" + printlog " NEEDED: mathematical proofment of iTolerance, by now just some guesses :-| " + printlog " reason for this function:" + printlog "+ because SO counts internaly in 'twip???s' 'twentieth of a point' there are some rounding errors " + printlog "+ there are also some rounding errors because of the internal representatio of floating point numbers in computers " + printlog "+ now lets try to get rid of them and have a nicer output in tests... " + printlog " measurement units are defined in http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src " + dim iTolerance as Double - LiberalMeasurement = False ' worst case + LiberalMeasurement = False - 'trivial if (sShould$ = sActual$) then LiberalMeasurement = True else - ' check if measunit is the same !! + printlog "check if measunit is the same" if (GetMeasUnit(sShould$) <> GetMeasUnit(sActual$) ) then warnlog "In function LiberalMeasurement the measUnit is different, compare not possible yet" else - printlog "set factor for liberality ;-)" + printlog "set factor for liberality" printlog "took units from http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src" select case GetMeasUnit(sShould$) - case "mm", "ミリ", "公厘" : iTolerance = 2.0 '01, 81, 88 - case "cm","センチ","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88 - case chr$(34) : iTolerance = 2.5 - case "pi","ピクセル" : iTolerance = 2.5 '01, 81 - case "pt", "ポイント" : iTolerance = 2.5 '01, 81 - case "" : iTolerance = 1.5 ' cm is presubposition in old functions + case "mm", "ミリ", "公厘" : iTolerance = 2.0 '01, 81, 88 + case "cm","センチ","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88 + case chr$(34) : iTolerance = 2.5 + case "pi","ピクセル" : iTolerance = 2.5 '01, 81 + case "pt", "ポイント" : iTolerance = 2.5 '01, 81 + case "" : iTolerance = 1.5 ' cm is presubposition in old functions case else iTolerance = 2.5 qaErrorLog "This Unit is not available in this function. '" + GetMeasUnit(sShould$) + "'" end select - ' have to get the measurem unit, cause the offset is different for each :-( - ' !!! val(str()) is important because of double calculating actions !!! #110996# + printlog "have to get the measurem unit, cause the offset is different for each" + printlog "!!! val(str()) is important because of double calculating actions !!! #110996#" if ( val(str(StrToDouble(sShould$)+iTolerance)) >= StrToDouble(sActual$) ) AND (val(str(StrToDouble ( sShould$ )-iTolerance)) <= StrToDouble ( sActual$ )) then - LiberalMeasurement = True + LiberalMeasurement = True else LiberalMeasurement = False - 'printlog "LM: ---------------------------: "+sShould$ +":"+sActual$ end if - 'printlog "### LibMeas: "+ (StrToDouble(sShould$) + iTolerance) +" - "+ StrToDouble(sShould$) +" - "+ (StrToDouble ( sShould$ ) - iTolerance)+" ; '"+GetMeasUnit(sShould$)+"'" end if end if - 'Printlog "+++++++++++++++++++++++++++++++++++++meas lib was here: "+LiberalMeasurement end function '------------------------------------------------------------------------------- @@ -146,14 +175,13 @@ function GetMeasUnit ( sWert$ ) as String dim iBounder as integer printlog " Input : Number with or without MeasurementUnit 'NumericField' as String " - printlog "+ Output: Initials of MeasurementUnit as String or when only a number " + printlog "+ Output: Initials of MeasurementUnit as String or "" when only a number " iBounder = -1 do inc iBounder loop until ( isNumeric(mid (sWert$, len(sWert$)-iBounder, 1)) OR (len(sWert$) <= (iBounder + 1)) ) - ' printlog right (sWert$, iBounder) if (len(sWert$) <= (iBounder + 1)) then if isNumeric(left (sWert$, 1)) then GetMeasUnit = right (sWert$, iBounder) @@ -175,79 +203,75 @@ function StrToDouble ( sWert$ ) as Double dim c as double dim n as integer - '/// Input : {'a[. ,]b[mm cm " pi pt]' with a, b as integer} as String ///' - '///+ Output: a[. , ]b as double ///' + printlog " Input : {'a[. ,]b[mm cm pi pt]' with a, b as integer} as String " + printlog "+ Output: a[. , ]b as double " - ' get rid of measure unit, the only single character is '"' all others are two chars - ' there was a problem, if there is NO meas.unit!!! - if (isNumeric (sWert$) = FALSE) then - if ( StrComp (right (sWert$, 1), chr$(34) ) = 0 ) then - sDummy$ = Left ( sWert$, Len(sWert$)-1 ) + printlog "get rid of measure unit, the only single character is '' all others are two chars" + printlog "there was a problem, if there is NO meas.unit!!" + if (isNumeric (sWert$) = FALSE) then + if ( StrComp (right (sWert$, 1), chr$(34) ) = 0 ) then + sDummy$ = Left ( sWert$, Len(sWert$)-1 ) + else + sDummy$ = Left ( sWert$, Len(sWert$)-2 ) + endif else - sDummy$ = Left ( sWert$, Len(sWert$)-2 ) + sDummy$ = sWert$ endif - else - sDummy$ = sWert$ - endif - ' get position of fraction mark + printlog "get position of fraction mark" i1 = instr (sDummy$, ",") ' wrong output i2 = instr (sDummy$, ".") - if i1 > i2 then - i = i1 - else - i = i2 - endif - ' in front of decimal seperator - try - a = val (left (sDummy$,i-1)) - catch + if i1 > i2 then i = i1 else i = i2 + printlog " in front of decimal seperator:" + try + a = val (left (sDummy$,i-1)) + catch 'printlog sWert$ + ":" + sDummy$ + ":" + i + ":" + i1+ ":" + i2 - endcatch - ' after the decimal seperator - n = (len (sDummy$)-i) - b = val (right (sDummy$, n) ) - c = b * 10 ^ -n - 'printlog "-------------- :"+sWert$ +" :'"+a+"' :"+n+" :"+b+" :'"+c+"':" - ' !!! val(str()) is important because of double calculating actions !!! #110996# - StrToDouble = val(str(a + c)) + endcatch + printlog "after the decimal seperator" + n = (len (sDummy$)-i) + b = val (right (sDummy$, n) ) + c = b * 10 ^ -n + 'printlog "-------------- :"+sWert$ +" :'"+a+"' :"+n+" :"+b+" :'"+c+"':" + ' !!! val(str()) is important because of double calculating actions !!! #110996# + StrToDouble = val(str(a + c)) end function '------------------------------------------------------------------------------- function fGetPositionX () as string - fGetPositionX = "" - try - ContextPositionAndSize - catch - warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" - endcatch - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - if TabPositionAndSize.exists (5) then - fGetPositionX = PositionX.GetText - TabPositionAndSize.OK - else - warnlog "Couldn't switch tab page :-( " - endif + fGetPositionX = "" + try + ContextPositionAndSize + catch + warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" + endcatch + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + if TabPositionAndSize.exists (5) then + fGetPositionX = PositionX.GetText + TabPositionAndSize.OK + else + warnlog "Couldn't switch tab page :-( " + endif end function '------------------------------------------------------------------------------- function setStartCurrentPage(optional bState as boolean) as boolean - '/// tools->options ///' + printlog " tools->options " ToolsOptions - '///+ select in section 'Presentation' tabpage 'general' ///' + printlog "+ select in section 'Presentation' tabpage 'general' " hToolsOptions ("IMPRESS","General") - '///+ check the checkbox 'Always with current page' ///' - setStartCurrentPage = MitAktuellerSeite.isChecked - if bState then - MitAktuellerSeite.Check - else - MitAktuellerSeite.UnCheck - endif + printlog "+ check the checkbox 'Always with current page' " + setStartCurrentPage = MitAktuellerSeite.isChecked + if bState then + MitAktuellerSeite.Check + else + MitAktuellerSeite.UnCheck + endif Kontext "ExtrasOptionenDlg" - '///+ close dialog 'Options - Presenation - General' with OK ///' + printlog "+ close dialog 'Options - Presenation - General' with OK " ExtrasOptionenDlg.OK end function @@ -260,11 +284,11 @@ function fIsDocumentWritable() as boolean printlog " true if the document is writeable otherwise false" Kontext "Standardbar" - if Bearbeiten.GetState(2) <> 1 then - fIsDocumentWritable = false - else - fIsDocumentWritable = true - endif + if Bearbeiten.GetState(2) <> 1 then + fIsDocumentWritable = false + else + fIsDocumentWritable = true + endif end function @@ -278,139 +302,134 @@ function fMakeDocumentWritable() as boolean Kontext "Standardbar" sleep (1) - if Bearbeiten.GetState(2) <> 1 then - Bearbeiten.Click - Kontext - if Active.Exists(1) then - Active.Yes - fMakeDocumentWritable = true + if Bearbeiten.GetState(2) <> 1 then + Bearbeiten.Click + Kontext + if Active.Exists(1) then + Active.Yes + fMakeDocumentWritable = true + else + warnlog "No messagebox after making document editable?" + fMakeDocumentWritable = false + endif else - warnlog "No messagebox after making document editable?" - fMakeDocumentWritable = false + printlog "Document is allready writable." + fMakeDocumentWritable = true endif - else - printlog "Document is allready writable." - fMakeDocumentWritable = true - endif end function '------------------------------------------------------------------------------- function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean - dim sTx as string - dim sTy as string - dim bReturn as boolean + dim sTx as string + dim sTy as string + dim bReturn as boolean - bReturn = True - try - ContextPositionAndSize - catch - warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" - endcatch - kontext - active.SetPage TabPositionAndSize - kontext "TabPositionAndSize" - if TabPositionAndSize.exists (5) then - sTx = Width.GetText - sTy = Height.GetText - TabPositionAndSize.OK - else - warnlog "Couldn't switch tab page :-( " - endif - if bGet then ' Get the Values only - sY = sTy - sX = sTx - else ' Get the Values and COMPARE them - if (LiberalMeasurement (sX,sTx) <> TRUE) then - warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519" - bReturn = False - endif - if (LiberalMeasurement (sY,sTy) <> TRUE) then - warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519" - bReturn = False - endif - bGet = bReturn - endif + bReturn = True + try + ContextPositionAndSize + catch + warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" + endcatch + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + if TabPositionAndSize.exists (5) then + sTx = Width.GetText + sTy = Height.GetText + TabPositionAndSize.OK + else + warnlog "Couldn't switch tab page :-( " + endif + if bGet then ' Get the Values only + sY = sTy + sX = sTx + else ' Get the Values and COMPARE them + if (LiberalMeasurement (sX,sTx) <> TRUE) then + warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519" + bReturn = False + endif + if (LiberalMeasurement (sY,sTy) <> TRUE) then + warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519" + bReturn = False + endif + bGet = bReturn + endif end function '------------------------------------------------------------------------- function hCallExport ( HyWhatsYourName as String , sFilter as String, optional bSelection as boolean ) as Boolean - hCallExport = TRUE - Printlog "Will try to select export filter: '" + sFilter + "'" + "" - try - FileExport - catch - Sleep 10 - Warnlog "It takes to much time to export the graphic (>10 sec.). Please check the problem, maybe it's a bug!" - FileExport - endcatch + hCallExport = TRUE + Printlog "Will try to select export filter: '" + sFilter + "'" + "" + try + FileExport + catch + Sleep 10 + Warnlog "It takes to much time to export the graphic (>10 sec.). Please check the problem, maybe it's a bug!" + FileExport + endcatch - Kontext "ExportierenDlg" - if ( ExportierenDlg.exists( 3 ) ) then - try - Dateityp.Select sFilter - catch - Warnlog "'" + sFilter + "' is missing!" - dim iAll, counter as integer - iAll = Dateityp.GetItemCount - printlog " List of entries in the menu:" - for counter = 1 to iAll - printlog " " + counter + "/" + iAll + ": " + Dateityp.GetItemText(counter) - next counter - hCallExport = FALSE - ExportierenDlg.Cancel - exit function - endcatch - if ((IsMissing(bSelection) = FALSE) AND (bSelection = TRUE)) then - sleep 2 - Selektion.Check - else - if (Selektion.isEnabled) then - Selektion.UnCheck - endif - endif + Sleep (3) + Kontext "ExportierenDlg" + try + Dateityp.Select sFilter + catch + Warnlog "'" + sFilter + "' is missing!" + dim iAll, counter as integer + iAll = Dateityp.GetItemCount + printlog " List of entries in the menu:" + for counter = 1 to iAll + printlog " " + counter + "/" + iAll + ": " + Dateityp.GetItemText(counter) + next counter + hCallExport = FALSE + ExportierenDlg.Cancel + exit function + endcatch + if ((IsMissing(bSelection) = FALSE) AND (bSelection = TRUE)) then + sleep 2 + Selektion.Check + else + if (Selektion.isEnabled) then + Selektion.UnCheck + endif + endif - if AutomatischeDateinamenserweiterung.Exists then - QAErrorLog "OBSOLETE: Automatic file extension check-box in file dialog will be removed soon!" - AutomatischeDateinamenserweiterung.check - endif + if AutomatischeDateinamenserweiterung.Exists then + QAErrorLog "OBSOLETE: Automatic file extension check-box in file dialog will be removed soon!" + AutomatischeDateinamenserweiterung.check + endif - Dateiname.SetText ( HyWhatsYourName ) - sleep 2 - Speichern.Click - sleep 2 - kontext "AlienWarning" - if AlienWarning.exists(5) then - warnlog "#i41983# Alien Warning on export not allowed" - AlienWarning.OK - endif - Kontext "Active" - if Active.Exists then - Active.Yes - endif - else - warnlog( "Dialog did not open" ) - endif - Sleep 3 + Dateiname.SetText ( HyWhatsYourName ) + sleep 2 + Speichern.Click + sleep 2 + kontext "AlienWarning" + if AlienWarning.exists(5) then + warnlog "#i41983# Alien Warning on export not allowed" + AlienWarning.OK + endif + Kontext "Active" + if Active.Exists then Active.Yes + Sleep 3 end function '------------------------------------------------------------------------- function checkexppdfwaitmax10sec - dim i as integer + dim i as integer kontext "Standardbar" - i = 0 - do - i = i + 1 - sleep 1 - if (ExportAsPDF.isEnabled = TRUE) then i = 15 - loop while ((i < 15)) - if (ExportAsPDF.isEnabled = FALSE) then - Warnlog "ExportAsPDF was NOT ok. Waited " + i + " seconds." - endif - sleep (3) + i = 0 + do + i = i + 1 + sleep 1 + if (ExportAsPDF.isEnabled = TRUE) then i = 15 + loop while ((i < 15)) + if (ExportAsPDF.isEnabled = FALSE) then + Warnlog "ExportAsPDF was NOT ok. Waited " + i + " seconds." + endif + sleep (3) end function '------------------------------------------------------------------------------- @@ -426,21 +445,21 @@ end function '------------------------------------------------------------------------------- function fConvertBackslashToSlash (sInput as string) as string - dim i as integer - dim sTemp as string - dim sI as string - dim x as integer + dim i as integer + dim sTemp as string + dim sI as string + dim x as integer - sTemp = "" - x = len (sInput) - for i = 1 to x - sI = mid(sInput, i, 1) - if (sI = "\") then - sI = "/" - endif - sTemp = sTemp + sI - next i - fConvertBackslashToSlash = sTemp + sTemp = "" + x = len (sInput) + for i = 1 to x + sI = mid(sInput, i, 1) + if (sI = "\") then + sI = "/" + endif + sTemp = sTemp + sI + next i + fConvertBackslashToSlash = sTemp end function '------------------------------------------------------------------------------- @@ -464,13 +483,13 @@ function fSaveLoadAllFormats (NewFileDir as String) Dim iFileTypeCounter as Integer Dim SavedFile(30) as String Dim iCounter as Integer - + printlog "Save the document in different formats..." FileSaveAs kontext "ExportierenDlg" For iFileTypeCounter = 1 to Dateityp.GetItemCount sleep (1) - if iFileTypeCounter > 1 then + if iFileTypeCounter > 1 then WaitSlot (2000) FileSaveAs kontext "ExportierenDlg" @@ -482,14 +501,10 @@ function fSaveLoadAllFormats (NewFileDir as String) SavedFile(iFileTypeCounter) = ("file" + (iFileTypeCounter) + "." + left(right(Dateityp.GetSelText,4),3)) Speichern.Click Kontext "Active" - if Active.Exists(2) then - Active.Yes ' File already exists, overwrite? - endif - ' printlog " Saved file ( SavedFile(" + iFileTypeCounter + ") ) as: '" + SavedFile(iFileTypeCounter) +"'." + if Active.Exists(2) then Active.Yes ' File already exists, overwrite? + 'printlog " Saved file ( SavedFile(" + iFileTypeCounter + ") ) as: '" + SavedFile(iFileTypeCounter) +"'." Kontext "AlienWarning" - if AlienWarning.Exists(2) then - AlienWarning.OK - endif + if AlienWarning.Exists(2) then AlienWarning.OK kontext "DocumentImpress" Next iFileTypeCounter printlog "Close the file." @@ -515,52 +530,52 @@ function setCharacterLanguage(sLanguage as string) as boolean Kontext Messagebox.SetPage TabFont kontext "TabFont" - sleep 1 - printlog "sLanguage = " + sLanguage - if (bAsianLan) then 'Eastern languages 'OR - try - printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText - LanguageWest.select (sLanguage) 'East - catch - printlog "Language.GetSelText = " + Language.GetSelText - Language.select (sLanguage) 'East - endcatch + sleep 1 + printlog "sLanguage = " + sLanguage + if (bAsianLan) then 'Eastern languages 'OR + try + printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText + LanguageWest.select (sLanguage) 'East + catch + printlog "Language.GetSelText = " + Language.GetSelText + Language.select (sLanguage) 'East + endcatch - setCharacterLanguage = TRUE - elseif (iSprache = 07) then - printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText - LanguageWest.select (sLanguage) - else - try + setCharacterLanguage = TRUE + elseif (iSprache = 07) then printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText LanguageWest.select (sLanguage) - catch - printlog "Language.GetSelText = " + Language.GetSelText - Language.select (sLanguage) - endcatch - setCharacterLanguage = TRUE - end if + else + try + printlog "LanguageWest.GetSelText = " + LanguageWest.GetSelText + LanguageWest.select (sLanguage) + catch + printlog "Language.GetSelText = " + Language.GetSelText + Language.select (sLanguage) + endcatch + setCharacterLanguage = TRUE + end if TabFont.Ok sleep 1 end function '------------------------------------------------------------------------------- function toggleGermanSpellchecking as string - - '/// activate old german spellchecking ///' - '///+ Tools->Options ///' + + printlog " activate old german spellchecking " + printlog "+ Tools->Options " ToolsOptions - '///+ select tabpage 'writing aids' in category 'Languagesettings' ///' + printlog "+ select tabpage 'writing aids' in category 'Languagesettings' " hToolsOptions("LANGUAGESETTINGS","WRITINGAIDS") kontext "TabLinguistik" - '///+ hopefully it never changes for any reason between the languages!: select the 8th entry 'German spelling - old' ///' + printlog "+ hopefully it never changes for any reason between the languages!: select the 8th entry 'German spelling - old' " printlog " - 'German Spelling - old' ?= " + Optionen.getItemText(8) Optionen.select(8) - '///+ default is 'unselected' - i can't check it automatically - so i depend on it! ///' - '///+ press [space] to select it///' + printlog "+ default is 'unselected' - i can't check it automatically - so i depend on it! " + printlog "+ press [space] to select it" Optionen.typeKeys "" Kontext "ExtrasOptionenDlg" - '///+ close options with OK button ///' + printlog "+ close options with OK button " ExtrasOptionenDlg.OK end function @@ -581,14 +596,14 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte dim bDifferent as boolean dim iInternError as long dim iError1 as long ' misplaced - ' i22192: context menu opens not on cursor position + 'i22192: context menu opens not on cursor position dim iError2 as long ' no context menu - '/// goto start of textbox ///' + printlog "goto start of textbox " call hTypeKeys "" - '/// for every word, check the context menu to get suggestions for correction ///' + printlog "for every word, check the context menu to get suggestions for correction " for i = 0 to (iItems-1) - '/// copy current word to clipboard ///' + printlog " copy current word to clipboard " call hTypeKeys "" EditCopy sCandidates(1) = getClipboardText() @@ -596,7 +611,7 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte sCandidates(1) = left(sCandidates(1),len(sCandidates(1))-1) end if call hTypeKeys "" - '/// open context menu ///' + printlog " open context menu " printlog " About to call the ContextMenu." call hOpenContextMenu() sleep 3 @@ -606,23 +621,23 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte printlog " If the string vnd.sun.search:SubMenu (the SunSearch-menu) is found in the menu, we'll skip that word. " - 'Get first entry. + 'Get first entry. f = MenuGetItemCommand (MenuGetItemID (1)) printlog "f = '" + f + "'." 'If it's "vnd.sun.search:SubMenu" , then skip the word. Printlog "Word not underlined, Search-Toolbar active." - if f <> "vnd.sun.search:SubMenu" then + if f <> "vnd.sun.search:SubMenu" then try ' WorkAround ## editcopy sCandidates(2) = getClipboardText() - ' printlog "******************* " + getclipboardtext() + ' printlog "******************* " + getclipboardtext() catch sCandidates(2) = "" - ' printlog "###################################################" + ' printlog "###################################################" endcatch ' if (1) is different from nonempty (2) then the wrong word is selected if (sCandidates(1) <> sCandidates(2)) then if ("" <> sCandidates(2)) then - ' printlog "############ " + sCandidates(1) + " ################## " + sCandidates(2) + " #####################" + ' printlog "############ " + sCandidates(1) + " ################## " + sCandidates(2) + " #####################" bDifferent = TRUE iError1 = iError1 + (2^i) else @@ -630,7 +645,7 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte ' no word is selected... a) not underlined b) no context menu open end if else - ' printlog "******************* " + sCandidates(1) + ' printlog "******************* " + sCandidates(1) bDifferent = FALSE end if ' check if context menu opened @@ -643,32 +658,28 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte bNoContextMenu = true iError2 = iError2 + (2^i) ' in writer it would work... :-( #i23568# - ' warnlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + ' warnlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " endcatch ' if context menu open do.... if (not bNoContextMenu) then - ' printlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + hMenuItemGetText(1) - '/// analyze context menu entries ///' + ' printlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + hMenuItemGetText(1) + printlog " analyze context menu entries " for y = 1 to x z = hMenuGetItemId(y) - if (1 = y) then - iSlot = z ' criteria for WorkAround - endif - if (z = 27019) then - iSpecialCharacterEntry = y ' entry to select for WorkAround - endif + if (1 = y) then iSlot = z ' criteria for WorkAround + if (z = 27019) then iSpecialCharacterEntry = y ' entry to select for WorkAround Printlog ("---i: "+ y +"; " + z + " ; " +hMenuItemGetText(y) + " ; " + hMenuGetItemCommand(y)) next y - '/// if first slot not a spelling suggestion -> WorkAround 112919 ///' - '/// close Context Menu ///' + printlog " if first slot not a spelling suggestion -> WorkAround 112919 " + printlog " close Context Menu " if (iSlot <> 10456) then if (not bDifferent) then ' WorkAround ## - ' qaerrorlog "" + iSlot + " UNDERLINED" + ' qaerrorlog "" + iSlot + " UNDERLINED" iTemp = iTemp + (2^i) end if call hMenuClose() else - ' printlog "" + iSlot + " not underlined" + ' printlog "" + iSlot + " not underlined" 'InsertSpecialCharacterDraw hMenuSelectNr(iSpecialCharacterEntry) ' because of bug #112919# kontext "Sonderzeichen" @@ -680,10 +691,10 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte call hMenuClose() end if Sleep (1) - '/// goto next word with keys [strg]+[right] ///' + printlog " goto next word with keys [strg]+[right] " call hTypeKeys "" next i - '/// leave textbox edit mode ///' + printlog " leave textbox edit mode " iInternError = iError1 OR iError2 if (iError1 > 0) then @@ -751,20 +762,20 @@ function fGetIntoDictionary as boolean dim bFound as boolean dim iBooks as integer dim i as integer - + iBooks = Benutzerwoerterbuch.GetItemCount i=0 bFound=TRUE while (bFound AND (i < iBooks)) - inc i - Benutzerwoerterbuch.select i - printlog Benutzerwoerterbuch.getSelText + i - try - Bearbeiten.Click - bFound = FALSE - catch - printLog "wIgLi" + i - endcatch + inc i + Benutzerwoerterbuch.select i + printlog Benutzerwoerterbuch.getSelText + i + try + Bearbeiten.Click + bFound = FALSE + catch + printLog "wIgLi" + i + endcatch wend fGetIntoDictionary = bFound end function @@ -772,15 +783,15 @@ end function '------------------------------------------------------------------------------- function hSelectInList (window, sEntry as String) as Boolean - '/// alternativ method to 'hDoubleClickInList' (without mouse) ///' - '///+ window: name of list ///' - '///+ sEntry: string to find in list ///' - '///+ ReturnValue: if found: TRUE; else FALSE ///' +printlog " alternativ method to 'hDoubleClickInList' (without mouse) " +printlog "+ window: name of list " +printlog "+ sEntry: string to find in list " +printlog "+ ReturnValue: if found: TRUE; else FALSE " Dim i as Integer Dim sTemp as String Dim sLastTemp as String - '/// go through list from bottom and stop on the entry sEntry ///' + printlog " go through list from bottom and stop on the entry sEntry " window.TypeKeys "" sTemp = "" do @@ -788,7 +799,7 @@ function hSelectInList (window, sEntry as String) as Boolean sTemp = window.GetText window.TypeKeys "" loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp)) - '/// press key [Return] ///' + printlog " press key [Return] " if (sEntry = sTemp) then window.TypeKeys "" hSelectInList = TRUE @@ -806,9 +817,9 @@ function hWalkTheStyles2 (atemp) dim itemp dim bSet dim aSettings(5,5) - ' dim atemp +' dim atemp - '/// Organizer ///' + printlog " Organizer " i=1 Kontext printlog aSettings(i,3) @@ -817,7 +828,6 @@ function hWalkTheStyles2 (atemp) printlog atemp Messagebox.SetPage TabArea kontext "TabArea" - 'press button standard :-)))))) atemp = Hatching printlog atemp @@ -829,9 +839,8 @@ function hWalkTheStyles2 (atemp) atemp.check else - ' aSettings(i,1).Uncheck +' aSettings(i,1).Uncheck endif - 'print "baeh" i=2 Kontext Messagebox.SetPage TabSchatten @@ -840,114 +849,114 @@ function hWalkTheStyles2 (atemp) Kontext Messagebox.SetPage TabVerwalten kontext "TabVerwalten" - '/// Line ///' + printlog " Line " i=2 Kontext Messagebox.SetPage TabLinie kontext "TabLinie" 'Context: *Line; Line Styles; Arrow Styles - '/// Area ///' + printlog " Area " i=3 Kontext Messagebox.SetPage TabArea kontext "TabArea" 'Context: *Area; *Shadow; Transparency; Colors; Gradients; Hatching; Bitmaps - '/// Shadowing ///' + printlog " Shadowing " i=4 Kontext Messagebox.SetPage TabSchatten kontext "TabSchatten" - '/// Transparency ///' + printlog " Transparency " i=5 Kontext Messagebox.SetPage TabTransparenz kontext "TabTransparenz" - '/// Font ///' + printlog " Font " i=6 Kontext Messagebox.SetPage TabFont kontext "TabFont" 'Context: *Font; *Font Effect; Position - '/// Font Effect ///' + printlog " Font Effect " i=7 Kontext Messagebox.SetPage TabFontEffects kontext "TabFontEffects" - '/// Indents & Spacing ///' + printlog " Indents & Spacing " i=8 Kontext Messagebox.SetPage TabEinzuegeUndAbstaende kontext "TabEinzuegeUndAbstaende" 'Context: *Indents & Spacing; *Alignment; *Tabs - '/// Text ///' + printlog " Text " i=9 Kontext Messagebox.SetPage TabText Kontext "TabText" 'Context: *Text; *Text Animation - '/// Text Animation ///' + printlog " Text Animation " i=10 Kontext Messagebox.SetPage TabLauftext Kontext "TabLauftext" - '/// Dimensioning ///' + printlog " Dimensioning " i=11 Kontext Messagebox.SetPage TabBemassung Kontext "TabBemassung" - '/// Connector ///' + printlog " Connector " i=12 Kontext Messagebox.setpage TabVerbinder Kontext "TabVerbinder" - '/// Alignment ///' + printlog " Alignment " i=13 Kontext Messagebox.setpage TabAusrichtungAbsatz Kontext "TabAusrichtungAbsatz" - '/// Tabs ///' + printlog " Tabs " i=14 Kontext Messagebox.setpage TabTabulator Kontext "TabTabulator" - ' '/// switch to tabpage 'Bullets' ///' - ' Messagebox.SetPage TabBullet - ' Kontext "TabBullet" - ' sleep 1 - ' Call DialogTest (TabBullet) - ' sleep 1 - ' Kontext - ' '/// switch to tabpage 'Numbering Type' ///' - ' Messagebox.SetPage TabNumerierungsart - ' Kontext "TabNumerierungsart" - ' sleep 1 - ' Call DialogTest (TabNumerierungsart) - ' sleep 1 - ' Kontext - ' '/// switch to tabpage 'Graphics' ///' - ' Messagebox.SetPage TabGrafiken - ' Kontext "TabGrafiken" - ' sleep 1 - ' Call DialogTest (TabGrafiken) - ' sleep 1 - ' Kontext - ' '/// switch to tabpage 'Customize' ///' - ' Messagebox.SetPage TabOptionenNumerierung - ' Kontext "TabOptionenNumerierung" - ' sleep 1 - ' Call DialogTest (TabOptionenNumerierung) - ' sleep 1 +' printlog " switch to tabpage 'Bullets' " +' Messagebox.SetPage TabBullet +' Kontext "TabBullet" +' sleep 1 +' Call DialogTest (TabBullet) +' sleep 1 +' Kontext +' printlog " switch to tabpage 'Numbering Type' " +' Messagebox.SetPage TabNumerierungsart +' Kontext "TabNumerierungsart" +' sleep 1 +' Call DialogTest (TabNumerierungsart) +' sleep 1 +' Kontext +' printlog " switch to tabpage 'Graphics' " +' Messagebox.SetPage TabGrafiken +' Kontext "TabGrafiken" +' sleep 1 +' Call DialogTest (TabGrafiken) +' sleep 1 +' Kontext +' printlog " switch to tabpage 'Customize' " +' Messagebox.SetPage TabOptionenNumerierung +' Kontext "TabOptionenNumerierung" +' sleep 1 +' Call DialogTest (TabOptionenNumerierung) +' sleep 1 end function '------------------------------------------------------------------------------- function fGetSlideNumber (optional sCompare as integer) as integer - '/// PRESUPPOSITION: open Navigator ///' - '///+ ENTRY: with or without a string ///' - '///+ if string is given, it is compared with the actual selected slidename in the navigator, if not equal print warnlog ///' - '///+ RETURN: selected slidename in the navigator / empty string if navvigator is not open ///' - '///+ EXIT: kontext on DocumentPresentation ///' + printlog " PRESUPPOSITION: open Navigator " + printlog "+ ENTRY: with or without a string " + printlog "+ if string is given, it is compared with the actual selected slidename in the navigator, if not equal print warnlog " + printlog "+ RETURN: selected slidename in the navigator / empty string if navvigator is not open " + printlog "+ EXIT: kontext on DocumentPresentation " Kontext "NavigatorDraw" printlog "Checking if navigator is open, closing and opening for updating.." @@ -956,13 +965,13 @@ function fGetSlideNumber (optional sCompare as integer) as integer sleep 3 ViewNavigator sleep 3 - '/// check in list, if the page changed ///' - + printlog " check in list, if the page changed " + else printlog "If Navigator is not open, opening it now." ViewNavigator endif - WaitSlot (2000) + sleep (1) printlog "Getting current slide number from navigator." fGetSlideNumber = val (right (Liste.GetSelText, 1)) printlog "fGetSlideNumber has the value " & fGetSlideNumber @@ -979,156 +988,154 @@ end function '------------------------------------------------------------------------------- function fGetSlideCount (optional iCount as integer) as integer - '/// purpose: open navigator in impress and check/get number of slides from listbox ///' - '///+ input : optional number of slides, to compare to: if different warnlog ///' - '///+ output : number of slides in presentation ///' + printlog " purpose: open navigator in impress and check/get number of slides from listbox " + printlog "+ input : optional number of slides, to compare to: if different warnlog " + printlog "+ output : number of slides in presentation " dim i as integer - '/// open navigator ///' - Kontext "Navigator" - if Navigator.exists then - Printlog "Navigator: open :-)" - else - Printlog "Navigator: NOT available :-( will be opened now!" - ViewNavigator - endif - Sleep 1 - '/// count rows in list of navigator: usually number of slides ///' - Kontext "NavigatorDraw" - i = Liste.GetItemCount - if (isMissing(iCount) = FALSE) then - if (i <> iCount) then - Warnlog "Error! Expected slides: '" + iCount + "'; but are '" + i +"'" - else - Printlog "ok" - endif - endif - '/// close navigator ///' - ViewNavigator - fGetSlideCount = i + printlog " open navigator " + Kontext "Navigator" + if Navigator.exists then + Printlog "Navigator: open :-)" + else + Printlog "Navigator: NOT available :-( will be opened now!" + ViewNavigator + endif + Sleep 1 + printlog " count rows in list of navigator: usually number of slides " + Kontext "NavigatorDraw" + i = Liste.GetItemCount + if (isMissing(iCount) = FALSE) then + if (i <> iCount) then + Warnlog "Error! Expected slides: '" + iCount + "'; but are '" + i +"'" + else + Printlog "ok" + endif + endif + printlog " close navigator " + ViewNavigator + fGetSlideCount = i end function '------------------------------------------------------------------------------- function fGetSlideName (optional sCompare as string) as string - '/// PRESUPPOSITION: open Navigator ///' - '///+ ENTRY: with or without a string ///' - '///+ if string is given, it is compared with the actual selected slidename in the navigator, if not equal print warnlog ///' - '///+ RETURN: selected slidename in the navigator / empty string if navvigator is not open ///' - '///+ EXIT: kontext on DocumentPresentation ///' + printlog " PRESUPPOSITION: open Navigator " + printlog "+ ENTRY: with or without a string " + printlog "+ if string is given, it is compared with the actual selected slidename in the navigator, if not equal print warnlog " + printlog "+ RETURN: selected slidename in the navigator / empty string if navvigator is not open " + printlog "+ EXIT: kontext on DocumentPresentation " Kontext "NavigatorDraw" - if NavigatorDraw.exists (5) then - sleep 3 - printlog "check in list, if the page changed" - fGetSlideName = Liste.GetSelText - else - warnlog "Navigator not open! in function fGetSlideName TBO" - Kontext "NavigatorDraw" - fGetSlideName = "" - endif - if (isMissing (sCompare) = False) then ' if optional parameter exists - printlog "fGetSlideName is: " & fGetSlideName - printlog "sCompare is: " & sCompare - if fGetSlideName <> sCompare then - warnlog " Slide Name is '" + fGetSlideName + "'; should be: '" + sCompare + "'" - endif - endif - Kontext "DocumentPresentation" + if NavigatorDraw.exists (5) then + sleep 3 + printlog "check in list, if the page changed" + fGetSlideName = Liste.GetSelText + else + warnlog "Navigator not open! in function fGetSlideName TBO" + Kontext "NavigatorDraw" + fGetSlideName = "" + endif + if (isMissing (sCompare) = False) then ' if optional parameter exists + printlog "fGetSlideName is: " & fGetSlideName + printlog "sCompare is: " & sCompare + if fGetSlideName <> sCompare then + warnlog " Slide Name is '" + fGetSlideName + "'; should be: '" + sCompare + "'" + endif + endif + Kontext "DocumentPresentation" end function '------------------------------------------------------------------------------ function fGetSetPageBackground (iSelect as integer, iWhere as integer) as integer - - '/// Get or Set the Page Background via stylist (iWhere = 0) or format menue (...= 1) ///' - '///+ if iSelect > 0 then set, else get ///' - '///+ return selected color number or -1 on error ///' + + printlog " Get or Set the Page Background via stylist (iWhere = 0) or format menue (...= 1) " + printlog "+ if iSelect > 0 then set, else get " + printlog "+ return selected color number or -1 on error " if (iWhere = 0) then - '/// Stylist -> Background -> Kontext menu -> modify -> Area -> Color ///' - fGetSetPageBackground = -1 ' worst case + printlog " Stylist -> Background -> Kontext menu -> modify -> Area -> Color " + fGetSetPageBackground = -1 ' worst case + Kontext "Stylist" + if Stylist.NotExists (5) then + FormatStylist Kontext "Stylist" - if Stylist.NotExists (5) then - FormatStylist - Kontext "Stylist" - if Stylist.NotExists (5) then - warnlog "Could not open stylist :-(" - endif - end if - Praesentationsvorlagen.Click - sleep 1 - Vorlagenliste.TypeKeys "" - hDoubleClickInList (vorlagenliste, glLocale(5), TRUE) - sleep 1 - vorlagenliste.OpenContextMenu - sleep 1 - hMenuSelectNr (1) - else - '/// Format -> Page -> Background -> Color ///''FormatPage - sleep 1 - try ' this was just paranoia to find a not mentioned messagebox - FormatSlideDraw + if Stylist.NotExists (5) then warnlog "Could not open stylist :-(" + end if + Praesentationsvorlagen.Click + sleep 1 + Vorlagenliste.TypeKeys "" + hDoubleClickInList (vorlagenliste, glLocale(5), TRUE) + sleep 1 + vorlagenliste.OpenContextMenu + sleep 1 + hMenuSelectNr (1) + else + printlog " Format -> Page -> Background -> Color "'FormatPage + sleep 1 + try ' this was just paranoia to find a not mentioned messagebox + FormatSlideDraw catch - warnlog "slooooow slot TBO :-(" - exit function - endcatch - sleep 1 - Kontext - if (active.getrt = 373) then - Active.SetPage TabArea - else - warnlog active.getrt - if (active.getrt = 304) then - warnlog active.gettext - endif - endif ' paranoia end ---------------------------------------------- - endif + warnlog "slooooow slot TBO :-(" + exit function + endcatch + sleep 1 + Kontext + if (active.getrt = 373) then + Active.SetPage TabArea + else + warnlog active.getrt + if (active.getrt = 304) then + warnlog active.gettext + endif + endif ' paranoia end ---------------------------------------------- + endif - kontext "TabArea" - if TabArea.exists then - FillOptions.Select 2 ' Select "Colour" - if (iSelect > 1) then ' Select the entry - ' Color.Check - if (iSelect < ColourList.GetItemCount) then - ColourList.Select iSelect - else - warnlog "Select entry is larger than list :-(" - endif + kontext "TabArea" + if TabArea.exists then + FillOptions.Select 2 ' Select "Colour" + if (iSelect > 1) then ' Select the entry +' Color.Check + if (iSelect < ColourList.GetItemCount) then + ColourList.Select iSelect + else + warnlog "Select entry is larger than list :-(" + endif + fGetSetPageBackground = ColourList.GetSelIndex + if fGetSetPageBackground = 0 then + warnlog "There were no color selected in the list." + endif + TabArea.OK + sleep 2 + kontext + if (active.exists (2)) then + warnlog "active about : '" + active.gettext + "'" + active.yes + else + printlog "No message about 'changing the background for all pages ?' :-(" + endif + else ' yust read the selected entry + if FillOptions.GetSelIndex = 2 then fGetSetPageBackground = ColourList.GetSelIndex - if fGetSetPageBackground = 0 then - warnlog "There were no color selected in the list." - endif - TabArea.OK - sleep 2 - kontext - if (active.exists (2)) then - warnlog "active about : '" + active.gettext + "'" - active.yes - else - printlog "No message about 'changing the background for all pages ?' :-(" - endif - else ' yust read the selected entry - if FillOptions.GetSelIndex = 2 then - fGetSetPageBackground = ColourList.GetSelIndex - TabArea.Cancel - else - warnlog "Can't get value, because something different than color is selected :-(" - endif - endif - else - kontext "TabFont" - if TabFont.exists then - Warnlog "Something wrong with the word " + glLocale(5) + ". It was either not found or wrong." - else - warnlog "Error: Can't get context menu ?" - endif - endif + TabArea.Cancel + else + warnlog "Can't get value, because something different than color is selected :-(" + endif + endif + else + kontext "TabFont" + if TabFont.exists then + Warnlog "Something wrong with the word " + glLocale(5) + ". It was either not found or wrong." + else + warnlog "Error: Can't get context menu ?" + endif + endif - if (iWhere = 0) then - sleep 1 ' ABSOLUT NECESSARRY !!! (TBO) else crash on UNIX on following command!!!! + if (iWhere = 0) then + sleep 1 ' ABSOLUT NECESSARY !!! (TBO) else crash on UNIX on following command!!!! FormatStylist ' closing - endif - sleep 4 + endif + sleep 4 end function '------------------------------------------------------------------------------ @@ -1138,31 +1145,31 @@ function CreateTextSetEffectAndAngle SetClipBoard "Revenue" DocumentImpress.TypeKeys "" SlideShowCustomAnimation - Kontext "Tasks" - WaitSlot (1000) - EffectAdd.Click - kontext - '/// Switch to TabPage: Entrance ///' - active.setPage(TabEntrance) - kontext "TabEntrance" - if TabEntrance.exists(5) then - '/// select in the listbox 'Effects' the second entry///' - Effects.select (24) - '/// select speed 'Fast' -> fourth item in list ///' - Speed.Select 2 - TabEntrance.OK - end if - kontext "tasks" - EffectStart.TypeKeys "" 'Select the second entry. + Kontext "Tasks" + WaitSlot (1000) + EffectAdd.Click + kontext + printlog " Switch to TabPage: Entrance " + active.setPage(TabEntrance) + kontext "TabEntrance" + if TabEntrance.exists(5) then + printlog " select in the listbox 'Effects' the second entry" + Effects.select (24) + printlog " select speed 'Fast' -> fourth item in list " + Speed.Select 2 + TabEntrance.OK + end if + kontext "tasks" + EffectStart.TypeKeys "" 'Select the second entry. - kontext "DocumentImpress" - FormatPositionAndSize - WaitSlot (1000) - kontext - active.setPage(TabDrehung) - kontext "TabDrehung" + kontext "DocumentImpress" + FormatPositionAndSize + WaitSlot (1000) + kontext + active.setPage(TabDrehung) + kontext "TabDrehung" - Winkel.TypeKeys "45" + Winkel.TypeKeys "45" TabDrehung.OK WaitSlot (1000) kontext "DocumentImpress" @@ -1171,34 +1178,34 @@ end function '------------------------------------------------------------------------------- function fGetPresentationStyle (optional sCompare as integer) as integer - '///+ ENTRY: with or without a string ///' - '///+ if string is given, it is compared with the LAST CHARACTER of the actual selected style in the stylist, if not equal print warnlog ///' - '///+ RETURN: LAST CHARACTER of the actual selected style in the stylist ///' + printlog "+ ENTRY: with or without a string " + printlog "+ if string is given, it is compared with the LAST CHARACTER of the actual selected style in the stylist, if not equal print warnlog " + printlog "+ RETURN: LAST CHARACTER of the actual selected style in the stylist " dim sTemp as integer dim sTemp0 as string - + sTemp = (-1) - '/// open stylist if not already open: Format->Stylist ///' + printlog " open stylist if not already open: Format->Stylist " kontext "Stylist" if (Stylist.exists = FALSE) then - try - FormatStylist - catch - sleep 1 - endcatch + try + FormatStylist + catch + sleep 1 + endcatch endif kontext "Stylist" if Stylist.exists(5) then - sTemp0 = Vorlagenliste.GetSeltext - sTemp = val(right (sTemp0, 1)) - if (isMissing (sCompare) = False) then ' if optional parameter exists - if sTemp <> sCompare then - Warnlog "Style Name's last character is '" + sTemp + "'; should be: '" + sCompare + "'" - endif - endif - FormatStylist + sTemp0 = Vorlagenliste.GetSeltext + sTemp = val(right (sTemp0, 1)) + if (isMissing (sCompare) = False) then ' if optional parameter exists + if sTemp <> sCompare then + Warnlog "Style Name's last character is '" + sTemp + "'; should be: '" + sCompare + "'" + endif + endif + FormatStylist else - Warnlog "The Stylist could not be opened for unknown reasons :-(" + Warnlog "The Stylist could not be opened for unknown reasons :-(" endif fGetPresentationStyle = sTemp end function @@ -1242,23 +1249,23 @@ function wIgnorierenlisteLoeschen as boolean exit function end if Kontext "BenutzerwoerterbuchBearbeiten" - sleep 1 - iBooks = Buch.GetItemCount - for i = 1 to iBooks - Buch.Select i - if Left$(Buch.GetSelText,13)="IgnoreAllList" then - sleep 2 - while (Loeschen.IsEnabled) - Loeschen.Click - sleep 1 - wend - end if - next i + sleep 1 + iBooks = Buch.GetItemCount + for i = 1 to iBooks + Buch.Select i + if Left$(Buch.GetSelText,13)="IgnoreAllList" then + sleep 2 + while (Loeschen.IsEnabled) + Loeschen.Click + sleep 1 + wend + end if + next i Kontext "BenutzerwoerterbuchBearbeiten" - BenutzerwoerterbuchBearbeiten.Cancel + BenutzerwoerterbuchBearbeiten.Cancel Kontext "ExtrasOptionenDlg" - ExtrasOptionenDlg.OK - wIgnorierenlisteLoeschen = TRUE + ExtrasOptionenDlg.OK + wIgnorierenlisteLoeschen = TRUE end function '------------------------------------------------------------------------------- @@ -1277,121 +1284,121 @@ function optionstest dim etshap as integer dim etgt as integer - Kontext "Tasks" - EffectOptions.Click - kontext "TabEffect" - if TabEffect.Exists(5) then - optsound = Sound.GetItemCount - for os = 1 to optsound - Sound.Select os - kontext "OeffnenDlg" - if OeffnenDlg.Exists (5) then - filedialogue = TRUE - OeffnenDlg.Close - kontext "TabEffect" - else - kontext "TabEffect" - endif - next os - if AfterAnimation.isEnabled AND AfterAnimation.isVisible then - for oa = 1 to AfterAnimation.GetItemCount - AfterAnimation.Select oa - if DimColor.isEnabled then - for odc = 1 to DimColor.GetItemCount - DimColor.Select odc - next odc - endif - if DelayBetweenCharacters.isEnabled then - for odc = 1 to DelayBetweenCharacters.GetItemCount - DelayBetweenCharacters.Select odc - next odc - endif - next oa - else - if DelayBetweenCharacters.isEnabled then - for odc = 1 to DelayBetweenCharacters.GetItemCount - DelayBetweenCharacters.Select odc - next odc - endif - endif - for ota = 1 to TextAnimation.GetItemCount - TextAnimation.Select ota - next ota - '/// switch to TabPage 'Timing' ///' - Kontext - Active.SetPage TabTiming - kontext "TabTiming" - if TabTiming.Exists(5) then - for ets = 1 to TimingStart.GetItemCount - TimingStart.Select ets - next ets - if Delay.isVisible AND Delay.isEnabled then - Delay.GetText - else - Warnlog "Delay in Effect Options were not to be found." - endif - if Speed.isVisible AND Speed.isEnabled then - for etspeed = 1 to Speed.GetItemCount - Speed.Select etspeed - next etspeed - else - printlog " No Speed-entry for this effect." - endif - if Repeat.isVisible AND Repeat.isEnabled then - for etrep = 1 to Speed.GetItemCount - Repeat.Select etrep - next etrep - else - Printlog "Repeat in Effect Options were not to be found." - endif - Rewind.Check - Rewind.UnCheck - TriggerAnimate.IsChecked - TriggerStart.IsChecked - if Shape.isVisible AND Shape.isEnabled then - for etshap = 1 to Shape.GetItemCount - Shape.Select etshap - next etshap - else - Warnlog "Shape in Effect Options were not to be found." - endif - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." - endif - '/// switch to TabPage 'Timing' ///' - Kontext - active.setPage TabTextAnimation - kontext "TabTextAnimation" - if TabTextAnimation.Exists(5) then - lala = GroupText.GetItemCount - for etgt = 1 to lala - GroupText.Select etgt - if AutomaticallyAfter.IsEnabled then - AutomaticallyAfter.Check - AutomaticallyAfter.TypeKeys "" - endif - if AnimateAttachedShape.IsEnabled then - AnimateAttachedShape.Check - if AnimateAttachedShape.IsChecked = FALSE then + Kontext "Tasks" + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + optsound = Sound.GetItemCount + for os = 1 to optsound + Sound.Select os + kontext "OeffnenDlg" + if OeffnenDlg.Exists (5) then + filedialogue = TRUE + OeffnenDlg.Close + kontext "TabEffect" + else + kontext "TabEffect" + endif + next os + if AfterAnimation.isEnabled AND AfterAnimation.isVisible then + for oa = 1 to AfterAnimation.GetItemCount + AfterAnimation.Select oa + if DimColor.isEnabled then + for odc = 1 to DimColor.GetItemCount + DimColor.Select odc + next odc + endif + if DelayBetweenCharacters.isEnabled then + for odc = 1 to DelayBetweenCharacters.GetItemCount + DelayBetweenCharacters.Select odc + next odc + endif + next oa + else + if DelayBetweenCharacters.isEnabled then + for odc = 1 to DelayBetweenCharacters.GetItemCount + DelayBetweenCharacters.Select odc + next odc + endif + endif + for ota = 1 to TextAnimation.GetItemCount + TextAnimation.Select ota + next ota + printlog " switch to TabPage 'Timing' " + Kontext + Active.SetPage TabTiming + kontext "TabTiming" + if TabTiming.Exists(5) then + for ets = 1 to TimingStart.GetItemCount + TimingStart.Select ets + next ets + if Delay.isVisible AND Delay.isEnabled then + Delay.GetText + else + Warnlog "Delay in Effect Options were not to be found." + endif + if Speed.isVisible AND Speed.isEnabled then + for etspeed = 1 to Speed.GetItemCount + Speed.Select etspeed + next etspeed + else + printlog " No Speed-entry for this effect." + endif + if Repeat.isVisible AND Repeat.isEnabled then + for etrep = 1 to Speed.GetItemCount + Repeat.Select etrep + next etrep + else + Printlog "Repeat in Effect Options were not to be found." + endif + Rewind.Check + Rewind.UnCheck + TriggerAnimate.IsChecked + TriggerStart.IsChecked + if Shape.isVisible AND Shape.isEnabled then + for etshap = 1 to Shape.GetItemCount + Shape.Select etshap + next etshap + else + Warnlog "Shape in Effect Options were not to be found." + endif + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." + endif + printlog " switch to TabPage 'Timing' " + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.Exists(5) then + lala = GroupText.GetItemCount + for etgt = 1 to lala + GroupText.Select etgt + if AutomaticallyAfter.IsEnabled then + AutomaticallyAfter.Check + AutomaticallyAfter.TypeKeys "" + endif + if AnimateAttachedShape.IsEnabled then + AnimateAttachedShape.Check + if AnimateAttachedShape.IsChecked = FALSE then Warnlog "AnimateAttachedShape should have been checked" - endif - endif - if InreverseOrder.IsEnabled then - InreverseOrder.Check - if InreverseOrder.IsChecked = FALSE then + endif + endif + if InreverseOrder.IsEnabled then + InreverseOrder.Check + if InreverseOrder.IsChecked = FALSE then Warnlog "InreverseOrder should have been checked" - endif - endif - next etgt - TabTextAnimation.Cancel + endif + endif + next etgt + TabTextAnimation.Cancel + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." + endif else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." endif - else - warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." - endif - Kontext "Tasks" - + Kontext "Tasks" + end function '------------------------------------------------------------------------------- @@ -1410,124 +1417,124 @@ function optionstest2 dim etshap as integer dim etgt as integer - Kontext "Tasks" - EffectOptions.Click - kontext "TabEffect" - if TabEffect.Exists(5) then - Sound.Select 5 - sleep 4 - if Play.IsEnabled then - Play.Click - else - warnlog " Play should have been enabled after selecting a sound." - endif - AfterAnimation.Select 2 - if DimColor.isEnabled then - DimColor.Select 5 - else - Warnlog "DimColor should have been enabled" - endif - TextAnimation.Select 3 - if DelayBetweenCharacters.isEnabled then - DelayBetweenCharacters.More 5 - else - Warnlog "DelayBetweenCharacters should have been enabled" - endif - '/// switch to TabPage 'Timing' ///' - Kontext - Active.SetPage TabTiming - kontext "TabTiming" - if TabTiming.Exists(5) then - TimingStart.Select 2 - if Delay.isVisible AND Delay.isEnabled then - Delay.More 5 - else - Warnlog "Delay in Effect Options were not to be found." - endif - if Speed.isVisible AND Speed.isEnabled then - Speed.Select 3 - else - Printlog "Speed in Effect Options were not to be found." - endif - if Repeat.isVisible then - if Repeat.isEnabled then + Kontext "Tasks" + EffectOptions.Click + kontext "TabEffect" + if TabEffect.Exists(5) then + Sound.Select 5 + sleep 4 + if Play.IsEnabled then + Play.Click + else + warnlog "Play should have been enabled after selecting a sound." + endif + AfterAnimation.Select 2 + if DimColor.isEnabled then + DimColor.Select 5 + else + Warnlog "DimColor should have been enabled" + endif + TextAnimation.Select 3 + if DelayBetweenCharacters.isEnabled then + DelayBetweenCharacters.More 5 + else + Warnlog "DelayBetweenCharacters should have been enabled" + endif + printlog " switch to TabPage 'Timing' " + Kontext + Active.SetPage TabTiming + kontext "TabTiming" + if TabTiming.Exists(5) then + TimingStart.Select 2 + if Delay.isVisible AND Delay.isEnabled then + Delay.More 5 + else + Warnlog "Delay in Effect Options were not to be found." + endif + if Speed.isVisible AND Speed.isEnabled then + Speed.Select 3 + else + Printlog "Speed in Effect Options were not to be found." + endif + if Repeat.isVisible then + if Repeat.isEnabled then for etrep = 1 to Speed.GetItemCount Repeat.Select etrep next etrep - else + else Warnlog "Repeat in Effect Options were not enabled." - endif - else - Warnlog "Repeat in Effect Options were not visible." - endif - if Rewind.isVisible then - if Rewind.isEnabled then + endif + else + Warnlog "Repeat in Effect Options were not visible." + endif + if Rewind.isVisible then + if Rewind.isEnabled then Rewind.Check - else + else Printlog "Rewind in Effect Options were not to be found." - endif - else - Printlog "Rewind in Effect Options were not to be found." - endif - if Rewind.isVisible then - if Rewind.isEnabled then + endif + else + Printlog "Rewind in Effect Options were not to be found." + endif + if Rewind.isVisible then + if Rewind.isEnabled then Rewind.Check Rewind.UnCheck - else + else Warnlog "Rewind in Effect Options were not enabled." - endif - else - Warnlog "Rewind in Effect Options were not visible." - endif - TriggerAnimate.IsChecked - TriggerStart.IsChecked - if Shape.isVisible then - if Shape.isEnabled then + endif + else + Warnlog "Rewind in Effect Options were not visible." + endif + TriggerAnimate.IsChecked + TriggerStart.IsChecked + if Shape.isVisible then + if Shape.isEnabled then for etshap = 1 to Shape.GetItemCount Shape.Select etshap next etshap - else + else Warnlog "Shape in Effect Options were not to be found." - endif - else - Warnlog "Shape in Effect Options were not to be found." - endif - else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." - endif - '/// switch to TabPage 'Timing' ///' - Kontext - active.setPage TabTextAnimation - kontext "TabTextAnimation" - if TabTextAnimation.Exists(5) then - lala = GroupText.GetItemCount - for etgt = 1 to lala - GroupText.Select etgt - if AutomaticallyAfter.IsEnabled then - AutomaticallyAfter.Check - AutomaticallyAfter.TypeKeys "" - endif - if AnimateAttachedShape.IsEnabled then - AnimateAttachedShape.Check - if AnimateAttachedShape.IsChecked = FALSE then + endif + else + Warnlog "Shape in Effect Options were not to be found." + endif + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work." + endif + printlog " switch to TabPage 'Timing' " + Kontext + active.setPage TabTextAnimation + kontext "TabTextAnimation" + if TabTextAnimation.Exists(5) then + lala = GroupText.GetItemCount + for etgt = 1 to lala + GroupText.Select etgt + if AutomaticallyAfter.IsEnabled then + AutomaticallyAfter.Check + AutomaticallyAfter.TypeKeys "" + endif + if AnimateAttachedShape.IsEnabled then + AnimateAttachedShape.Check + if AnimateAttachedShape.IsChecked = FALSE then Warnlog "AnimateAttachedShape should have been checked" - endif - endif - if InreverseOrder.IsEnabled then - InreverseOrder.Check - if InreverseOrder.IsChecked = FALSE then + endif + endif + if InreverseOrder.IsEnabled then + InreverseOrder.Check + if InreverseOrder.IsChecked = FALSE then Warnlog "InreverseOrder should have been checked" - endif - endif - next etgt - TabTextAnimation.Cancel + endif + endif + next etgt + TabTextAnimation.Cancel + else + warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." + endif else - warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work." + warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." endif - else - warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work." - endif - Kontext "Tasks" - + Kontext "Tasks" + end function '------------------------------------------------------------------------------- diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc index 25c07170c9f3..d0335997d2f4 100755 --- a/testautomation/graphics/tools/id_tools_2.inc +++ b/testautomation/graphics/tools/id_tools_2.inc @@ -37,44 +37,95 @@ '* '\****************************************************************************** +'Subs: +' #1 sFileExport +' #1 callAutocorrectOptions +' #1 sCheckCheck +' #1 sCheckUnderlined +' #1 sCheckSupperscript +' #1 sCheckDash +' #1 sPrintCheckOrder +' #1 writertest +' #1 calctest +' #1 tClipboardFromDrawTest +' #1 Select_Copy +' #1 SaveMeasurementSetFirst +' #1 MeasurementSetFirst +' #1 ResetMeasurement +' #1 SetKontextApplication +' #1 hSetSpellHypLanguage +' #1 hTBOtypeInDoc +' #1 Position_Vergleichen +' #1 g_demoguide +' #1 sFormatTextDrawAnimation +' #1 mouseclickinpresentation +' #1 im_002_ +' #1 im_003_ +' #1 im_004_ +' #1 im_005_ +' #1 im_007_ +' #1 im_011_ +' #1 D_002_ +' #1 D_003_ +' #1 D_005_ +' #1 d_007 +' #1 hOpenGallery +' #1 LoadGraphic +' #1 CheckGraphic +' #1 GetOnlyGraphics +' #1 tSettingsToCM +' #1 tResetSettings +' #1 id_001 +' #1 id_002 +' #1 id_003 +' #1 id_004 +' #1 id_005 +' #1 id_006 +' #1 id_007 +' #1 id_008 +' #1 id_009 +' #1 id_011 +' #1 hWalkTheStyles + +'\***************************************************************** + sub sFileExport - '/// just exporting is done in qatesttool/framework/first test: 'tGraphicExport' but there is no loading, ///' - '///+ of the created files and the items on the dialogs are not checked completely ///' + printlog " just exporting is done in qatesttool/framework/first test: 'tGraphicExport' but there is no loading, " + printlog "+ of the created files and the items on the dialogs are not checked completely " Dim ExZaehler as Integer Dim ExPath as String Dim Liste( 50 ) as String - - if (gApplication = "IMPRESS") then - ExtensionString = "odp" + + if (gApplication = "IMPRESS") then + ExtensionString = "odp" else - ExtensionString = "odg" + ExtensionString = "odg" end if - '///- all files are saved in [StarOfficePath]/user/work/[applicatoion]/export ///' + printlog "- all files are saved in [StarOfficePath]/user/work/[application]/export " ExPath = ConvertPath (gOfficePath + "user\work\" + gApplication + "\export\" ) OutputGrafikTBO = ExPath & "expo" - Printlog "Create the export-dir for the graphics ( " + ExPath + " )" + Printlog "Create the export-dir for the graphics ( + ExPath + )" try - app.mkDir ( ExPath ) - ExZaehler = GetFileList ( ExPath , "*.*" , Liste() ) - if ExZaehler <> 0 then - Printlog "The export-dir exists. The test want to delete all Files ( " + ExZaehler + " )!" - if KillFileList ( Liste() ) = FALSE then - Warnlog "Not all files can be deleted. " + ListCount ( Liste() ) + " files exists!" - end if - end if + app.mkDir ( ExPath ) + ExZaehler = GetFileList ( ExPath , "*.*" , Liste() ) + if ExZaehler <> 0 then + Printlog "The export-dir exists. The test want to delete all Files ( " + ExZaehler + " )!" + if KillFileList ( Liste() ) = FALSE then + Warnlog "Not all files can be deleted. " + ListCount ( Liste() ) + " files exists!" + end if + end if catch - Warnlog "An error at creating the export-dir, the test ends!" - exit sub + Warnlog "An error at creating the export-dir, the test ends!" + exit sub endcatch - - '///+ open the test document qatesttool/graphics/required/input/graphicexport.od ? ] ///' + + printlog "+ open the test document qatesttool/graphics/required/input/graphicexport.od ? ] " end sub -'------------------------------------------------------------------------------- - +'------------------------------------------------------------------------- sub callAutocorrectOptions ToolsAutocorrect @@ -84,35 +135,33 @@ sub callAutocorrectOptions end sub '------------------------------------------------------------------------------- - sub sCheckCheck (i, Pruefung$, bEnabled) hTextrahmenErstellen (Pruefung$,20,20,60,40) select case i - ' Disabled sCheckUnderlined due to start of external program (web-browser) - FHA - case 5: bEnabled 'sCheckUnderlined (bEnabled) - case 6: sCheckSupperscript (bEnabled) - case 8: sCheckDash (bEnabled) - case else: - hTypeKeys "" - EditCopy - if (GetClipboardText = Pruefung$) then ' not replaced - if bEnabled then ' not as expected - warnlog "- replacement failed" +' Disabled sCheckUnderlined due to start of external program (web-browser) - FHA + case 5: bEnabled 'sCheckUnderlined (bEnabled) + case 6: sCheckSupperscript (bEnabled) + case 8: sCheckDash (bEnabled) + case else: + hTypeKeys "" + EditCopy + if (GetClipboardText = Pruefung$) then ' not replaced + if bEnabled then ' not as expected + warnlog "- replacement failed" + endif + else ' replaced + if not bEnabled then ' not as expected + warnlog "- replacement failed : '" + Pruefung$ + "' - '" + GetClipboardText + "'" + endif endif - else ' replaced - if not bEnabled then ' not as expected - warnlog "- replacement failed : '" + Pruefung$ + "' - '" + GetClipboardText + "'" - endif - endif end select hTypeKeys "" end sub '------------------------------------------------------------------------------- - sub sCheckUnderlined (bEnabled) dim btemp as boolean @@ -133,7 +182,6 @@ sub sCheckUnderlined (bEnabled) end sub '------------------------------------------------------------------------------- - sub sCheckSupperscript (bEnabled) hTypeKeys "" @@ -148,7 +196,6 @@ sub sCheckSupperscript (bEnabled) end sub '------------------------------------------------------------------------------- - sub sCheckDash (bEnabled) ' inserted is 45 @@ -164,250 +211,241 @@ sub sCheckDash (bEnabled) end sub '------------------------------------------------------------------------------- - sub sPrintCheckOrder (optional bcheck as boolean) - dim sTemp as string - dim sTemp2 as string - dim i as integer - '/// deselect all ///' - Printlog "-----------------------------------" - '/// select in default order and take Position X in mind ;-) ///' - hTypeKeys ("") - for i = 1 to 3 - hTypeKeys ("") - sTemp = fGetPositionX() - Printlog " - " + i +": " + sTemp - if ((isMissing(bcheck) <> FALSE) AND (bcheck = TRUE)) then - Select Case i + dim sTemp as string + dim sTemp2 as string + dim i as integer + printlog " deselect all " + Printlog "-----------------------------------" + printlog " select in default order and take Position X in mind ;-) " + hTypeKeys ("") + for i = 1 to 3 + hTypeKeys ("") + sTemp = fGetPositionX() + Printlog " - " + i +": " + sTemp + if ((isMissing(bcheck) <> FALSE) AND (bcheck = TRUE)) then + Select Case i Case 1: sTemp2 = Ueber_Text_1 Case 2: sTemp2 = Ueber_Text_2 Case 3: sTemp2 = Ueber_Text_3 - End Select - if sTemp <> sTemp2 then - warnlog " + " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";" - end if - endif - next i - hTypeKeys ("") - Printlog "-----------------------------------" + End Select + if sTemp <> sTemp2 then + warnlog " + " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";" + end if + endif + next i + hTypeKeys ("") + Printlog "-----------------------------------" end sub '--------------------------- Tests for Writer ---------------------------------- - sub writertest - try - call Make_And_Check_Formatted_Text_Line_From_Application - catch - warnlog "Something went wrong with testing writertest" - endcatch + try + call Make_And_Check_Formatted_Text_Line_From_Application + catch + warnlog "Something went wrong with testing writertest" + endcatch - try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc - catch - warnlog "something wrong with testing writertest" - endcatch + try + call Make_Rectangle_From_Application + call Full_test_Draw + call Full_test_Impress + call Full_test_Writer + call Full_test_Calc + catch + warnlog "something wrong with testing writertest" + endcatch end sub ' big one '---------------------------- Tests for Calc ----------------------------------- - sub calctest - try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc - catch - warnlog "something wrong with calctest" - endcatch - printlog "currently no specific tests from Calc" +try + call Make_Rectangle_From_Application + call Full_test_Draw + call Full_test_Impress + call Full_test_Writer + call Full_test_Calc +catch + warnlog "something wrong with calctest" +endcatch + printlog "currently no specific tests from Calc" end sub '------------------------------------------------------------------------------- - sub tClipboardFromDrawTest EnableQAErrors = false FromApp2 = gApplication printlog "gApplication = " + gApplication - + if gApplication = "WRITER" then - call writertest - exit sub + call writertest + exit sub end if - + if gApplication = "CALC" then - call calctest - exit sub + call calctest + exit sub end if end sub '------------------------------------------------------------------------------- - sub Select_Copy - '/// Select and copy ///' - ' Removed by JSK: Sleep 10 - if gApplication = "DRAW" then - hUseAsyncSlot( "EditSelectAll" ) - printlog " We just ran EditSelectAll - Application is Draw" - end if - if gApplication = "IMPRESS" then - hUseAsyncSlot( "EditSelectAll" ) - printlog " We just ran EditSelectAll - Application is Impress" - end if - ' Removed by JSK: Sleep 2 - hUseAsyncSlot( "EditCopy" ) - ' Removed by JSK: Sleep 2 - printlog " Copied object" + printlog " Select and copy " + Sleep 10 + if gApplication = "DRAW" then + EditSelectAll + printlog " We just ran EditSelectAll - Application is Draw" + end if + if gApplication = "IMPRESS" then + EditSelectAll + printlog " We just ran EditSelectAll - Application is Impress" + end if + Sleep 2 + EditCopy + Sleep 2 + printlog " Copied object" end Sub '------------------------------------------------------------------------------- - sub SaveMeasurementSetFirst if (gApplication = "DRAW") then - sApplication = "DRAWING" + sApplication = "DRAWING" elseIf (gApplication = "IMPRESS") then - sApplication = "IMPRESS" + sApplication = "IMPRESS" elseIf (gApplication = "WRITER") then - sApplication = "WRITER" + sApplication = "WRITER" elseIf (gApplication = "CALC") then - sApplication = "CALC" + sApplication = "CALC" endif - printlog " - save states " + printlog " - save states " ToolsOptions - hToolsOptions (sApplication,"General") - ReferenceOld = Masseinheit.GetSelText - Masseinheit.TypeKeys= "" '(first entry) - ReferenceNew = Masseinheit.GetSelText - Kontext "ExtrasOptionenDlg" + hToolsOptions (sApplication,"General") + ReferenceOld = Masseinheit.GetSelText + Masseinheit.TypeKeys= "" '(first entry) + ReferenceNew = Masseinheit.GetSelText + Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK end Sub '------------------------------------------------------------------------------- - sub MeasurementSetFirst dim f as integer if (gApplication = "DRAW") then - sApplication = "DRAWING" + sApplication = "DRAWING" elseIf (gApplication = "IMPRESS") then - sApplication = "IMPRESS" + sApplication = "IMPRESS" elseIf (gApplication = "WRITER") then - sApplication = "WRITER" + sApplication = "WRITER" elseIf (gApplication = "CALC") then - sApplication = "CALC" + sApplication = "CALC" endif ToolsOptions - hToolsOptions (sApplication,"General") - if Masseinheit.GetSelText <> ReferenceNew then 'find the right one. + hToolsOptions (sApplication,"General") + if Masseinheit.GetSelText <> ReferenceNew then 'find the right one. Masseinheit.TypeKeys "" for f = 1 to Masseinheit.GetItemCount if Masseinheit.GetSelText = ReferenceNew then - i = Masseinheit.GetItemCount 'find the right one. + i = Masseinheit.GetItemCount 'find the right one. else - Masseinheit.TypeKeys "" + Masseinheit.TypeKeys "" endif next f - endif - Kontext "ExtrasOptionenDlg" + endif + Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK end Sub '------------------------------------------------------------------------------- - sub ResetMeasurement dim f as integer if (gApplication = "DRAW") then - sApplication = "DRAWING" + sApplication = "DRAWING" elseIf (gApplication = "IMPRESS") then - sApplication = "IMPRESS" + sApplication = "IMPRESS" elseIf (gApplication = "WRITER") then - sApplication = "WRITER" + sApplication = "WRITER" elseIf (gApplication = "CALC") then - sApplication = "CALC" + sApplication = "CALC" endif printlog " - Reset states back to what they were before " ToolsOptions - hToolsOptions (sApplication,"General") - if Masseinheit.GetSelText <> ReferenceOld then 'find the right one. + hToolsOptions (sApplication,"General") + if Masseinheit.GetSelText <> ReferenceOld then 'find the right one. Masseinheit.TypeKeys "" for f = 1 to Masseinheit.GetItemCount if Masseinheit.GetSelText = ReferenceOld then - i = Masseinheit.GetItemCount 'find the right one. + i = Masseinheit.GetItemCount 'find the right one. else - Masseinheit.TypeKeys "" + Masseinheit.TypeKeys "" endif next f - endif - Kontext "ExtrasOptionenDlg" + endif + Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK end Sub '------------------------------------------------------------------------------- - sub SetKontextApplication - ' Removed by JSK: sleep 1 - Select Case gApplication - Case "DRAW" - Kontext "DocumentDraw" - Printlog "gApplication / Kontext is now: DocumentDraw" - sleep 1 - Case "IMPRESS" - Kontext "DocumentImpress" - Printlog "gApplication / Kontext is now is now: DocumentImpress" - sleep 1 - Case "WRITER" - Kontext "DocumentWriter" - Printlog "gApplication / Kontext is now is now: DocumentWriter" - sleep 1 - Case "CALC" - Kontext "DocumentCalc" - Printlog "gApplication / Kontext is now is now: DocumentCalc" - sleep 1 - end select sleep 1 + Select Case gApplication + Case "DRAW" + Kontext "DocumentDraw" + 'Printlog "gApplication / Kontext is now: DocumentDraw" + sleep 1 + Case "IMPRESS" + Kontext "DocumentImpress" + 'Printlog "gApplication / Kontext is now is now: DocumentImpress" + sleep 1 + Case "WRITER" + Kontext "DocumentWriter" + 'Printlog "gApplication / Kontext is now is now: DocumentWriter" + sleep 1 + Case "CALC" + Kontext "DocumentCalc" + 'Printlog "gApplication / Kontext is now is now: DocumentCalc" + sleep 1 + end select + sleep 1 end sub '------------------------------------------------------------------------------- sub hSetSpellHypLanguage - '/// select a language with a dictionary, used for spellcheck, thesaurus and hyphenation ///' +printlog " select a language with a dictionary, used for spellcheck, thesaurus and hyphenation " dim sTrieit as string ' only for asian languages i need to set the default language for the current document to 'English(USA)' ' in all other languages the default has a dictionary if (bAsianLan or (iSprache=55)) then - '/// Tools->Options ///' + printlog " Tools->Options " ToolsOptions - '/// select from section 'Language Settings' the item 'Languages' ///' + printlog " select from section 'Language Settings' the item 'Languages' " hToolsOptions ("LANGUAGESETTINGS","LANGUAGES") - '/// check checkbox 'For the current document only' in section 'Default languages for document' ///' + printlog " check checkbox 'For the current document only' in section 'Default languages for document' " AktuellesDokument.Check - '/// If there is no Language defined in 'locale-file' (in same directory as this file is) be smart and select one that supports spellchecking ///' + printlog " If there is no Language defined in 'locale-file' (in same directory as this file is) be smart and select one that supports spellchecking " if (glLocale(4) = "") then Kontext "ExtrasOptionenDlg" - '///+ cancel dialog 'Options - ' ///' + printlog "+ cancel dialog 'Options - ' " ExtrasOptionenDlg.Cancel - '///+ call the smart subroutine that tells you a valid language with an dictionary ///' + printlog "+ call the smart subroutine that tells you a valid language with an dictionary " sTrieit = hFindSpellHypLanguage - '///+ Tools->Options ///' + printlog "+ Tools->Options " ToolsOptions - '///+ select from section 'Language Settings' the item 'Languages' ///' + printlog "+ select from section 'Language Settings' the item 'Languages' " hToolsOptions ("LANGUAGESETTINGS","LANGUAGES") - '///+ check checkbox 'For the current document only' in section 'Default languages for document' ///' + printlog "+ check checkbox 'For the current document only' in section 'Default languages for document' " AktuellesDokument.Check - '/// if smart routine found something, select it in section 'Default languages for document' listbox 'Western' ///' - '///+ (manual users just select a language that has an icon in front of it ('ABC' with a checkmark) ///' + printlog " if smart routine found something, select it in section 'Default languages for document' listbox 'Western' " + printlog "+ (manual users just select a language that has an icon in front of it ('ABC' with a checkmark) " if (sTrieit <> "") then try Westlich.Select sTrieit @@ -418,11 +456,11 @@ sub hSetSpellHypLanguage qaErrorLog "Sorry no spellbook found: id_tools.inc::hSetSpellHypLanguage" endif else - '/// if a Language is already defined in the textfile ///' + printlog " if a Language is already defined in the textfile " printlog glLocale (4) try - '/// select it in section 'Default languages for document' listbox 'Western' ///' - '///+ (manual users just select a language that has an icon in front of it ('ABC' with a checkmark) ///' + printlog " select it in section 'Default languages for document' listbox 'Western' " + printlog "+ (manual users just select a language that has an icon in front of it ('ABC' with a checkmark) " try Westlich.Select glLocale (4) catch @@ -434,37 +472,24 @@ sub hSetSpellHypLanguage qaw = glLocale (4) endcatch endif - try - printlog "selected: '" + Westlich.GetSelText + "'" - catch - printlog "selected: '" + Asiatisch.GetSelText + "'" - endcatch + try + printlog "selected: '" + Westlich.GetSelText + "'" + catch + printlog "selected: '" + Asiatisch.GetSelText + "'" + endcatch Kontext "ExtrasOptionenDlg" - '///+ close dialog 'Options - ' with OK ///' + printlog "+ close dialog 'Options - ' with OK " ExtrasOptionenDlg.OK endif end sub '------------------------------------------------------------------------------- - -sub TBOrestart - - hCloseDocument - sleep (5) - ExitRestartTheOffice - sleep (10) - hNewDocument - sleep (5) -end sub - -'------------------------------------------------------------------------------- - sub hTBOtypeInDoc - hRechteckErstellen ( 10, 10, 30, 40 ) + + hRechteckErstellen ( 10, 10, 30, 40 ) end sub '------------------------------------------------------------------------------- - sub Position_Vergleichen (Ueber_Text_1 as string,Ueber_Text_2 as string,Ueber_Text_3 as string) ' Ueber_Text_1 : X-Position des Objektes dim Dummy_Text as string @@ -479,32 +504,29 @@ sub Position_Vergleichen (Ueber_Text_1 as string,Ueber_Text_2 as string,Ueber_Te Dummy_Text = PositionX.GetText TabPositionAndSize.OK sleep 1 - if TabPositionAndSize.exists (5) then - printlog "Yo!" - endif + if TabPositionAndSize.exists (5) then printlog "Yo!" printlog "What?" if Dummy_Text = Ueber_Text_1 then - Printlog Ueber_Text_2 + Printlog Ueber_Text_2 else - warnlog Ueber_Text_3,": is: ", Dummy_Text,"; should be: ", Ueber_Text_1 + warnlog Ueber_Text_3,": is: ", Dummy_Text,"; should be: ", Ueber_Text_1 end if end sub '------------------------------------------------------------------------------- - sub g_demoguide printlog "------------------- g_demoguide.inc ------------------------" - + call t_Introduction call t_Interoperability call t_DrawingEngine end sub -'------------------------------------------------------------------------------- - +'-------------------------------------------------------------------- sub sFormatTextDrawAnimation + TabLauftext.OK WaitSlot (3000) gMouseClick 99,99 @@ -520,166 +542,173 @@ sub sFormatTextDrawAnimation end sub '------------------------------------------------------------------------------- - sub mouseclickinpresentation - Kontext "DocumentPresentation" - autoexecute=false - printlog " switch slides using mouse clicks " - DocumentPresentation.MouseDown ( 50, 50 ) - DocumentPresentation.MouseUp ( 50, 50 ) - autoexecute=true + + Kontext "DocumentPresentation" + autoexecute=false + DocumentPresentation.MouseDown ( 50, 50 ) + printlog " switch slides using mouse clicks " + DocumentPresentation.MouseUp ( 50, 50 ) + autoexecute=true end sub '------------------------------------------------------------------------------- - sub im_002_ - printLog Chr(13) + "--------- im_002_ ---------- $Date: 2008-06-16 10:43:16 $ $Revision: 1.1 $ " - Call tiEditDeleteSlide + + printLog Chr(13) + "--------- im_002_ ---------- $Date: 2008-06-16 10:43:16 $ $Revision: 1.1 $ " + + Call tiEditDeleteSlide end sub '------------------------------------------------------------------------------- - sub im_003_ - printLog Chr(13) + "--------- im_003_ ----------" + + printLog Chr(13) + "--------- im_003_ ----------" + Call tiViewMasterView Call tiViewSlideMaster Call tiViewPanes - 'TODO: TBO not necessary here, move to optional +'TODO: TBO not necessary here, move to optional Call tiViewToolbar_1 end sub '------------------------------------------------------------------------------- - sub im_004_ - printLog Chr(13) + "--------- im_004_ ----------" - Call tiInsertSlideExpandSummary + + printLog Chr(13) + "--------- im_004_ ----------" + + Call tiInsertSlideExpandSummary end sub '------------------------------------------------------------------------------- - sub im_005_ - printLog Chr(13) + "--------- im_005_ ---------- " - Call tiFormatModifyLayout ' impress only + + printLog Chr(13) + "--------- im_005_ ---------- " + + Call tiFormatModifyLayout ' impress only end sub '------------------------------------------------------------------------------- - sub im_007_ - printLog Chr(13) + "--------- im_007_ ---------- " - Call tSlideShowSlideShow - Call tSlideShowRehearseTimings - Call tSlideShowSlideShowSettings - Call tSlideShowCustomSlideShow - Call tSlideShowSlideTransition - Call tSlideShowShowHideSlide - Call tSlideShowAnimation - Call tSlideShowCustomAnimation - Call tSlideShowInteraction + + printLog Chr(13) + "--------- im_007_ ---------- " + + Call tSlideShowSlideShow + Call tSlideShowRehearseTimings + Call tSlideShowSlideShowSettings + Call tSlideShowCustomSlideShow + Call tSlideShowSlideTransition + +Call tSlideShowShowHideSlide + Call tSlideShowAnimation + Call tSlideShowCustomAnimation + Call tSlideShowInteraction end sub '------------------------------------------------------------------------------- - sub im_011_ - printLog Chr(13) + "--------- im_011_ ---------- " - Call tiDiaLeiste ' only IMPRESS + + printLog Chr(13) + "--------- im_011_ ---------- " + + Call tiDiaLeiste ' only IMPRESS end sub '------------------------------------------------------------------------------- - sub D_002_ - printLog Chr(13) + "--------- D_002_ ---------- " - Call tdEditCrossFading - Call tdEditLayer + + printLog Chr(13) + "--------- D_002_ ---------- " + + Call tdEditCrossFading + Call tdEditLayer end sub '------------------------------------------------------------------------------- - sub D_003_ - printLog Chr(13) + "--------- D_003_ ---------- " - call tdViewSlide - call tdViewPagePane + + printLog Chr(13) + "--------- D_003_ ---------- " + + call tdViewSlide + call tdViewPagePane end sub '------------------------------------------------------------------------------- - sub D_005_ - printLog Chr(13) + "--------- D_005_ ---------- " - call tiFormatLayer ' only in draw !!!!! + + printLog Chr(13) + "--------- D_005_ ---------- " + + call tiFormatLayer ' only in draw !!!!! end sub '------------------------------------------------------------------------------- - sub d_007 - printLog Chr(13) + "--------- d_007 ---------- " - call tdModifyRotate + + printLog Chr(13) + "--------- d_007 ---------- " + + call tdModifyRotate end sub '------------------------------------------------------------------------------- - sub hOpenGallery + Kontext "DocumentWriter" ToolsGallery WaitSlot (2000) Kontext "Gallery" - if Gallery.NotExists(2) then - ToolsGallery - WaitSlot (2000) - end if + if Gallery.NotExists(2) then + ToolsGallery + WaitSlot (2000) + end if end sub '------------------------------------------------------------------------- - sub LoadGraphic ( sFile as String, bOK as Boolean ) as boolean Dim iW Dim iWMax Dim iH Dim iHMax - if app.FileLen(sFile) = "0" then - warnlog " the file (" + (sFile) + ") seems to be zero bytes large." - endif + if app.FileLen(sFile) = "0" then warnlog " the file (" + (sFile) + ") seems to be zero bytes large." call hGrafikEinfuegen ( sFile ) FormatGraphics Kontext Active.SetPage TabType Kontext "TabType" - OriginalSize.Click - iW = Val ( makeNumOutOfText ( Width.GetText ) ) - iH = Val ( makeNumOutOfText ( Height.GetText ) - if instr ( sFile, "photo" ) <> 0 then - iWMax = 22 - iHMax = 25 - else - iWMax = 17 - iHMax = 25 - end if - if iW > iWMax OR iH > iHMax then - printlog sFile + " :" - warnlog "Size is too big ( max should be '" + iWMax + "' cm* '" + iHMax + "'cm DinA4 with default borders ), but it is '" + iW + "' * '" + iH + "'" - LoadGraphic = false - end if - TabType.OK - sleep (1) + OriginalSize.Click + iW = Val ( makeNumOutOfText ( Width.GetText ) ) + iH = Val ( makeNumOutOfText ( Height.GetText ) + if instr ( sFile, "photo" ) <> 0 then + iWMax = 22 + iHMax = 25 + else + iWMax = 17 + iHMax = 25 + end if + if iW > iWMax OR iH > iHMax then + printlog sFile + " :" + warnlog "Size is too big ( max should be '" + iWMax + "' cm* '" + iHMax + "'cm DinA4 with default borders ), but it is '" + iW + "' * '" + iH + "'" + LoadGraphic = false + end if + TabType.OK + sleep (1) Kontext "DocumentWriter" - DocumentWriter.TypeKeys "" - sleep (1) - bOK = TRUE + DocumentWriter.TypeKeys "" + sleep (1) + bOK = TRUE end sub '------------------------------------------------------------------------- - sub CheckGraphic ( sFile as String, bOK as Boolean ) as boolean - if app.FileLen(sFile) = "0" then - warnlog " the file (" + (sFile) + ") seems to be zero bytes large." - endif + + if app.FileLen(sFile) = "0" then warnlog " the file (" + (sFile) + ") seems to be zero bytes large." bOK = TRUE end sub '------------------------------------------------------------------------- - sub GetOnlyGraphics ( OldList() as String, NewList() as String ) + Dim i as Integer Dim sExtension as String + ListAllDelete ( NewList() ) for i=1 to ListCount ( OldList() ) sExtension = lcase ( Right ( OldList(i), 3 ) ) @@ -690,36 +719,36 @@ sub GetOnlyGraphics ( OldList() as String, NewList() as String ) end sub '------------------------------------------------------------------------- - sub id_001 - printLog Chr(13) + "--------- id_001 ----------" - qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA" - call tiFilePassword - call tiFileSaveAs - call tiFileReload - call tiFileVersion - printlog " File->Send not possible to test, because extrnal prg get's called!" - call tiFileTemplates - call tiFilePrint - ' Call tiFileNew instead i call: - call tmFileNewFromTemplate - call tmFileOpen - call tmFileClose - call tmFileSave - call tmFileSaveAs - call tmFileExit - call tmFileSaveAll - call tmFileProperties - call tdFileExport - call tmFilePrinterSetting - ' special cases - ' Call AutoPilot 'inc\desktop\autopilo.inc - call tmFileExit ' don't test because unpredictable behaviour + printLog Chr(13) + "--------- id_001 ----------" + + qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA" + call tiFilePassword + call tiFileSaveAs + call tiFileReload + call tiFileVersion + printlog " File->Send not possible to test, because extrnal prg get's called!" + call tiFileTemplates + call tiFilePrint +' Call tiFileNew instead i call: + call tmFileNewFromTemplate + call tmFileOpen + call tmFileClose + call tmFileSave + call tmFileSaveAs + call tmFileExit + + call tmFileSaveAll + call tmFileProperties + call tdFileExport + call tmFilePrinterSetting + ' special cases + ' Call AutoPilot 'inc\desktop\autopilo.inc + call tmFileExit ' don't test because unpredictable behaviour end sub '------------------------------------------------------------------------------ - sub id_002 printLog Chr(13) + "--------- id_002 ----------" @@ -742,82 +771,78 @@ sub id_002 end sub '------------------------------------------------------------------------- - sub id_003 - printLog Chr(13) + "--------- id_003 ----------" + printLog Chr(13) + "--------- id_003 ----------" - call tiViewNavigator - call tiViewZoom - call tiViewToolbar - Call tToolsCustomize 'global\required\include - call tiViewDisplayQuality - call tiViewLayer - call tViewSnapLines - call tViewGrid + call tiViewNavigator + call tiViewZoom + call tiViewToolbar + Call tToolsCustomize 'global\required\include + call tiViewDisplayQuality + call tiViewLayer + call tViewSnapLines + call tViewGrid end sub '------------------------------------------------------------------------- - sub id_004 - printLog Chr(13) + "--------- id_004 ----------" + printLog Chr(13) + "--------- id_004 ----------" - call tiInsertSlide - call tiInsertDuplicateSlide + call tiInsertSlide + call tiInsertDuplicateSlide ' v expand slide ' v summary slide - call tiInsertField - call tiInsertSpecialCharacter - call tiInsertHyperlink - call tiInsertScan - call tiInsertGraphic - call tiInsertObjectSound - call tiInsertObjectVideo - call tiInsertObjectSound - call tiInsertObjectVideo - call tiInsertChart - call tiInsertObjectOLEObjects - call tiInsertSpreadsheet - call tiInsertFormula - call tiInsertFloatingFrame - call tiInsertFile - call tiInsertPlugin - call tiInsertSnappointLine - call tdInsertLayer ' IMPRESS: Edit->Layer->Insert + call tiInsertField + call tiInsertSpecialCharacter + call tiInsertHyperlink + call tiInsertScan + call tiInsertGraphic + call tiInsertObjectSound + call tiInsertObjectVideo + call tiInsertObjectSound + call tiInsertObjectVideo + call tiInsertChart + call tiInsertObjectOLEObjects + call tiInsertSpreadsheet + call tiInsertFormula + call tiInsertFloatingFrame + call tiInsertFile + call tiInsertPlugin + call tiInsertSnappointLine + call tdInsertLayer ' IMPRESS: Edit->Layer->Insert end sub '------------------------------------------------------------------------------ - sub id_005 - printLog Chr(13) + "--------- id_005 ----------" + printLog Chr(13) + "--------- id_005 ----------" - call tiFormatDefault - call tiFormatLine - call tdFormatArea - call tiFormatText - call tiFormatPositionAndSize - call tiFormatCharacter - call tiFormatControlForm - ' ^ Form - call tiFormatDimensions - call tiFormatConnector - call tiFormat3D_Effects - call tiFormatNumberingBullets - call tiFormatCaseCharacter - call tiFormatParagraph - call tiFormatPage - call tiFormatStylesAndFormatting - call tiFormatStylesSlideDesign - call tiFormatFontwork - call tiFormatGroup - '/// format->group is also modify->group ///' - ' tiFormatLayer ' not in impress + call tiFormatDefault + call tiFormatLine + call tdFormatArea + call tiFormatText + call tiFormatPositionAndSize + call tiFormatCharacter + call tiFormatControlForm +' ^ Form + call tiFormatDimensions + call tiFormatConnector + call tiFormat3D_Effects + call tiFormatNumberingBullets + call tiFormatCaseCharacter + call tiFormatParagraph + call tiFormatPage + call tiFormatStylesAndFormatting + call tiFormatStylesSlideDesign + call tiFormatFontwork + call tiFormatGroup + printlog " format->group is also modify->group " +' tiFormatLayer ' not in impress end sub '------------------------------------------------------------------------------ - sub id_006 printLog Chr(13) + "--------- id_006 ----------" @@ -825,18 +850,17 @@ sub id_006 call tiToolsSpellchecking call tiToolsSpellcheckingAutomatic call tiToolsThesaurus - call tiToolsHyphenation - call tiToolsAutoCorrect - call tChineseTranslation - call tiToolsMacro - call tiToolsGallery - call tiToolsEyedropper - call tiToolsOptions ' get just called one time here... - Call tToolsOptionsTest ' global one + call tiToolsHyphenation + call tiToolsAutoCorrect + call tChineseTranslation + call tiToolsMacro + call tiToolsGallery + call tiToolsEyedropper + call tiToolsOptions ' get just called one time here... + Call tToolsOptionsTest ' global one end sub '------------------------------------------------------------------------------- - sub id_007 printLog Chr(13) + "--------- id_007 ----------" @@ -863,20 +887,18 @@ sub id_007 end sub '------------------------------------------------------------------------------- - sub id_008 - printLog Chr(13) + "--------- id_008 ----------" + printLog Chr(13) + "--------- id_008 ----------" - Call tiWindowNewWindow - call tidWindow123 + Call tiWindowNewWindow + call tidWindow123 end sub -'------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------ sub id_009 - printLog Chr(13) + "--------- id_009 ----------" + printLog Chr(13) + "--------- id_009 ----------" call tCheckIfTheHelpExists Call tmHelpContents @@ -887,170 +909,165 @@ sub id_009 end sub -'------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------ sub id_011 printLog Chr(13) + "--------- id_011 ----------" - call tdBezierToolbar + call tdBezierToolbar call tiDrawObjectBar call tiTextToolbar call tiGraphicsObjectBar call tiGluepointToolbar -end sub + end sub -'------------------------------------------------------------------------------- +'-------------------------------------------------------------------------------' sub hWalkTheStyles (optional a as integer,optional b as integer) dim i as integer - - if isMissing (a) then - a=1 - endif - if isMissing (b) then - b=2 - endif + + if isMissing (a) then a=1 + if isMissing (b) then b=2 i=1 if a <= i AND i <= b then - Kontext - '/// switch to tabpage 'Line' ///' - Messagebox.SetPage TabLinie - kontext "TabLinie" - Call DialogTest ( TabLinie ) - Kontext - '/// switch to tabpage 'Area' ///' - Messagebox.SetPage TabArea - kontext "TabArea" - Call DialogTest ( TabArea ) - '/// select radio button 'none' ///' - NoFill.Check - Call DialogTest ( TabArea, 1 ) - '/// select radio button 'color' ///' - Color.Check - Call DialogTest ( TabArea, 2 ) - '/// select radio button 'gradient' ///' - Gradient.Check - Call DialogTest ( TabArea, 3 ) - '/// select radio button 'hatching' ///' - Hatching.Check - Call DialogTest ( TabArea, 4 ) - '/// select radio button 'bitmap' ///' - Bitmap.Check - Call DialogTest ( TabArea, 5 ) - Kontext - '/// switch to tabpage 'shadowing' ///' - Messagebox.SetPage TabSchatten - kontext "TabSchatten" - '/// check 'use shadow' ///' - Anzeigen.check - Call DialogTest ( TabSchatten ) - Kontext - '/// switch to tabpage 'Transparency' ///' - Messagebox.SetPage TabTransparenz - kontext "TabTransparenz" - '/// check 'No transparency' ///' - KeineTransparenz.Check - '/// check 'Transparency' ///' - LineareTransparenz.Check - '/// check 'Gradient' ///' - Transparenzverlauf.Check - Kontext - '/// switch to tabpage 'Font' ///' - Messagebox.SetPage TabFont - kontext "TabFont" - Call DialogTest ( TabFont ) - Kontext - '/// switch to tabpage 'Font Effect' ///' - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - Kontext - '/// switch to tabpage 'indents & spacing' ///' - Messagebox.SetPage TabEinzuegeUndAbstaende - kontext "TabEinzuegeUndAbstaende" - Call DialogTest ( TabEinzuegeUndAbstaende ) + Kontext + printlog " switch to tabpage 'Line' " + Messagebox.SetPage TabLinie + kontext "TabLinie" + Call DialogTest ( TabLinie ) + Kontext + printlog " switch to tabpage 'Area' " + Messagebox.SetPage TabArea + kontext "TabArea" + Call DialogTest ( TabArea ) + printlog " select radio button 'none' " + NoFill.Check + Call DialogTest ( TabArea, 1 ) + printlog " select radio button 'color' " + Color.Check + Call DialogTest ( TabArea, 2 ) + printlog " select radio button 'gradient' " + Gradient.Check + Call DialogTest ( TabArea, 3 ) + printlog " select radio button 'hatching' " + Hatching.Check + Call DialogTest ( TabArea, 4 ) + printlog " select radio button 'bitmap' " + Bitmap.Check + Call DialogTest ( TabArea, 5 ) + Kontext + printlog " switch to tabpage 'shadowing' " + Messagebox.SetPage TabSchatten + kontext "TabSchatten" + printlog " check 'use shadow' " + Anzeigen.check + Call DialogTest ( TabSchatten ) + Kontext + printlog " switch to tabpage 'Transparency' " + Messagebox.SetPage TabTransparenz + kontext "TabTransparenz" + printlog " check 'No transparency' " + KeineTransparenz.Check + printlog " check 'Transparency' " + LineareTransparenz.Check + printlog " check 'Gradient' " + Transparenzverlauf.Check + Kontext + printlog " switch to tabpage 'Font' " + Messagebox.SetPage TabFont + kontext "TabFont" + Call DialogTest ( TabFont ) + Kontext + printlog " switch to tabpage 'Font Effect' " + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + Kontext + printlog " switch to tabpage 'indents & spacing' " + Messagebox.SetPage TabEinzuegeUndAbstaende + kontext "TabEinzuegeUndAbstaende" + Call DialogTest ( TabEinzuegeUndAbstaende ) endif i=2 if a <= i AND i <= b then - Kontext - '/// switch to tabpage 'Organize' ///' - Messagebox.SetPage TabVerwalten - kontext "TabVerwalten" - Call DialogTest ( TabVerwalten ) - Kontext - '/// switch to tabpage 'text' ///' - Messagebox.SetPage TabText - Kontext "TabText" - Call DialogTest ( TabText ) - Kontext - '/// switch to tabpage 'text animation' ///' - Messagebox.SetPage TabLauftext - Kontext "TabLauftext" - Call DialogTest ( TabLauftext ) - Kontext - '/// switch to tabpage 'dimension' ///' - Messagebox.SetPage TabBemassung - Kontext "TabBemassung" - Call DialogTest ( TabBemassung ) - Kontext - '/// switch to tabpage 'connector' ///' - Messagebox.setpage TabVerbinder - Kontext "TabVerbinder" - Call Dialogtest ( TabVerbinder ) - Kontext - '/// switch to tabpage 'alignment' ///' - Messagebox.setpage TabAusrichtungAbsatz - Kontext "TabAusrichtungAbsatz" - Links.Check - Rechts.Check - Zentriert.Check - Blocksatz.Check - Kontext - '/// switch to tabpage 'Tabs' ///' - Messagebox.setpage TabTabulator - Kontext "TabTabulator" - '/// click 'new' ///' - Neu.click - '/// ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS ///' - '/// click 'delete all' ///' - AlleLoeschen.click - '/// click 'new' ///' - Neu.click - '/// click 'delete' ///' - Loeschen.click + Kontext + printlog " switch to tabpage 'Organize' " + Messagebox.SetPage TabVerwalten + kontext "TabVerwalten" + Call DialogTest ( TabVerwalten ) + Kontext + printlog " switch to tabpage 'text' " + Messagebox.SetPage TabText + Kontext "TabText" + Call DialogTest ( TabText ) + Kontext + printlog " switch to tabpage 'text animation' " + Messagebox.SetPage TabLauftext + Kontext "TabLauftext" + Call DialogTest ( TabLauftext ) + Kontext + printlog " switch to tabpage 'dimension' " + Messagebox.SetPage TabBemassung + Kontext "TabBemassung" + Call DialogTest ( TabBemassung ) + Kontext + printlog " switch to tabpage 'connector' " + Messagebox.setpage TabVerbinder + Kontext "TabVerbinder" + Call Dialogtest ( TabVerbinder ) + Kontext + printlog " switch to tabpage 'alignment' " + Messagebox.setpage TabAusrichtungAbsatz + Kontext "TabAusrichtungAbsatz" + Links.Check + Rechts.Check + Zentriert.Check + Blocksatz.Check + Kontext + printlog " switch to tabpage 'Tabs' " + Messagebox.setpage TabTabulator + Kontext "TabTabulator" + printlog " click 'new' " + Neu.click + printlog " ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS " + printlog " click 'delete all' " + AlleLoeschen.click + printlog " click 'new' " + Neu.click + printlog " click 'delete' " + Loeschen.click endif i=3 if a <= i AND i <= b then - Kontext - '/// switch to tabpage 'Bullets' ///' - Messagebox.SetPage TabBullet - Kontext "TabBullet" - sleep 1 - Call DialogTest (TabBullet) - sleep 1 - Kontext - '/// switch to tabpage 'Numbering Type' ///' - Messagebox.SetPage TabNumerierungsart - Kontext "TabNumerierungsart" - sleep 1 - Call DialogTest (TabNumerierungsart) - sleep 1 - Kontext - '/// switch to tabpage 'Graphics' ///' - Messagebox.SetPage TabGrafiken - Kontext "TabGrafiken" - sleep 1 - Call DialogTest (TabGrafiken) - sleep 1 - Kontext - '/// switch to tabpage 'Customize' ///' - Messagebox.SetPage TabOptionenNumerierung - Kontext "TabOptionenNumerierung" - sleep 1 - Call DialogTest (TabOptionenNumerierung) - sleep 1 + Kontext + printlog " switch to tabpage 'Bullets' " + Messagebox.SetPage TabBullet + Kontext "TabBullet" + sleep 1 + Call DialogTest (TabBullet) + sleep 1 + Kontext + printlog " switch to tabpage 'Numbering Type' " + Messagebox.SetPage TabNumerierungsart + Kontext "TabNumerierungsart" + sleep 1 + Call DialogTest (TabNumerierungsart) + sleep 1 + Kontext + printlog " switch to tabpage 'Graphics' " + Messagebox.SetPage TabGrafiken + Kontext "TabGrafiken" + sleep 1 + Call DialogTest (TabGrafiken) + sleep 1 + Kontext + printlog " switch to tabpage 'Customize' " + Messagebox.SetPage TabOptionenNumerierung + Kontext "TabOptionenNumerierung" + sleep 1 + Call DialogTest (TabOptionenNumerierung) + sleep 1 endif end sub -'------------------------------------------------------------------------------- +'--------------------------------------------------------------------------------------- diff --git a/testautomation/math/optional/includes/m_105.inc b/testautomation/math/optional/includes/m_105.inc index 939067906039..af37d41a326f 100644 --- a/testautomation/math/optional/includes/m_105.inc +++ b/testautomation/math/optional/includes/m_105.inc @@ -389,6 +389,7 @@ testcase tToolsCatalog catch qaErrorLog "Can not leave object selection" ' somehow not triggerable on macos + call hCloseDocument goto endsub endcatch Kontext "DocumentMath" diff --git a/testautomation/spreadsheet/optional/c_solver.bas b/testautomation/spreadsheet/optional/c_solver.bas new file mode 100755 index 000000000000..20e80f3d1cb0 --- /dev/null +++ b/testautomation/spreadsheet/optional/c_solver.bas @@ -0,0 +1,68 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: c_solver.bas,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: oc $ $Date: 2009/08/03 08:05:48 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/*********************************************************************** +'* +'* owner : oliver.craemer@sun.com +'* +'* short description : Functionality Test - Solver in Spreadsheet +'* +'\*********************************************************************** + + +sub main + use "spreadsheet/optional/includes/solver/c_solver.inc" + use "spreadsheet/tools/includes/c_select_tools.inc" + use "spreadsheet/tools/includes/c_cell_tools.inc" + use "spreadsheet/tools/includes/c_l10n_tools.inc" + + Printlog "--------------------------------------------------" + Printlog "--- Test for Solver in calc ---" + Printlog "--------------------------------------------------" + + Call hStatusIn("spreadsheet", "c_solver.bas") + + Call tExampleCalculation + Call tExampleCalculation2 + + Call hStatusOut +end sub +' +'------------------------------------------------------------------------------- +' +sub LoadIncludeFiles + use "global/system/includes/master.inc" + use "global/system/includes/gvariabl.inc" + use "global/tools/includes/optional/t_spreadsheet_tools1.inc" + gApplication = "CALC" + call getusefiles + +end sub diff --git a/testautomation/spreadsheet/optional/includes/solver/c_solver.inc b/testautomation/spreadsheet/optional/includes/solver/c_solver.inc new file mode 100644 index 000000000000..5a228e1794c1 --- /dev/null +++ b/testautomation/spreadsheet/optional/includes/solver/c_solver.inc @@ -0,0 +1,231 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: c_solver.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: oc $ $Date: 2008/09/04 09:18:19 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/*********************************************************************** +'* +'* owner : oliver.craemer@sun.com +'* +'* short description : Functionality Test - Solver +'* +'************************************************************************ +'* +' #1 tExampleCalculation +' #1 tExampleCalculation2 +'* +'\*********************************************************************** + +testcase tExampleCalculation + + dim sdecimalseperator as string + + sDecimalseperator = GetDecimalSeperator + + printlog " Open testdocument 'gTesttoolPath + spreadsheet\optional\input\Solver_testdoc01.ods'" + Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\optional\input\Solver_testdoc01.ods" )) + printlog " If the file is not editable, click the edit button on standardbar" + Call sMakeReadOnlyDocumentEditable + printlog " Tools - Solver" + ToolsSolver + Kontext "Solver" + printlog " Set target cell to $E$15" + TargetCell.SetText "$E$15" + printlog " Set Optimize result to Minimum" + OptimizeMinimum.Check + printlog " Set 'By changing cells' to $G$13:$G$14" + ChangingCells.SetText "$G$13:$G$14" + printlog " Set the first cell reference under 'Limiting conditions' to $C$15, the first Operator to '<=' and the first Value to 4" + CellReference1.SetText "$C$15" + Operator1.Select 1 + Value1.SetText "4" + printlog " Set the second cell reference under 'Limiting conditions' to $D$15, the second Operator to '>=' and the second Value to 10" + CellReference2.SetText "$D$15" + Operator2.Select 3 + Value2.SetText "10" + printlog " Set the third cell reference under 'Limiting conditions' to $G$15, the third Operator to '=' and the third Value to 300." + CellReference3.SetText "$G$15" + Operator3.Select 2 + Value3.SetText "300" + printlog " Click on Solve" + Solve.Click + printlog " A new dialog opens informing you that a result was found." + Kontext "SolvingResult" + if not SolvingResult.exists then + warnlog "Normally there should be a Success dialog, but there is none" + Kontext "NoSolution" + if NoSolution.exists then + NoSolution.OK + Kontext "Solver" + Solver.Cancel + Call hCloseDocument + goto endsub + else + Kontext "Solver" + Solver.Cancel + Call hCloseDocument + goto endsub + end if + end if + printlog " Click on the 'Restore Previous' Button. The Solver dialog is shown again." + SolvingResult.Cancel + Kontext "Solver" + printlog " Press ALT+S . The Solved dialog opens again. Press the Enter key." + Solve.Click + Kontext "SolvingResult" + SolvingResult.OK + Kontext "DocumentCalc" + printlog " C15 must show 4.0000 mg, D15 must show 18.0000 mg, E15 must show 22.0000 ct, G13 is set to 120, G14 shows 180 and therefore G15 300." + call fCalcCompareCellValue ("C15","4" & sDecimalseperator & "0000 mg") + call fCalcCompareCellValue ("D15","18" & sDecimalseperator & "0000 mg") + call fCalcCompareCellValue ("E15","22" & sDecimalseperator & "0000 ct") + call fCalcCompareCellValue ("G13","120") + call fCalcCompareCellValue ("G14","180") + call fCalcCompareCellValue ("G15","300") + printlog " Tools - Solver" + ToolsSolver + Kontext "Solver" + printlog " Change limitatation value 3 from 300 to 500" + Value3.SetText "500" + printlog " Press ALT+S to solve the problem and keep the results." + Solve.Click + Kontext "SolvingResult" + SolvingResult.OK + Kontext "DocumentCalc" + printlog " The results should be :C15 must show 4.0000 mg, D15 must show 51.3333 mg, E15 must show 68.6667 ct, G13 is set to 520, G14 shows -20 and therefore G15 500" + call fCalcCompareCellValue ("C15","4" & sDecimalseperator & "0000 mg") + call fCalcCompareCellValue ("D15","51" & sDecimalseperator & "3333 mg") + call fCalcCompareCellValue ("E15","68" & sDecimalseperator & "6667 ct") + call fCalcCompareCellValue ("G13","520") + call fCalcCompareCellValue ("G14","-20") + call fCalcCompareCellValue ("G15","500") + printlog " So the solution found is correct but not usefull. Let's limit the lemonade to positive values by adding a new limitation." + printlog " Tools - Solver" + ToolsSolver + kontext "Solver" + printlog " Set the fourth cell reference under 'Limiting conditions' to $G$14, the fourth Operator to '>=' and the fourth Value to 0." + CellReference4.SetText "$G$14" + Operator4.Select 3 + Value4.SetText "0" + printlog " Click on Solve." + Solve.Click + printlog " The No Solution dialog opens, telling you that the model is not solvable with the given limiting conditions." + Kontext "NoSolution" + if not NoSolution.exists then + warnlog "Normally the NoSolution dialog appears, but there is none" + end if + printlog " Click on Ok at this dialog, the Solver dialog should be shown." + NoSolution.OK + Kontext "Solver" + Solver.Close + printlog " Close document" + Call hCloseDocument + +endcase + +'----------------------------------------------------------- + +testcase tExampleCalculation2 + + printlog " Open testdocument 'gTesttoolPath + spreadsheet\optional\input\stest_large.ods'" + Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\optional\input\stest_large.ods" )) + printlog " If the file is not editable, click the edit button on standardbar" + Call sMakeReadOnlyDocumentEditable + printlog " Tools - Solver" + ToolsSolver + Kontext "Solver" + printlog " Target Cell: $Y$2" + TargetCell.SetText "$Y$2" + printlog " Optimize to: Maximum" + OptimizeMaximum.Check + printlog " Changing cells: $B$5:$B$134" + ChangingCells.SetText "$B$5:$B$134" + printlog " Limiting Conditions: Cell reference: $D$2:$W$2 Operator : <= Value: $D$3:$W$3" + CellReference1.SetText "$D$2:$W$2" + Operator1.Select 1 + Value1.SetText "$D$3:$W$3" + printlog " Copy the following String to the second cell reference input line: $D$2:$W$2 <= $D$3:$W$3" + CellReference2.SetText "$D$2:$W$2" + Operator1.Select 2 + Value2.SetText "$D$3:$W$3" + printlog " Click on Solve" + Solve.Click + printlog " You get a new Warning dialog talking about Invalid condition." + Kontext "NoSolution" + if not NoSolution.exists then + warnlog "Normally there should be a No Solution dialog" + end if + NoSolution.OK + Kontext "Solver" + printlog " Click on the remove Button next to the second Value field to remove the faulty condition." + Remove2.Click + if Value2 = "$D$3:$W$3" then + warnlog "The condition was not removed" + end if + printlog " Click on Options button, the Options dialog opens" + Options.Click + Kontext "SolverOptions" + if not SolverOptions.exists then + warnlog "The Options dialog is not open" + end if + printlog " Tag 'Assume variables as integer'" + SolverSettings.Select (1) + SolverSettings.TypeKeys "" + printlog " Tag 'Assume variables not negative'" + SolverSettings.Select (2) + SolverSettings.TypeKeys "" + printlog " Select SolvingTime" + SolverSettings.Select (5) + printlog " Click on Edit button to open the Editdialog" + SolverSettingsEdit.Click + Kontext "SolverEditSetting" + printlog " Set time to 10 and close editdialog by OK" + SolverNumeric.SetText "10" + SolverEditSetting.OK + Kontext "SolverOptions" + printlog " Click OK on SolverOptionsdialog" + SolverOptions.OK + Kontext "Solver" + printlog " Click on Solve" + Solve.Click + printlog " A new dialog named Solving... opens telling you about the time limit" + sleep (15) + printlog " After that a new dialog pops up saying 'No Solution was found. The time limit was reached.'" + Kontext "NoSolution" + printlog " Click the Ok button to close the No Solution dialog." + NoSolution.OK + printlog " Click close to leave the Solver dialog." + Kontext "Solver" + Solver.Close + printlog " Close document" + Call hCloseDocument + +endcase + + diff --git a/testautomation/spreadsheet/optional/input/Solver_testdoc01.ods b/testautomation/spreadsheet/optional/input/Solver_testdoc01.ods new file mode 100644 index 000000000000..26bf86b60170 Binary files /dev/null and b/testautomation/spreadsheet/optional/input/Solver_testdoc01.ods differ diff --git a/testautomation/spreadsheet/optional/input/stest_large.ods b/testautomation/spreadsheet/optional/input/stest_large.ods new file mode 100644 index 000000000000..cd915a77e5b7 Binary files /dev/null and b/testautomation/spreadsheet/optional/input/stest_large.ods differ diff --git a/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc b/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc new file mode 100755 index 000000000000..51b1f4ebf792 --- /dev/null +++ b/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc @@ -0,0 +1,305 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: w_alternative_text.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: hde $ $Date: 2008-08-18 12:30:39 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : helge.delfs@sun.com +'* +'* short description : Test Alternative Text for objects in writer +'* +'\************************************************************************ + +sub w_alternative_text + + Call tPictureAlternativeText + Call tFrameAlternativeText + Call tOLEAlternativeText + + +end sub + +'------------------------------------------------------------------------- + +testcase tPictureAlternativeText + + printlog "- New writer document" + Call hNewDocument + + printlog "- Insert a picture" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + Dateiname.Settext ConvertPath(gTesttoolpath + "writer\optional\input\alternative_text\jolink.jpg") + Sleep 1 + Oeffnen.Click + Sleep 2 + + printlog "- Context menu on the picture, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems picture is not selected => Description Object could not be opened" + endcatch + + printlog "- Type 'TitleText' in the Title field" + Kontext "DescriptionObject" + DescriptionTitle.Settext "TitleText" + + printlog "- Type 'This Is A Description'" + DescriptionText.Settext "This Is A Description" + + printlog "- Close the dialog" + DescriptionObject.Ok + + printlog "- Context menu on the picture, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems picture is not selected => Description Object could not be opened" + endcatch + + printlog "Check that the Title and Description fields have been saved correctly" + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Format - Picture" + FormatGraphics + + printlog "The 'Alternative' field must be filled with the content of the Title field (='TitleText')" + Kontext + Active.Setpage TabZusaetze + Kontext "TabZusaetze" + if Alternativtext.Gettext <> "TitleText" then + Warnlog "Alternatice text in pictures options is not set" + endif + TabZusaetze.Cancel + + printlog "- Save the document" + Call hFileSaveAsKill ( gOfficePath + "user\work\tPictureAlternativeText.odt" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\tPictureAlternativeText.odt" ) + ' select graphic + Call wTypeKeys ("") + + printlog "Check that the Title and Description fields have been saved correctly" + try + ContextDescriptionObject + catch + Warnlog "Seems picture is not selected => Description Object could not be opened" + endcatch + + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Format - Picture" + FormatGraphics + Kontext + Active.Setpage TabZusaetze + Kontext "TabZusaetze" + if Alternativtext.Gettext <> "TitleText" then + Warnlog "Alternatice text in pictures options is not set after save and reload" + endif + TabZusaetze.Cancel + + printlog "- close document" + Call hCloseDocument + +endcase + +'------------------------------------------------------------------------- + +testcase tFrameAlternativeText + + printlog "- New writer document" + Call hNewDocument + + printlog "- Insert a frame" + Call wInsertFrame + + printlog "- Context menu on the frame, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems Frame is not selected => Description Object could not be opened" + endcatch + + printlog "- Type 'TitleText' in the Title field" + Kontext "DescriptionObject" + DescriptionTitle.Settext "TitleText" + + printlog "- Type 'This Is A Description'" + DescriptionText.Settext "This Is A Description" + + printlog "- Close the dialog" + DescriptionObject.Ok + + printlog "- Context menu on the frame, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems frame is not selected => Description Object could not be opened" + endcatch + + printlog "Check that the Title and Description fields have been saved correctly" + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Save the document" + Call hFileSaveAsKill ( gOfficePath + "user\work\tFrameAlternativeText.odt" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\tFrameAlternativeText.odt" ) + ' select frame + Call wTypeKeys ("") + + printlog "Check that the Title and Description fields have been saved correctly" + try + ContextDescriptionObject + catch + Warnlog "Seems frame is not selected => Description Object could not be opened" + endcatch + + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- close document" + Call hCloseDocument + + +endcase + +'------------------------------------------------------------------------- + +testcase tOLEAlternativeText + + printlog "- New writer document" + Call hNewDocument + + printlog "- Insert a OLE" + InsertObjectOLEObject + Kontext "OLEObjektEinfuegen" + NeuErstellen.Check + OLEObjektEinfuegen.Ok + Sleep 2 + Call gMouseClick (10,10) + Call wTypeKeys "" + + printlog "- Context menu on the OLE, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems OLE is not selected => Description Object could not be opened" + endcatch + + printlog "- Type 'TitleText' in the Title field" + Kontext "DescriptionObject" + DescriptionTitle.Settext "TitleText" + + printlog "- Type 'This Is A Description'" + DescriptionText.Settext "This Is A Description" + + printlog "- Close the dialog" + DescriptionObject.Ok + + printlog "- Context menu on the OLE, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems OLE is not selected => Description Object could not be opened" + endcatch + + printlog "Check that the Title and Description fields have been saved correctly" + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Save the document" + Call hFileSaveAsKill ( gOfficePath + "user\work\tOLEAlternativeText.odt" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\tOLEAlternativeText.odt" ) + ' select OLE + Call wTypeKeys ("") + + printlog "Check that the Title and Description fields have been saved correctly" + try + ContextDescriptionObject + catch + Warnlog "Seems OLE is not selected => Description Object could not be opened" + endcatch + + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- close document" + Call hCloseDocument + + + +endcase \ No newline at end of file diff --git a/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc b/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc index f145faa4a191..29ee3cda0e6d 100755 --- a/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc +++ b/testautomation/writer/optional/includes/chinesetranslate/w_chinesetranslate1.inc @@ -77,7 +77,7 @@ testcase tDefaultSetting_1 printlog " 'Simplified Chinese to Traditional Chinese' should be Checked by default" if NOT SChineseToTChinese.IsChecked then - Warnlog "#i96768# 'Simplified Chinese to Traditional Chinese' should be Checked by default !" + QAErrorlog "#i96768# 'Simplified Chinese to Traditional Chinese' should be Checked by default !" end if ChineseTranslation.Cancel diff --git a/testautomation/writer/optional/includes/fields/w_fields6.inc b/testautomation/writer/optional/includes/fields/w_fields6.inc index 378387095e4e..2375323e995c 100755 --- a/testautomation/writer/optional/includes/fields/w_fields6.inc +++ b/testautomation/writer/optional/includes/fields/w_fields6.inc @@ -788,10 +788,8 @@ endcase '----------------------------------------------------------------- testcase tFunctions_13 -Warnlog "#i102752# - tFunctions_13 outcommented due to bug." -goto endsub - Dim sCombineCharacter as String + Dim sCombineCharacter as String Dim sTestFile as String sCombineCharacter = "ABC" diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc index 6b7285000c09..78071bd64bbd 100755 --- a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc +++ b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc @@ -591,8 +591,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tFormatPage_11 -Warnlog "#i102752# - tFormatPage_11 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sMarginsLeft as String @@ -652,8 +650,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tFormatPage_12 -Warnlog "#i102752# - tFormatPage_12 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sMarginsLeft as String @@ -716,8 +712,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tFormatPage_13 -Warnlog "#i102752# - tFormatPage_13 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPage1 as String diff --git a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc index 509543d4421b..cdd4bc0b9ef0 100755 --- a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc +++ b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc @@ -896,9 +896,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphIndent13 -Warnlog "#i102752# - tParagraphIndent13 outcommented due to bug." -goto endsub - Dim sTestFile as String Dim sAtLeast as String @@ -968,8 +965,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphIndent14 -Warnlog "#i102752# - tParagraphIndent14 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sAtLeast as String @@ -1104,9 +1099,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphIndent16 -Warnlog "#i102752# - tParagraphIndent16 outcommented due to bug." -goto endsub - Dim sTestFile as String Dim sPositionX as String diff --git a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc index e4c5fe79732f..a91d71c3cdd5 100755 --- a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc +++ b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc @@ -63,9 +63,6 @@ '\*********************************************************************** testcase tParagraphAlignment1 -Warnlog "#i102752# - tParagraphAlignment1 outcommented due to bug." -goto endsub - Dim sTestFile as String Dim sPositionX as String @@ -114,8 +111,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphAlignment2 -Warnlog "#i102752# - tParagraphAlignment2 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX as String @@ -155,12 +150,10 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphAlignment3 -Warnlog "#i102752# - tParagraphAlignment3 outcommented due to bug." -goto endsub - Dim sTestFile as String + Dim sTestFile as String - sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTest.sxw") + sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatparagraph\alignmentTest.sxw") PrintLog "- Test 'Center' alignment" '/// Test 'Center' alignment @@ -194,8 +187,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphAlignment4 -Warnlog "#i102752# - tParagraphAlignment4 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX1 as String @@ -267,8 +258,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphAlignment5 -Warnlog "#i102752# - tParagraphAlignment5 outcommented due to bug." -goto endsub Dim sTestFile as String @@ -308,8 +297,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphAlignment6 -Warnlog "#i102752# - tParagraphAlignment6 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX1 as String @@ -380,8 +367,6 @@ endcase '-------------------------------------------------------------------------- testcase tParagraphAlignment7 -Warnlog "#i102752# - tParagraphAlignment7 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX as String @@ -442,8 +427,6 @@ endcase '-------------------------------------------------------------------------- testcase tParagraphAlignment8 -Warnlog "#i102752# - tParagraphAlignment8 outcommented due to bug." -goto endsub Dim bAsianLanguage as Boolean Dim sTestFile as String @@ -515,8 +498,6 @@ endcase '-------------------------------------------------------------------------- testcase tParagraphAlignment9 -Warnlog "#i102752# - tParagraphAlignment9 outcommented due to bug." -goto endsub Dim bAsianLanguage as Boolean Dim sTestFile as String diff --git a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc index cf3076320429..b24e6c580a4a 100755 --- a/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc +++ b/testautomation/writer/optional/includes/formatparagraph/w_formatparagraph3.inc @@ -63,8 +63,6 @@ '\*********************************************************************** testcase tParagraphTabs1 -Warnlog "#i102752# - tParagraphTabs1 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sTabs as String @@ -111,8 +109,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphTabs2 -Warnlog "#i102752# - tParagraphTabs2 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sTabs as String @@ -159,8 +155,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphTabs3 -Warnlog "#i102752# - tParagraphTabs3 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sTabs as String @@ -207,9 +201,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphTabs4 -Warnlog "#i102752# - tParagraphTabs4 outcommented due to bug." -goto endsub - Dim sTestFile as String Dim sTabs as String @@ -350,8 +341,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphDropCaps1 -Warnlog "#i102752# - tParagraphDropCaps1 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX as String @@ -404,8 +393,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphDropCaps2 -Warnlog "#i102752# - tParagraphDropCaps2 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX as String @@ -460,8 +447,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphDropCaps3 -Warnlog "#i102752# - tParagraphDropCaps3 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX as String @@ -516,8 +501,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphDropCaps4 -Warnlog "#i102752# - tParagraphDropCaps4 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionX as String @@ -567,8 +550,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphDropCaps5 -Warnlog "#i102752# - tParagraphDropCaps5 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sSpace as String @@ -657,8 +638,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tParagraphDropCaps7 -Warnlog "#i102752# - tParagraphDropCaps7 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sTestText as String diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc index 5b451ced9577..11908cb75a20 100755 --- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc +++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc @@ -51,8 +51,6 @@ '\*********************************************************************** testcase tInsertGraphic_21 -Warnlog "#i102752# - tInsertGraphic_21 outcommented due to bug." -goto endsub Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -152,8 +150,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_22 -Warnlog "#i102752# - tInsertGraphic_22 outcommented due to bug." -goto endsub Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -253,8 +249,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_23 -Warnlog "#i102752# - tInsertGraphic_23 outcommented due to bug." -goto endsub Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -354,8 +348,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_24 -Warnlog "#i102752# - tInsertGraphic_24 outcommented due to bug." -goto endsub Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -416,8 +408,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_25 -Warnlog "#i102752# - tInsertGraphic_25 outcommented due to bug." -goto endsub Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -538,8 +528,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_26 -Warnlog "#i102752# - tInsertGraphic_26 outcommented due to bug." -goto endsub Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -660,8 +648,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_27 -Warnlog "#i102752# - tInsertGraphic_27 outcommented due to bug." -goto endsub Dim iLeft as Integer , iRight as Integer , iCenterHorizontal as Integer Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer @@ -782,8 +768,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_28 -Warnlog "#i102752# - tInsertGraphic_28 outcommented due to bug." -goto endsub Dim iTop as Integer , iBottom as Integer , iCenterVertical as Integer diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc index 7f4b7cc7486f..0a1790c1cbcb 100755 --- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc +++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc @@ -53,8 +53,6 @@ '\*********************************************************************** testcase tInsertGraphic_31 -Warnlog "#i102752# - tInsertGraphic_31 outcommented due to bug." -goto endsub Dim iLeft as Integer Dim iRight as Integer @@ -181,8 +179,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_32 -Warnlog "#i102752# - tInsertGraphic_32 outcommented due to bug." -goto endsub Dim iLeft as Integer Dim iRight as Integer @@ -299,8 +295,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_33 -Warnlog "#i102752# - tInsertGraphic_33 outcommented due to bug." -goto endsub Dim iLeft as Integer Dim iRight as Integer @@ -427,8 +421,6 @@ endcase '------------------------------------------------------------------------------------------- testcase tInsertGraphic_34 -Warnlog "#i102752# - tInsertGraphic_34 outcommented due to bug." -goto endsub Dim iTop as Integer Dim iBottom as Integer diff --git a/testautomation/writer/optional/includes/navigator/w_navigator.inc b/testautomation/writer/optional/includes/navigator/w_navigator.inc index bc82fd50e21a..21dc8ec9a369 100755 --- a/testautomation/writer/optional/includes/navigator/w_navigator.inc +++ b/testautomation/writer/optional/includes/navigator/w_navigator.inc @@ -217,7 +217,7 @@ endcase ' ********************************************************************** testcase tViewNavigator3 - QaErrorLog "#i94614 + i102752# - tViewNavigator3 outcommented" + WarnLog "#i94614# - tViewNavigator3 outcommented" goto endsub Dim NavigationTearOff as boolean diff --git a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc index ad15f9b70aa0..9a7c142d0b1d 100755 --- a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc +++ b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc @@ -46,6 +46,7 @@ sub w_issuezilla_regression Call i75027 Call i76637 Call i88656 + Call i103265 end sub @@ -441,3 +442,79 @@ testcase i88656 endcase '-------------------------------------------------------------------------- + +testcase i103265 + + Dim i as integer + + printlog "ODF Hyperlinks in TOCs" + Call hNewDocument + printlog "- Open test document" + Call hFileOpen ( gTesttoolPath + "writer\optional\input\regression\issuezilla\i103265.odt" ) + printlog "- Update TOC" + ToolsUpdateAllIndexes + + printlog "Check that every hyperlink jumps correctly to its target" + For i = 1 to 3 + ' point cursor to beginning of document + Call wTypeKeys "" + ' point cursor to index entry + Call wTypeKeys "", 4 + i + 'execute Hyperlink + ContextOpenHyperlink + ' check if it jumps to correct target + Call wTypeKeys "" + EditCopy + Select Case i + Case 1: + if GetClipboardText <> "# 1 Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1 Test' but " & GetClipboardtext + end if + Case 2: + if GetClipboardText <> "1. Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext + end if + Case 3: + if GetClipboardText <> "Test " then + Warnlog "First hyperlink not correctly jumped to. Not 'Test' but " & GetClipboardtext + end if + end select + next i + + printlog "- Save as HTML" + gApplication = "HTML" + Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\ODFHyperlinksInTOCs.html", "HTML" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\ODFHyperlinksInTOCs.html" ) + printlog "Check that every hyperlink jumps correctly to its target" + For i = 1 to 3 + ' point cursor to beginning of document + Call wTypeKeys "" + ' point cursor to index entry + Call wTypeKeys "", 5 + i + 'execute Hyperlink + ContextOpenHyperlink + ' check if it jumps to correct target + Call wTypeKeys "" + EditCopy + Select Case i + Case 1: + if GetClipboardText <> "# 1 Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1 Test' but " & GetClipboardtext + end if + Case 2: + if GetClipboardText <> "1. Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext + end if + Case 3: + if GetClipboardText <> "1Test " then + Warnlog "First hyperlink not correctly jumped to. Not 'Test ' but " & GetClipboardtext + end if + end select + next i + + Call hCloseDocument + +endcase \ No newline at end of file diff --git a/testautomation/writer/optional/includes/textframes/w_textframes4.inc b/testautomation/writer/optional/includes/textframes/w_textframes4.inc index 4181d4cf3e1a..b179543918de 100755 --- a/testautomation/writer/optional/includes/textframes/w_textframes4.inc +++ b/testautomation/writer/optional/includes/textframes/w_textframes4.inc @@ -364,8 +364,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_57 -Warnlog "#i102752# - tTextframes_57 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -445,8 +443,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_58 -Warnlog "#i102752# - tTextframes_58 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -525,8 +521,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_59 -Warnlog "#i102752# - tTextframes_57 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionY1 as String @@ -613,8 +607,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_60 -Warnlog "#i102752# - tTextframes_60 outcommented due to bug." -goto endsub Dim sTestFile as String Dim sPositionY1 as String @@ -707,8 +699,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_61 -Warnlog "#i102752# - tTextframes_61 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -787,8 +777,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_62 -Warnlog "#i102752# - tTextframes_62 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -867,8 +855,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_63 -Warnlog "#i102752# - tTextframes_63 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer @@ -959,8 +945,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_64 -Warnlog "#i102752# - tTextframes_64 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer @@ -1051,10 +1035,8 @@ endcase '----------------------------------------------------------------- testcase tTextframes_65 -Warnlog "#i102752# - tTextframes_65 outcommented due to bug." -goto endsub - Dim sTestFile as String + Dim sTestFile as String Dim iHorizontal as Integer Dim sHorizontalBy as String Dim sPositionX1 as String @@ -1132,8 +1114,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_66 -Warnlog "#i102752# - tTextframes_66 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer @@ -1213,8 +1193,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_67 -Warnlog "#i102752# - tTextframes_67 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer @@ -1305,8 +1283,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_68 -Warnlog "#i102752# - tTextframes_68 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer @@ -1397,8 +1373,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_69 -Warnlog "#i102752# - tTextframes_69 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer @@ -1478,8 +1452,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_70 -Warnlog "#i102752# - tTextframes_70 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iHorizontal as Integer diff --git a/testautomation/writer/optional/includes/textframes/w_textframes5.inc b/testautomation/writer/optional/includes/textframes/w_textframes5.inc index 9ee5cb410276..349dc5032a62 100755 --- a/testautomation/writer/optional/includes/textframes/w_textframes5.inc +++ b/testautomation/writer/optional/includes/textframes/w_textframes5.inc @@ -113,8 +113,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_72 -Warnlog "#i102752# - tTextframes_72 outcommented due to bug." -goto endsub printlog "- 'Vertical to' when anchor is inside frame" '/// 'Vertical to' when anchor is inside frame @@ -153,8 +151,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_73 -Warnlog "#i102752# - tTextframes_73 outcommented due to bug." -goto endsub printlog "- 'Vertical to' when anchor is inside document body" '/// 'Vertical to' when anchor is inside document body @@ -370,8 +366,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_80 -Warnlog "#i102752# - tTextframes_80 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -428,8 +422,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_81 -Warnlog "#i102752# - tTextframes_81 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -486,8 +478,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_82 -Warnlog "#i102752# - tTextframes_82 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -544,8 +534,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_83 -Warnlog "#i102752# - tTextframes_83 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -612,8 +600,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_84 -Warnlog "#i102752# - tTextframes_84 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVertical as Integer @@ -680,8 +666,6 @@ endcase '----------------------------------------------------------------- testcase tTextframes_85 -Warnlog "#i102752# - tTextframes_85 outcommented due to bug." -goto endsub Dim sTestFile as String Dim iVerticalTop as Integer diff --git a/testautomation/writer/optional/input/alternative_text/jolink.jpg b/testautomation/writer/optional/input/alternative_text/jolink.jpg new file mode 100755 index 000000000000..6200757dd797 Binary files /dev/null and b/testautomation/writer/optional/input/alternative_text/jolink.jpg differ diff --git a/testautomation/writer/optional/input/regression/issuezilla/i103265.odt b/testautomation/writer/optional/input/regression/issuezilla/i103265.odt new file mode 100644 index 000000000000..bbf90f8febba Binary files /dev/null and b/testautomation/writer/optional/input/regression/issuezilla/i103265.odt differ diff --git a/testautomation/writer/optional/w_alternative_text.bas b/testautomation/writer/optional/w_alternative_text.bas new file mode 100644 index 000000000000..86cf50a6bd5c --- /dev/null +++ b/testautomation/writer/optional/w_alternative_text.bas @@ -0,0 +1,65 @@ +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: w_alternative_text.bas,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: hde $ $Date: 2008-06-18 09:11:25 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : helge.delfs@sun.com +'* +'* short description : Alternative Texts For Writer Objects +'* +'\*********************************************************************** + +sub main + Dim StartTime + StartTime = Now() + + use "writer\tools\includes\w_tools.inc" + + use "writer\optional\includes\alternative_text\w_alternative_text.inc" + + printlog Chr(13) + "Loading of Include - Files takes: " + Wielange ( StartTime ) + printlog Chr(13) + "******* Writer - Alternative Text - Test *******" + + Call hStatusIn ( "writer", "w_alternative_text.bas" ) + Call w_alternative_text + Call hStatusOut + + Printlog Chr(13) + "End of Autotest:" + Printlog "Duration: "+ WieLange ( StartTime ) + Printlog "Date: " + Date + " Time: " + Time + +end sub + +sub LoadIncludeFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + Call GetUseFiles + gApplication = "WRITER" +end sub diff --git a/testautomation/writer/required/includes/w_005_.inc b/testautomation/writer/required/includes/w_005_.inc index 0eefda2bbdd5..fd8197ab8aa5 100755 --- a/testautomation/writer/required/includes/w_005_.inc +++ b/testautomation/writer/required/includes/w_005_.inc @@ -760,14 +760,9 @@ endcase '----------------------------------------------------------- testcase tFormatAnchor -Warnlog "#i102752# - tFormatAnchor outcommented due to bug." -goto endsub PrintLog "- Format / Anchor" - Warnlog "#i102752#Writer crashes if you change the anchor of a drawing object to page" - goto endsub - printlog " Open new document" Call hNewDocument printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'" @@ -901,9 +896,6 @@ endcase testcase tFormatAnchorArea - Warnlog "#i102752#Writer crashes if you change the anchor of a drawing object to page" - goto endsub - PrintLog "- Format / Anchor drawing objects" if gApplication = "HTML" then printlog "Not in WriterWeb!" diff --git a/testautomation/writer/required/includes/w_005b_.inc b/testautomation/writer/required/includes/w_005b_.inc index 10a4265fe8bb..6f74c6b101a8 100755 --- a/testautomation/writer/required/includes/w_005b_.inc +++ b/testautomation/writer/required/includes/w_005b_.inc @@ -218,8 +218,6 @@ endcase '----------------------------------------------------------- testcase tFormatAlignment -Warnlog "#i102752# - tFormatAlignment outcommented due to bug." -goto endsub PrintLog "- Format / Alignment" @@ -416,8 +414,6 @@ endcase '----------------------------------------------------------- testcase tFormatAnchorObject -Warnlog "#i102752# - tFormatAnchorObject outcommented due to bug." -goto endsub PrintLog "- Format / Anchor Frame" @@ -887,9 +883,6 @@ endcase testcase tFormatAlignmentArea - Warnlog "#i102752#Writer crashes if you change the anchor of a drawing object to page" - goto endsub - PrintLog "- Format / Alignment drawing objects" if gApplication = "HTML" then printlog "Not in WriterWeb!" @@ -1418,10 +1411,8 @@ endcase '----------------------------------------------------------- testcase tHtmlDocFormatAlignment -Warnlog "#i102752# - tHtmlDocFormatAlignment outcommented due to bug." -goto endsub - gApplication = "HTML" + gApplication = "HTML" PrintLog "- Format / Alignment" printlog " Open new document" diff --git a/testautomation/writer/required/includes/w_010_1.inc b/testautomation/writer/required/includes/w_010_1.inc index a02ee963e024..7a98c313f4a1 100644 --- a/testautomation/writer/required/includes/w_010_1.inc +++ b/testautomation/writer/required/includes/w_010_1.inc @@ -628,8 +628,6 @@ endcase '----------------------------------------------------------- testcase tGraphicAnchor -Warnlog "#i102752# - tGraphicAnchor outcommented due to bug." -goto endsub printlog "- Graphic-(Frame)-Objectbar: Anchor" printlog " Open new document" diff --git a/testautomation/writer/required/includes/w_011_.inc b/testautomation/writer/required/includes/w_011_.inc index 67db3d90c5ff..d08875f48541 100755 --- a/testautomation/writer/required/includes/w_011_.inc +++ b/testautomation/writer/required/includes/w_011_.inc @@ -447,9 +447,6 @@ endcase testcase tZORest - Warnlog "#i102752#Writer crashes if you change the anchor of a drawing object to page" - goto endsub - printlog "- Draw Functions-Objectbar: Rest" if gApplication = "HTML" then printlog "This test does not apply to HTML documents"