merged in DEV300_m57

This commit is contained in:
sb
2009-09-04 12:24:40 +02:00
parent e335318f7f
commit 0f4466a299
64 changed files with 3502 additions and 2766 deletions

View File

@@ -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

View File

@@ -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
'* <http://www.openoffice.org/license.html>
'* 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 <ESCAPE>-key"
DocumentCalc.TypeKeys "<Escape>" , 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 "<Escape>"
printlog "Close document"
Call hCloseDocument
endcase

View File

@@ -318,8 +318,15 @@ testcase tEquationTextDirection
printlog "Leave the dialog with OK"
InsertTrendlinesDialog.OK
Kontext "DocumentChart"
printlog "Type thrice in the Chart document <TAB> to select the equation"
printlog "Leave Chart by ESC and reenter Chart"
DocumentChart.TypeKeys "<ESC>" , 2
call fSelectFirstOLE
EditObjectEdit
Kontext "DocumentChart"
printlog "Type <TAB> thrice in the Chart document, press F3 and <TAB> to select the equation"
DocumentChart.TypeKeys "<TAB>" , 3
DocumentChart.TypeKeys "<F3>"
DocumentChart.TypeKeys "<TAB>"
printlog "Format / Object properties"
FormatObjectProperties
Kontext

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -39,10 +39,7 @@
testcase tAllControlsOnDialog( cMajor as string )
'///<h1>Basic test for macro controls</h1>
'///<i>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.</i><br><br>
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
'///<b>save/load-test for controls on a basic-dialog in all applications</b>
'///<ul>
'///+<li>open a new doc (for Writer only)</li>
' 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
'///+<li>Build a path and a filename (path from UNO, Suffix from global-module)</li>
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)
'///+<li>Open a new document to work with</li>
printlog( "Open a second document" )
printlog( "" )
printlog( cApplication )
brc = hCreateDocument()
@@ -95,9 +84,9 @@ testcase tAllControlsOnDialog( cMajor as string )
goto endsub
endif
'///+<li>Create a new module for the new document</li>
'///+<li>Create a new dialog in BasicIDE</li>
'///+<li>Open the macro controls float</li>
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"
'///+<li>close the BASIC-IDE</li>
printlog( "close the BASIC-IDE" )
hCloseBasicIde()
@@ -144,7 +133,7 @@ testcase tAllControlsOnDialog( cMajor as string )
goto endsub
endif
'///+<li>Click 'Edit' to edit the module</li>
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"
'///+<li>Find the dialog we created before</li>
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
'///+<li>Open the macro controls float</li>
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
'///+<li>Select every control, open its properties and verify its name, close properties</li>
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() )
'///+<li>Cleanup: Close the BASIC-IDE</li>
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"
'///+<li>save the document</li>
printlog( "save the document" )
Call hFileSaveAsKill( sFile )
printlog "Close it"
'///+<li>close the document</li>
'///</ul>
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" )
'///<b>check all controls in the saved document</b>
printlog "Open the file again"
'///<ul>
'///+<li>open the document</li>
printlog( "Open the file again" )
printlog( "Open the document" )
hFileOpen( sFile )
printlog "Open tools/macro and select the last module for the current document"
'///+<li>open the basic-IDE of this document, open controls, activate 'Select-mode' and open the properties</li>
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
'///+<li>Click 'Edit' to edit the module</li>
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"
'///+<li>Find the dialog we created before</li>
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
'///+<li>Open the macro controls float</li>
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
'///+<li>Select every control, open its properties and verify its name, close properties</li>
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() )
'///+<li>Cleanup: Close the BASIC-IDE</li>
printlog( "Cleanup: Close the BASIC-IDE" )
printlog( "Close the BASIC IDE" )
hCloseBasicIde()
'///+<li>Cleanup: Close the document</li>
printlog( "Cleanup: Close the document" )
printlog( "Close the document" )
brc = hDestroyDocument()
'///+<li>Cleanup: Delete the file we created</li>
printlog( "Cleanup: Delete the file we created" )
hDeleteFile( sFile )
'///+<li>Repeat this for every application</li>
'///</ul>
printlog( "Repeat this for every application" )
next iApplication

View File

@@ -163,6 +163,7 @@ testcase tBasicLibraryExport
printlog( "Close the macro/libraries organizer" )
kontext "TabBibliotheken"
if ( TabBibliotheken.exists( 1 ) ) then
TabBibliotheken.cancel()
printlog( "Cancel macro organizer" )
@@ -172,6 +173,10 @@ testcase tBasicLibraryExport
while( getDocumentCount > 0 )
hDestroyDocument()
wend
else
warnlog( "Dialog <TabBibliotheken> could not be accessed" )
call exitRestartTheOffice()
endif
endcase

View File

@@ -136,12 +136,28 @@ 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
WaitSlot()
@@ -206,6 +222,18 @@ sub changePage( sFile as string , bInverted as boolean, optional iMiddleMouseBut
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
WaitSlot()

View File

@@ -15,4 +15,6 @@ UseHardwareAcceleration=checked
useantialiasing=unchecked
mousepositioning=2
mausaktion=1
transparency=unchecked
selectionopacity=10%

View File

@@ -14,4 +14,6 @@ useantialiasing=checked
usehardwareacceleration=disabled
mousepositioning=3
mausaktion=2
transparency=checked
selectionopacity=75%

View File

@@ -39,6 +39,8 @@
sub main
GLOBAL_USE_NEW_SLEEP = TRUE
use "framework\required\includes\tools_customize.inc"
dim cApp as string

View File

@@ -39,40 +39,23 @@
testcase tUpdtCustomize( cApp as string )
'///<h1>Update test for the Tools/Customize Dialog</h1>
'///<ul>
const CANCEL_BUTTON = 1
dim brc as boolean
printlog( "Tools/Customize dialog" )
const CLOSE_METHOD = 1 ' 1 = Cancel button
'///+<li>Open a new document (abort test on failure)</li>
brc = hCreateDocument()
if ( not brc ) then
warnlog( "Abort: Failed to create requested document: " & gApplication )
goto endsub
endif
'///+<li>Open Tools Customize</li>
brc = hToolsCustomizeOpen()
'///+<li>Look at the Keyboard-Tabpage</li>
if ( hCreateDocument() ) then
if ( hToolsCustomizeOpen() ) then
hUpdtToolsCustomizeKeyboard()
'///+<li>Look at the Menu-Tabpage</li>
hUpdtToolsCustomizeMenu()
'///+<li>Look at the Toolbars-Tabpage</li>
hUpdtToolsCustomizeToolbars()
'///+<li>Look at the Events-Tabpage</li>
hUpdtToolsCustomizeEvents()
'///+<li>Close Tools Customize</li>
brc = hToolsCustomizeClose( CANCEL_BUTTON )
'///+<li>Close the document</li>
brc = hDestroyDocument
'///</ul>
hToolsCustomizeClose( CLOSE_METHOD )
else
warnlog( "Tools/Customize dialog did not open" )
endif
hDestroyDocument
else
warnlog( "Failed to create initial document" )
endif
endcase
@@ -142,7 +125,7 @@ function hUpdtToolsCustomizeMenu()
'///+<li>Click the Menu List-Button</li>
printlog( CFN & "Click the menu listbutton" )
kontext "TabCustomizeMenu"
MenuBtn.click()
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
'///+<li>Select the first entry (Move...) to open the Menu Organiser</li>
printlog( CFN & "Select Move..." )
@@ -165,7 +148,7 @@ function hUpdtToolsCustomizeMenu()
'///+<li>Click the Menu List-Button</li>
printlog( CFN & "Click the menu listbutton" )
kontext "TabCustomizeMenu"
MenuBtn.click()
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
'///+<li>Select the second entry (Rename...) to open the Rename dialog</li>
printlog( CFN & "Select Rename..." )
@@ -179,7 +162,7 @@ function hUpdtToolsCustomizeMenu()
'///+<li>Click the Menu List-Button</li>
printlog( CFN & "Click the menu listbutton" )
kontext "TabCustomizeMenu"
MenuBtn.click()
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
'///+<li>Select the third entry (Delete) to delete the new menu<br>
'///+Note that there will be no warning as the menu is empty</li>
@@ -361,8 +344,9 @@ function hUpdtToolsCustomizeToolbars()
'///+<li>Access the &quot;Toolbar&quot;-Button and rename the toolbar</li>
printlog( CFN & "Rename the toolbar via Toolbar-Button" )
kontext "TabCustomizeToolbars"
MenuBtn.click()
waitslot
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( "Select rename" )
hMenuSelectNr( 1 )
'///+<li>Cancel the renaming-dialog</li>
@@ -379,8 +363,9 @@ function hUpdtToolsCustomizeToolbars()
'///+Note that there will be no deletion warning</li>
printlog( CFN & "Delete the toolbar via Toolbar-Button" )
kontext "TabCustomizeToolbars"
MenuBtn.click()
waitslot
hOpenMenuButton( MenuBtn ) ' MenuBtn.OpenMenu()
printlog( "Select delete" )
hMenuSelectNr( 2 )
'///+<li>Click the &quot;Add Commands...&quot; button</li>
@@ -399,7 +384,6 @@ function hUpdtToolsCustomizeToolbars()
endif
'///+<li>Click &quot;Down&quot;</li>
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

View File

@@ -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
'///<h1>Update test for window functionality</h1>
'///<ul>
dim brc as boolean
'///+<li>Verify that we have one initial document open</li>
printlog( "Create initial document" )
gApplication = "WRITER"
hInitSingleDoc()
hInitWriteDocIdentifier( "F_updt_windowfuncs.bas" )
'///+<li>Create a new document</li>
printlog( "New document" )
hCreateDocument()
hNewDocument()
if ( getDocumentCount <> 2 ) then
warnlog( "Two open documents were expected, found " & getDocumentCount )
endif
DocumentWriter.restore()
'///+<li>Use .close()-method to close document</li>
kontext "documentwriter"
kontext "DocumentWriter"
printlog( "Close document" )
DocumentWriter.close()
'///+<li>Verify that the document is closed</li>
if ( getDocumentCount <> 1 ) then
warnlog( "One open document was expected, found " & getDocumentCount )
endif
'///+<li>Create a new document</li>
printlog( "New document" )
hCreateDocument()
hNewDocument()
if ( getDocumentCount <> 2) then
warnlog( "Two open documents were expected, found " & getDocumentCount )
endif
'///+<li>Write some text into the second writer document</li>
'///+<li>Use .close()-method to close document</li>
printlog( "Enter some text into the second writer document" )
kontext "documentwriter"
kontext "DocumentWriter"
DocumentWriter.TypeKeys( "test" )
DocumentWriter.close()
'///+<li>Close the message (Document changed)</li>
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
'///+<li>Verify that exactly two documents are open</li>
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
'///+<li>Close the document using FileClose</li>
hDestroyDocument() ' note tha hCloseDoc/hDestroyDocument use FileClose
kontext "DocumentWriter"
printlog( "Close the document" )
FileClose()
'///+<li>Verify that exactly one document is open</li>
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
'///+<li>Create a new document</li>
printlog( "New document" )
brc = hCreateDocument()
if ( not brc ) then
warnlog( "Two open documents were expected, found " & getDocumentCount() )
endif
kontext "documentwriter"
'///+<li>Maximize Window</li>
'///<ul>
printlog( "Maximize window" )
DocumentWriter.Maximize()
sleep( 2 )
'///+<li>Verify state: Maximized (true)</li>
if ( DocumentWriter.IsMax() ) then
printlog( " * Window is maximized" )
else
warnlog( " * Window not maximized" )
endif
'///+<li>Verify state: Minimized (false)</li>
if ( DocumentWriter.IsMin() ) then
warnlog( " * Window is minimized" )
else
printlog( " * Window not minimized" )
endif
'///+<li>Verify state: Restored (false)</li>
if ( DocumentWriter.IsRestore() ) then
warnlog( " * Window is Restored" )
else
printlog( " * Window not Restored" )
endif
'///</ul>
'///<li>Minimize Window</li>
'///<ul>
Kontext "DocumentWriter"
printlog( "Minimize window" )
DocumentWriter.Minimize()
sleep( 2 )
Wait( 2000 )
'///+<li>Verify state: Minimized (true)</li>
kontext "DocumentWriter"
if ( DocumentWriter.IsMin() ) then
printlog( " * Window is minimized" )
printlog( "Window is minimized" )
else
qaerrorlog( "#i32672# Window not minimized" )
endif
'///+<li>Verify state: Maximized (false)</li>
if ( DocumentWriter.IsMax() ) then
warnlog( " * Window is maximized" )
else
printlog( " * Window not maximized" )
endif
'///+<li>Verify state: Restored (false)</li>
if ( DocumentWriter.IsRestore() ) then
qaerrorlog( "#i32672# Window is Restored" )
else
printlog( " * Window not Restored" )
endif
'///</ul>
'///<li>Restore Window</li>
'///<ul>
kontext "DocumentWriter"
printlog( "Restore window" )
DocumentWriter.Restore()
sleep( 2 )
Wait( 2000 )
'///+<li>Verify state: Restored (true)</li>
if ( DocumentWriter.IsRestore() ) then
printlog( " * Window is Restored" )
printlog( "Window is Restored" )
else
warnlog( " * Window not Restored" )
endif
'///+<li>Verify state: Maximized (false)</li>
kontext "DocumentWriter"
printlog( "Maximize window" )
DocumentWriter.Maximize()
Wait( 2000 )
kontext "DocumentWriter"
if ( DocumentWriter.IsMax() ) then
warnlog( " * Window is maximized" )
printlog( "Window is maximized" )
else
printlog( " * Window not maximized" )
warnlog( " * Window not maximized" )
endif
'///+<li>Verify state: Minimized (false)</li>
if ( DocumentWriter.IsMin() ) then
warnlog( " * Window is minimized" )
else
printlog( " * Window not minimized" )
endif
'///</ul>
'///+<li>Close the documents</li>
brc = hDestroyDocument()
brc = hDestroyDocument()
'///</ul>
hDestroyDocument()
endcase

View File

@@ -316,6 +316,8 @@ function hDeselectSeparator() as integer
const CFN = "hDeselectSeparator::"
kontext "ToolsCustomizeToolbars"
if ( ToolbarContents.getItemCount > 0 ) then
iCurrentItem = ToolbarContents.getSelIndex()
cString = ToolbarContents.getSelText()
@@ -335,91 +337,14 @@ function hDeselectSeparator() as integer
endif
endif
else
irc = 0
endif
hDeselectSeparator() = irc
'///</ul>
end function
'*******************************************************************************
function hClickCommandButton( iItemToClick as integer ) as boolean
'///<h3>Click a given entry on the command button</h3><br>
'///<u>Parameter(s):</u><br>
'///<ol>
'///+<li>Position of the item to click (Integer)</li>
'///<ul>
'///+<li>Only active items are selectable</li>
'///+<li>Position must be &gt; than 0 and &le; number of active items in menu</li>
'///+<li>Set context (kontext) before calling this function</li>
'///</ul>
'///</ol>
'///<u>Returns:</u><br>
'///<ol>
'///+<li>Success or failure (Boolean)</li>
'///<ul>
'///+<li>TRUE on success</li>
'///+<li>FALSE on failure or unknown status</li>
'///</ul>
'///</ol>
const CFN = "hClickCommandButton::"
printlog( CFN & "Enter" )
dim brc as boolean 'a multi purpose boolean returnvalue
dim iMenuItems as integer
'///<u>Description:</u>
'///<ul>
'///+<li>Click the command button</li>
command.click()
'///+<li>Verify that the menu is open</li>
try
iMenuItems = hMenuItemGetCount()
catch
qaerrorlog( CFN & "Menu not open" )
hClickCommandButton() = false
exit function
endcatch
'///+<li>Verify that the selected menuitem is valid</li>
printlog( CFN & "Found items: " & iMenuItems )
if ( iItemToClick > iMenuItems ) then
warnlog( CFN & "#i90134# Selected item is not available: " & iItemToClick )
hClickCommandButton() = false
exit function
endif
'///+<li>Now click on the requested item</li>
hMenuSelectNr( iItemToClick )
'///+<li>Look for the Menu renaming dialog</li>
kontext "CustomizeMenuReName"
if ( CustomizeMenuReName.exists( 1 ) ) then
printlog( CFN & "Opened dialog: Rename Menu" )
hClickCommandButton() = true
exit function
endif
'///+<li>Look for the Toolbar renaming dialog</li>
kontext "CustomizeToolbarsRename"
if ( CustomizeToolbarsRename.exists() ) then
printlog( CFN & "Opened dialog: Rename Toolbar" )
hClickCommandButton() = true
exit function
endif
'///</ul>
printlog( CFN & "Exit" )
hClickCommandButton() = true
end function

View File

@@ -69,6 +69,7 @@ function hOpenPropertyBrowser() as boolean
const CFN = "hOpenPropertyBrowser::"
'///+<li>Open the property browser (call slot)</li>
try
ContextProperties
'///+<li>Verify that the property browser is open</li>
@@ -91,6 +92,11 @@ function hOpenPropertyBrowser() as boolean
printlog( CFN & "Could not open property browser" )
hOpenPropertyBrowser() = false
endif
catch
hOpenPropertyBrowser() = false
printlog( CFN & "Slot <ContextProperties> not available" )
endcatch
'///</ul>
end function
@@ -127,7 +133,7 @@ function hClosePropertyBrowser() as boolean
'///+<li>Verify that the property browser is open</li>
kontext "ControlPropertiesTabControl"
if ( ControlPropertiesTabControl.exists() ) then
if ( ControlPropertiesTabControl.exists( 1 ) ) then
'///+<li>Execute the ContextProperties slot</li>
ContextProperties
@@ -183,6 +189,7 @@ function hPBSetControlName( cControl as string ) as boolean
'///+<li>Set the new name</li>
WaitSlot()
' Name the control and append some Spaces which should be truncated.
printlog( CFN & "Naming control: " & cControl )
NameText.setText( cControl )
TabGeneralControl.typeKeys( " <RETURN>" )

View File

@@ -218,3 +218,4 @@ MsgBox ("Value : " & CDbl(v))
End Sub
# ---------------------------------------------------------------------------- #

View File

@@ -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
'/// <i>Tools</i> / <i>Options</i> / <i>Text document</i>
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 "<Down>"
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"
'///+<ul><li>General</li>
printlog " - General / Allgemein"
if TabLaden.IsVisible then
gefunden = TRUE
Call DialogTest ( TabLaden )
end if
case 2 : Kontext "TabInhalteWriter"
'///+<li>View</li>
printlog " - View / Ansicht"
if TabInhalteWriter.IsVisible then
gefunden = TRUE
Call DialogTest ( TabInhalteWriter )
end if
case 3 : Kontext "TabDirektCursor"
'///+<li>Formating aids</li>
printlog " - Formating aids / Formatierungshilfen"
if TabDirektCursor.IsVisible then
gefunden = TRUE
Call DialogTest ( TabDirektCursor )
end if
case 4 : Kontext "TabRaster"
'///+<li>Grid</li>
printlog " - Grid / Raster"
if TabRaster.IsVisible then
gefunden = TRUE
Call DialogTest ( TabRaster )
end if
case 5 : Kontext "TabGrundschriften"
'///+<li>Default fonts</li>
printlog " - Default Fonts / Grundschriften"
if TabGrundschriften.IsVisible then
gefunden = TRUE
Call DialogTest ( TabGrundschriften )
end if
case 6 : Kontext "TabGrundschriftenAsian"
'///+<li>Default fonts asian</li>
printlog " - Default Fonts Asian / Grundschriften Asiatisch"
if TabGrundschriftenAsian.IsVisible then
gefunden = TRUE
Call DialogTest ( TabGrundschriftenAsian )
end if
case 7 : Kontext "TabGrundschriftenCTL"
'///+<li>Default fonts CTL</li>
printlog " - Default Fonts CTL / Grundschriften CTL"
if TabGrundschriftenCTL.IsVisible then
gefunden = TRUE
Call DialogTest ( TabGrundschriftenCTL )
end if
case 8 : Kontext "TabDruckenWriter"
'///+<li>Print</li>
printlog " - Print / Drucken"
if TabDruckenWriter.IsVisible then
gefunden = TRUE
Call DialogTest ( TabDruckenWriter )
end if
case 9 : Kontext "TabTabelleOptionen"
'///+<li>Table</li>
printlog " - Table / Tabellen"
if TabTabelleOptionen.IsVisible then
gefunden = TRUE
Call DialogTest ( TabTabelleOptionen )
end if
case 10: Kontext "TabAenderungenWriter"
'///+<li>Changes</li>
printlog " - Changes / Aenderungen"
if TabAenderungenWriter.IsVisible then
gefunden = TRUE
Call DialogTest ( TabAenderungenWriter )
end if
case 11: Kontext "TabCompatibility"
'///+<li>Compatibility</li>
printlog " - Compatibility"
if TabCompatibility.IsVisible then
gefunden = TRUE
Call DialogTest ( TabCompatibility )
end if
case 12: Kontext "TabAutoCaption"
'///+<li>AutoCaption</li>
printlog " - AutoCaption"
if TabAutoCaption.IsVisible then
gefunden = TRUE
Call DialogTest ( TabAutoCaption )
end if
case 13: Kontext "TabMailMergeEMail"
'///+<li>Mail Merge E-mail</li></ul>
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
'/// <i>Tools</i> / <i>options</i> / <i>HTML Document</i>
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 "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Spreadsheet</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 7, FALSE )
for i=1 to EchteAnzahl
gefunden = FALSE
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Presentation</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 4, FALSE )
for i=1 to EchteAnzahl
gefunden = FALSE
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Drawing</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 4, FALSE )
for i=1 to EchteAnzahl
gefunden = FALSE
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Formula</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 1, FALSE )
Kontext "OptionenDlg"
'/// Print
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Chart</i>
ToolsOptions
ToPosInOptionlist ( iSectionNumber -1 )
EchteAnzahl = OptionTabPageZaehler ( 1, FALSE )
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
'/// 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
'/// <i>Tools</i> / <i>Options</i> / <i>Data source</i>
ToolsOptions
ToPosInOptionlist ( iSectionNumber -2)
EchteAnzahl = OptionTabPageZaehler ( 2 , FALSE )
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
printlog " - Connections / Verbindungen"
Kontext "TabConnections"
'/// Connections
Call DialogTest ( TabConnections )
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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

View File

@@ -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
'* <http://www.openoffice.org/license.html>
'* 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
'/// <i>Tools</i> / <i>Options</i> / <i>Text document</i>
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 "<Down>"
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"
'///+<ul><li>General</li>
printlog " - General / Allgemein"
if TabLaden.IsVisible then
gefunden = TRUE
Call DialogTest ( TabLaden )
end if
case 2 : Kontext "TabInhalteWriter"
'///+<li>View</li>
printlog " - View / Ansicht"
if TabInhalteWriter.IsVisible then
gefunden = TRUE
Call DialogTest ( TabInhalteWriter )
end if
case 3 : Kontext "TabDirektCursor"
'///+<li>Formating aids</li>
printlog " - Formating aids / Formatierungshilfen"
if TabDirektCursor.IsVisible then
gefunden = TRUE
Call DialogTest ( TabDirektCursor )
end if
case 4 : Kontext "TabRaster"
'///+<li>Grid</li>
printlog " - Grid / Raster"
if TabRaster.IsVisible then
gefunden = TRUE
Call DialogTest ( TabRaster )
end if
case 5 : Kontext "TabGrundschriften"
'///+<li>Default fonts</li>
printlog " - Default Fonts / Grundschriften"
if TabGrundschriften.IsVisible then
gefunden = TRUE
Call DialogTest ( TabGrundschriften )
end if
case 6 : Kontext "TabGrundschriftenAsian"
'///+<li>Default fonts asian</li>
printlog " - Default Fonts Asian / Grundschriften Asiatisch"
if TabGrundschriftenAsian.IsVisible then
gefunden = TRUE
Call DialogTest ( TabGrundschriftenAsian )
end if
case 7 : Kontext "TabGrundschriftenCTL"
'///+<li>Default fonts CTL</li>
printlog " - Default Fonts CTL / Grundschriften CTL"
if TabGrundschriftenCTL.IsVisible then
gefunden = TRUE
Call DialogTest ( TabGrundschriftenCTL )
end if
case 8 : Kontext "TabDruckenWriter"
'///+<li>Print</li>
printlog " - Print / Drucken"
if TabDruckenWriter.IsVisible then
gefunden = TRUE
Call DialogTest ( TabDruckenWriter )
end if
case 9 : Kontext "TabTabelleOptionen"
'///+<li>Table</li>
printlog " - Table / Tabellen"
if TabTabelleOptionen.IsVisible then
gefunden = TRUE
Call DialogTest ( TabTabelleOptionen )
end if
case 10: Kontext "TabAenderungenWriter"
'///+<li>Changes</li>
printlog " - Changes / Aenderungen"
if TabAenderungenWriter.IsVisible then
gefunden = TRUE
Call DialogTest ( TabAenderungenWriter )
end if
case 11: Kontext "TabCompatibility"
'///+<li>Compatibility</li>
printlog " - Compatibility"
if TabCompatibility.IsVisible then
gefunden = TRUE
Call DialogTest ( TabCompatibility )
end if
case 12: Kontext "TabAutoCaption"
'///+<li>AutoCaption</li>
printlog " - AutoCaption"
if TabAutoCaption.IsVisible then
gefunden = TRUE
Call DialogTest ( TabAutoCaption )
end if
case 13: Kontext "TabMailMergeEMail"
'///+<li>Mail Merge E-mail</li></ul>
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
'/// <i>Tools</i> / <i>options</i> / <i>HTML Document</i>
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 "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Spreadsheet</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 7, FALSE )
for i=1 to EchteAnzahl
gefunden = FALSE
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Presentation</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 4, FALSE )
for i=1 to EchteAnzahl
gefunden = FALSE
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Drawing</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 4, FALSE )
for i=1 to EchteAnzahl
gefunden = FALSE
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Formula</i>
ToolsOptions
ToPosInOptionlist ( 4 )
EchteAnzahl = OptionTabPageZaehler ( 1, FALSE )
Kontext "OptionenDlg"
'/// Print
Optionsliste.TypeKeys "<Down>"
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
'/// <i>Tools</i> / <i>Options</i> / <i>Chart</i>
ToolsOptions
ToPosInOptionlist ( iSectionNumber -1 )
EchteAnzahl = OptionTabPageZaehler ( 1, FALSE )
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
'/// 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
'/// <i>Tools</i> / <i>Options</i> / <i>Data source</i>
ToolsOptions
ToPosInOptionlist ( iSectionNumber -2)
EchteAnzahl = OptionTabPageZaehler ( 2 , FALSE )
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
printlog " - Connections / Verbindungen"
Kontext "TabConnections"
'/// Connections
Call DialogTest ( TabConnections )
Kontext "OptionenDlg"
Optionsliste.TypeKeys "<Down>"
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
'-------------------------------------------------------------------------

View File

@@ -180,23 +180,27 @@ function GetDirList ( sPath$, sMatch$ ,lsFile() as String ) as integer
'/// Get Subdirectories from a directory and append them to a list (<b>with</b> path)
'/// <u>Input</u>: Directory with complete path; Search Pattern, e.g *; List
'/// <u>Return</u>: 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
'
'-------------------------------------------------------------------------------

View File

@@ -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
if (iTypeOfCall = 1 OR iTypeOfCall = 3) then
kontext "ExportierenDLG"
if (iTypeOfCall = 1 OR iTypeOfCall = 3) then
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...

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -54,7 +54,7 @@ sub main
PrintLog "-------------------------" + gApplication + "-------------------"
call tiInsertTableUsingMenu
call tiInsertTableUsingButton
call tiInsertTableUsingToolbarbutton
call tiTableObjectBar
call hStatusOut

View File

@@ -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

View File

@@ -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

View File

@@ -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 "'///<b> test if no file is created, if dialog is canceld </b>///'"
'/// 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 "'///<b> test if files are created </b>///'"
'/// 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"
@@ -249,16 +250,14 @@ testcase tHtmlExport
Kontext "active"
if active.exists (5) then
printlog " the name for this design already exists : '" + active.GetText+ "'"
printlog " SAY YES!------------------"
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 "'///<b> check if design is created in dialog </b>///'"
'--------------------------------------------------------
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 + "'"
@@ -346,7 +345,9 @@ testcase tHtmlExport
' 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,7 +377,7 @@ testcase tHtmlExport_Webcast
next i
end if
'/// File->Autopillot->Presentation... ///'----------------------------------
printlog "File->Autopillot->Presentation... " '---------
FileAutopilotPresentation
Kontext "Active"
if Active.Exists(1) then
@@ -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 "'///<b> create a presentation and save it for further references </b>///'"
'/// 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 "<TAB><F2>"
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 "<escape><TAB>"
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
@@ -448,42 +456,40 @@ testcase tHtmlExport_Webcast
kontext "Tasks"
end if
WaitSlot (3000)
'/// activate grafik insert dialog by typing [return] ///'
'Doesnt work, will work when accessability works better - FHA.
printlog "activate grafik insert dialog by typing [return] "
' hTypeKEys "<return>" ' i love accessability feartures .-)))))))))))))))))
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 "<TAB><F2>"
'/// insert text and select the words by typing [strg a] ///'
printlog "insert text and select the words by typing [strg a] "
hTypeKeys "Mecury<RETURN>Venus<RETURN>Earth<RETURN>Mars<RETURN>Jupiter<RETURN>Saturn<RETURN>Uranus<RETURN>Neptune<RETURN>Pluto"
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 "<DOWN>",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 "<Pagedown>"
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 "<TAB><F2>"
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 "<escape><tab><return>"
hTypeKeys "<escape><tab>"
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 "<TAB><F2>"
'/// 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 *5972000<SHIFT RETURN>Mass (Erde=1) 0,0558<SHIFT RETURN>Mass in kg 3,30310<SHIFT RETURN>"
hTypeKeys "Equator-radius (km) 2440<SHIFT RETURN>Equator-radius (Erde=1)0,382<SHIFT RETURN>Middle density (kg/m^3) 5400<SHIFT RETURN>"
@@ -560,22 +566,22 @@ testcase tHtmlExport_Webcast
hTypeKeys "Temperatur at night -170C<SHIFT RETURN>Diameter (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 "'///<b> export as webcast ASP </b>///'"
'/// 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 "'///<b> export as webcast PERL </b>///'"
'------------------------- 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"

View File

@@ -473,10 +473,15 @@ testcase tLineConnect
'/// Go through the different Corner-styles ///'
hOpenContextMenu
sleep 1
hMenuSelectNr(2) 'Choose "Line"
Kontext "TabLinie"
if TabLinie.Exists(2) then
cfirst = CornerStyle.GetSelIndex
else
sleep 1
endif
For i = 1 to CornerStyle.GetItemCount
Kontext "TabLinie"

View File

@@ -55,9 +55,17 @@ testcase tiInsertTableUsingMenu
printlog "Inserting table into doc using the menu."
Call hNewDocument
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."
printlog "Switching between Draw/Impress"
if (UCase(gApplication)) = "IMPRESS" then
Kontext "DocumentImpress"
DocumentImpress.TypeKeys "<MOD1 A>"
else
Kontext "DocumentDraw"
DocumentDraw.TypeKeys "<MOD1 A>"
endif
printlog " Checking Table button."
Kontext "TableObjectBar"
@@ -247,7 +264,11 @@ testcase tiTableObjectBar
Kontext "TableObjectBar"
TableObjectBar.Close
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
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
if (UCase(gApplication)) = "IMPRESS" then
Kontext "DocumentImpress"
else
Kontext "DocumentDraw"
endif
printlog "Checking merge cells."
printlog "Inserting something into cell and select."
if (UCase(gApplication)) = "IMPRESS" then
DocumentImpress.TypeKeys ("a")
DocumentImpress.TypeKeys "<SHIFT RIGHT>"
else
DocumentDraw.TypeKeys ("a")
DocumentDraw.TypeKeys "<SHIFT RIGHT>"
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,6 +367,9 @@ testcase tiTableObjectBar
printlog "Checking table design button 'ToDo:needs some further examination here!"
tabledesign.Click
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."
@@ -340,6 +377,15 @@ testcase tiTableObjectBar
else
printlog "Task Pane visible."
endif
else
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"

View File

@@ -592,7 +592,7 @@ Function TestAnimations
Effects.TypeKeys "<HOME>"
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 "<DOWN>"

View File

@@ -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()

View File

@@ -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 "----------------------"
@@ -150,5 +130,12 @@ testcase tToolsOptionsMeasurementUnit (sApplication as string)
next i
printlog "Setting back measurement to " & iCount2
ToolsOptions
hToolsOptions (sApplication,"General")
Masseinheit.Select(iCount2)
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
hCloseDocument
endcase 'tToolsOptionsMeasurementUnit

View File

@@ -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
@@ -79,42 +116,37 @@ function GetDecimalSeperator ( sDummy$ ) 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
@@ -127,18 +159,15 @@ function LiberalMeasurement ( sShould$, sActual$) as Boolean
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
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 if
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,11 +203,11 @@ 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!!!
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 )
@@ -189,21 +217,17 @@ function StrToDouble ( sWert$ ) as Double
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
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
printlog "after the decimal seperator"
n = (len (sDummy$)-i)
b = val (right (sDummy$, n) )
c = b * 10 ^ -n
@@ -235,11 +259,11 @@ 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' ///'
printlog "+ check the checkbox 'Always with current page' "
setStartCurrentPage = MitAktuellerSeite.isChecked
if bState then
MitAktuellerSeite.Check
@@ -247,7 +271,7 @@ function setStartCurrentPage(optional bState as boolean) as boolean
MitAktuellerSeite.UnCheck
endif
Kontext "ExtrasOptionenDlg"
'///+ close dialog 'Options - Presenation - General' with OK ///'
printlog "+ close dialog 'Options - Presenation - General' with OK "
ExtrasOptionenDlg.OK
end function
@@ -347,8 +371,8 @@ function hCallExport ( HyWhatsYourName as String , sFilter as String, optional b
FileExport
endcatch
Sleep (3)
Kontext "ExportierenDlg"
if ( ExportierenDlg.exists( 3 ) ) then
try
Dateityp.Select sFilter
catch
@@ -387,12 +411,7 @@ function hCallExport ( HyWhatsYourName as String , sFilter as String, optional b
AlienWarning.OK
endif
Kontext "Active"
if Active.Exists then
Active.Yes
endif
else
warnlog( "Dialog <ExportierenDlg> did not open" )
endif
if Active.Exists then Active.Yes
Sleep 3
end function
@@ -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
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."
@@ -547,20 +562,20 @@ 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 "<space>"
Kontext "ExtrasOptionenDlg"
'///+ close options with OK button ///'
printlog "+ close options with OK button "
ExtrasOptionenDlg.OK
end function
@@ -584,11 +599,11 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte
'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 "<mod1 home>"
'/// 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 "<Shift mod1 right>"
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 "<mod1 left>"
'/// open context menu ///'
printlog " open context menu "
printlog " About to call the ContextMenu."
call hOpenContextMenu()
sleep 3
@@ -648,19 +663,15 @@ function sAnalyseContextMenu(iItems as integer, optional iError as long) as inte
' if context menu open do....
if (not bNoContextMenu) then
' printlog ""+i+" C: " + x + ";------ " + getClipboardText + " -------- " + hMenuItemGetText(1)
'/// analyze context menu entries ///'
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"
@@ -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 "<mod1 right>"
next i
'/// leave textbox edit mode ///'
printlog " leave textbox edit mode "
iInternError = iError1 OR iError2
if (iError1 > 0) then
@@ -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 "<End>"
sTemp = ""
do
@@ -788,7 +799,7 @@ function hSelectInList (window, sEntry as String) as Boolean
sTemp = window.GetText
window.TypeKeys "<Up>"
loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp))
'/// press key [Return] ///'
printlog " press key [Return] "
if (sEntry = sTemp) then
window.TypeKeys "<Return>"
hSelectInList = TRUE
@@ -808,7 +819,7 @@ function hWalkTheStyles2 (atemp)
dim aSettings(5,5)
' 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
@@ -831,7 +841,6 @@ function hWalkTheStyles2 (atemp)
else
' aSettings(i,1).Uncheck
endif
'print "baeh"
i=2
Kontext
Messagebox.SetPage TabSchatten
@@ -840,99 +849,99 @@ 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' ///'
' printlog " switch to tabpage 'Bullets' "
' Messagebox.SetPage TabBullet
' Kontext "TabBullet"
' sleep 1
' Call DialogTest (TabBullet)
' sleep 1
' Kontext
' '/// switch to tabpage 'Numbering Type' ///'
' printlog " switch to tabpage 'Numbering Type' "
' Messagebox.SetPage TabNumerierungsart
' Kontext "TabNumerierungsart"
' sleep 1
' Call DialogTest (TabNumerierungsart)
' sleep 1
' Kontext
' '/// switch to tabpage 'Graphics' ///'
' printlog " switch to tabpage 'Graphics' "
' Messagebox.SetPage TabGrafiken
' Kontext "TabGrafiken"
' sleep 1
' Call DialogTest (TabGrafiken)
' sleep 1
' Kontext
' '/// switch to tabpage 'Customize' ///'
' printlog " switch to tabpage 'Customize' "
' Messagebox.SetPage TabOptionenNumerierung
' Kontext "TabOptionenNumerierung"
' sleep 1
@@ -943,11 +952,11 @@ 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,12 +988,12 @@ 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 ///'
printlog " open navigator "
Kontext "Navigator"
if Navigator.exists then
Printlog "Navigator: open :-)"
@@ -993,7 +1002,7 @@ function fGetSlideCount (optional iCount as integer) as integer
ViewNavigator
endif
Sleep 1
'/// count rows in list of navigator: usually number of slides ///'
printlog " count rows in list of navigator: usually number of slides "
Kontext "NavigatorDraw"
i = Liste.GetItemCount
if (isMissing(iCount) = FALSE) then
@@ -1003,7 +1012,7 @@ function fGetSlideCount (optional iCount as integer) as integer
Printlog "ok"
endif
endif
'/// close navigator ///'
printlog " close navigator "
ViewNavigator
fGetSlideCount = i
end function
@@ -1011,11 +1020,11 @@ 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
@@ -1040,20 +1049,18 @@ 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 ///'
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
warnlog "Could not open stylist :-("
endif
if Stylist.NotExists (5) then warnlog "Could not open stylist :-("
end if
Praesentationsvorlagen.Click
sleep 1
@@ -1064,7 +1071,7 @@ function fGetSetPageBackground (iSelect as integer, iWhere as integer) as intege
sleep 1
hMenuSelectNr (1)
else
'/// Format -> Page -> Background -> Color ///''FormatPage
printlog " Format -> Page -> Background -> Color "'FormatPage
sleep 1
try ' this was just paranoia to find a not mentioned messagebox
FormatSlideDraw
@@ -1125,7 +1132,7 @@ function fGetSetPageBackground (iSelect as integer, iWhere as integer) as intege
endif
if (iWhere = 0) then
sleep 1 ' ABSOLUT NECESSARRY !!! (TBO) else crash on UNIX on following command!!!!
sleep 1 ' ABSOLUT NECESSARY !!! (TBO) else crash on UNIX on following command!!!!
FormatStylist ' closing
endif
sleep 4
@@ -1142,13 +1149,13 @@ function CreateTextSetEffectAndAngle
WaitSlot (1000)
EffectAdd.Click
kontext
'/// Switch to TabPage: Entrance ///'
printlog " Switch to TabPage: Entrance "
active.setPage(TabEntrance)
kontext "TabEntrance"
if TabEntrance.exists(5) then
'/// select in the listbox 'Effects' the second entry///'
printlog " select in the listbox 'Effects' the second entry"
Effects.select (24)
'/// select speed 'Fast' -> fourth item in list ///'
printlog " select speed 'Fast' -> fourth item in list "
Speed.Select 2
TabEntrance.OK
end if
@@ -1171,14 +1178,14 @@ 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
@@ -1317,7 +1324,7 @@ function optionstest
for ota = 1 to TextAnimation.GetItemCount
TextAnimation.Select ota
next ota
'/// switch to TabPage 'Timing' ///'
printlog " switch to TabPage 'Timing' "
Kontext
Active.SetPage TabTiming
kontext "TabTiming"
@@ -1358,7 +1365,7 @@ function optionstest
else
warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
endif
'/// switch to TabPage 'Timing' ///'
printlog " switch to TabPage 'Timing' "
Kontext
active.setPage TabTextAnimation
kontext "TabTextAnimation"
@@ -1433,7 +1440,7 @@ function optionstest2
else
Warnlog "DelayBetweenCharacters should have been enabled"
endif
'/// switch to TabPage 'Timing' ///'
printlog " switch to TabPage 'Timing' "
Kontext
Active.SetPage TabTiming
kontext "TabTiming"
@@ -1495,7 +1502,7 @@ function optionstest2
else
warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
endif
'/// switch to TabPage 'Timing' ///'
printlog " switch to TabPage 'Timing' "
Kontext
active.setPage TabTextAnimation
kontext "TabTextAnimation"

View File

@@ -37,10 +37,62 @@
'*
'\******************************************************************************
'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
@@ -51,10 +103,10 @@ sub sFileExport
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() )
@@ -69,12 +121,11 @@ sub sFileExport
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,7 +135,6 @@ sub callAutocorrectOptions
end sub
'-------------------------------------------------------------------------------
sub sCheckCheck (i, Pruefung$, bEnabled)
hTextrahmenErstellen (Pruefung$,20,20,60,40)
@@ -112,7 +162,6 @@ sub sCheckCheck (i, Pruefung$, bEnabled)
end sub
'-------------------------------------------------------------------------------
sub sCheckUnderlined (bEnabled)
dim btemp as boolean
@@ -133,7 +182,6 @@ sub sCheckUnderlined (bEnabled)
end sub
'-------------------------------------------------------------------------------
sub sCheckSupperscript (bEnabled)
hTypeKeys "<Home><Right><Right>"
@@ -148,7 +196,6 @@ sub sCheckSupperscript (bEnabled)
end sub
'-------------------------------------------------------------------------------
sub sCheckDash (bEnabled)
' inserted is 45
@@ -164,15 +211,14 @@ 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 " deselect all "
Printlog "-----------------------------------"
'/// select in default order and take Position X in mind ;-) ///'
printlog " select in default order and take Position X in mind ;-) "
hTypeKeys ("<escape><escape>")
for i = 1 to 3
hTypeKeys ("<TAB>")
@@ -194,7 +240,6 @@ sub sPrintCheckOrder (optional bcheck as boolean)
end sub
'--------------------------- Tests for Writer ----------------------------------
sub writertest
try
@@ -215,7 +260,6 @@ sub writertest
end sub ' big one
'---------------------------- Tests for Calc -----------------------------------
sub calctest
try
@@ -231,7 +275,6 @@ sub calctest
end sub
'-------------------------------------------------------------------------------
sub tClipboardFromDrawTest
EnableQAErrors = false
@@ -250,27 +293,25 @@ sub tClipboardFromDrawTest
end sub
'-------------------------------------------------------------------------------
sub Select_Copy
'/// Select and copy ///'
' Removed by JSK: Sleep 10
printlog " Select and copy "
Sleep 10
if gApplication = "DRAW" then
hUseAsyncSlot( "EditSelectAll" )
EditSelectAll
printlog " We just ran EditSelectAll - Application is Draw"
end if
if gApplication = "IMPRESS" then
hUseAsyncSlot( "EditSelectAll" )
EditSelectAll
printlog " We just ran EditSelectAll - Application is Impress"
end if
' Removed by JSK: Sleep 2
hUseAsyncSlot( "EditCopy" )
' Removed by JSK: Sleep 2
Sleep 2
EditCopy
Sleep 2
printlog " Copied object"
end Sub
'-------------------------------------------------------------------------------
sub SaveMeasurementSetFirst
if (gApplication = "DRAW") then
@@ -293,7 +334,6 @@ sub SaveMeasurementSetFirst
end Sub
'-------------------------------------------------------------------------------
sub MeasurementSetFirst
dim f as integer
@@ -323,7 +363,6 @@ sub MeasurementSetFirst
end Sub
'-------------------------------------------------------------------------------
sub ResetMeasurement
dim f as integer
@@ -354,25 +393,24 @@ sub ResetMeasurement
end Sub
'-------------------------------------------------------------------------------
sub SetKontextApplication
' Removed by JSK: sleep 1
sleep 1
Select Case gApplication
Case "DRAW"
Kontext "DocumentDraw"
Printlog "gApplication / Kontext is now: DocumentDraw"
'Printlog "gApplication / Kontext is now: DocumentDraw"
sleep 1
Case "IMPRESS"
Kontext "DocumentImpress"
Printlog "gApplication / Kontext is now is now: DocumentImpress"
'Printlog "gApplication / Kontext is now is now: DocumentImpress"
sleep 1
Case "WRITER"
Kontext "DocumentWriter"
Printlog "gApplication / Kontext is now is now: DocumentWriter"
'Printlog "gApplication / Kontext is now is now: DocumentWriter"
sleep 1
Case "CALC"
Kontext "DocumentCalc"
Printlog "gApplication / Kontext is now is now: DocumentCalc"
'Printlog "gApplication / Kontext is now is now: DocumentCalc"
sleep 1
end select
sleep 1
@@ -381,33 +419,33 @@ 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
@@ -440,31 +478,18 @@ sub hSetSpellHypLanguage
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 )
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,9 +504,7 @@ 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
@@ -491,7 +514,6 @@ sub Position_Vergleichen (Ueber_Text_1 as string,Ueber_Text_2 as string,Ueber_Te
end sub
'-------------------------------------------------------------------------------
sub g_demoguide
printlog "------------------- g_demoguide.inc ------------------------"
@@ -502,9 +524,9 @@ sub g_demoguide
end sub
'-------------------------------------------------------------------------------
'--------------------------------------------------------------------
sub sFormatTextDrawAnimation
TabLauftext.OK
WaitSlot (3000)
gMouseClick 99,99
@@ -520,27 +542,29 @@ sub sFormatTextDrawAnimation
end sub
'-------------------------------------------------------------------------------
sub mouseclickinpresentation
Kontext "DocumentPresentation"
autoexecute=false
printlog " switch slides using mouse clicks "
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
end sub
'-------------------------------------------------------------------------------
sub im_003_
printLog Chr(13) + "--------- im_003_ ----------"
Call tiViewMasterView
Call tiViewSlideMaster
Call tiViewPanes
@@ -549,28 +573,32 @@ sub im_003_
end sub
'-------------------------------------------------------------------------------
sub im_004_
printLog Chr(13) + "--------- im_004_ ----------"
Call tiInsertSlideExpandSummary
end sub
'-------------------------------------------------------------------------------
sub im_005_
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
@@ -578,45 +606,50 @@ sub im_007_
end sub
'-------------------------------------------------------------------------------
sub im_011_
printLog Chr(13) + "--------- im_011_ ---------- "
Call tiDiaLeiste ' only IMPRESS
end sub
'-------------------------------------------------------------------------------
sub D_002_
printLog Chr(13) + "--------- D_002_ ---------- "
Call tdEditCrossFading
Call tdEditLayer
end sub
'-------------------------------------------------------------------------------
sub D_003_
printLog Chr(13) + "--------- D_003_ ---------- "
call tdViewSlide
call tdViewPagePane
end sub
'-------------------------------------------------------------------------------
sub D_005_
printLog Chr(13) + "--------- D_005_ ---------- "
call tiFormatLayer ' only in draw !!!!!
end sub
'-------------------------------------------------------------------------------
sub d_007
printLog Chr(13) + "--------- d_007 ---------- "
call tdModifyRotate
end sub
'-------------------------------------------------------------------------------
sub hOpenGallery
Kontext "DocumentWriter"
ToolsGallery
WaitSlot (2000)
@@ -628,16 +661,13 @@ sub hOpenGallery
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
@@ -667,19 +697,18 @@ sub LoadGraphic ( sFile as String, bOK as Boolean ) as boolean
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,9 +719,10 @@ 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
@@ -719,7 +749,6 @@ sub id_001
end sub
'------------------------------------------------------------------------------
sub id_002
printLog Chr(13) + "--------- id_002 ----------"
@@ -742,7 +771,6 @@ sub id_002
end sub
'-------------------------------------------------------------------------
sub id_003
printLog Chr(13) + "--------- id_003 ----------"
@@ -758,7 +786,6 @@ sub id_003
end sub
'-------------------------------------------------------------------------
sub id_004
printLog Chr(13) + "--------- id_004 ----------"
@@ -788,7 +815,6 @@ sub id_004
end sub
'------------------------------------------------------------------------------
sub id_005
printLog Chr(13) + "--------- id_005 ----------"
@@ -812,12 +838,11 @@ sub id_005
call tiFormatStylesSlideDesign
call tiFormatFontwork
call tiFormatGroup
'/// format->group is also modify->group ///'
printlog " format->group is also modify->group "
' tiFormatLayer ' not in impress
end sub
'------------------------------------------------------------------------------
sub id_006
printLog Chr(13) + "--------- id_006 ----------"
@@ -836,7 +861,6 @@ sub id_006
end sub
'-------------------------------------------------------------------------------
sub id_007
printLog Chr(13) + "--------- id_007 ----------"
@@ -863,7 +887,6 @@ sub id_007
end sub
'-------------------------------------------------------------------------------
sub id_008
printLog Chr(13) + "--------- id_008 ----------"
@@ -872,8 +895,7 @@ sub id_008
call tidWindow123
end sub
'-------------------------------------------------------------------------------
'------------------------------------------------------------------------------
sub id_009
printLog Chr(13) + "--------- id_009 ----------"
@@ -887,8 +909,7 @@ sub id_009
end sub
'-------------------------------------------------------------------------------
'------------------------------------------------------------------------------
sub id_011
printLog Chr(13) + "--------- id_011 ----------"
@@ -901,72 +922,68 @@ sub id_011
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' ///'
printlog " switch to tabpage 'Line' "
Messagebox.SetPage TabLinie
kontext "TabLinie"
Call DialogTest ( TabLinie )
Kontext
'/// switch to tabpage 'Area' ///'
printlog " switch to tabpage 'Area' "
Messagebox.SetPage TabArea
kontext "TabArea"
Call DialogTest ( TabArea )
'/// select radio button 'none' ///'
printlog " select radio button 'none' "
NoFill.Check
Call DialogTest ( TabArea, 1 )
'/// select radio button 'color' ///'
printlog " select radio button 'color' "
Color.Check
Call DialogTest ( TabArea, 2 )
'/// select radio button 'gradient' ///'
printlog " select radio button 'gradient' "
Gradient.Check
Call DialogTest ( TabArea, 3 )
'/// select radio button 'hatching' ///'
printlog " select radio button 'hatching' "
Hatching.Check
Call DialogTest ( TabArea, 4 )
'/// select radio button 'bitmap' ///'
printlog " select radio button 'bitmap' "
Bitmap.Check
Call DialogTest ( TabArea, 5 )
Kontext
'/// switch to tabpage 'shadowing' ///'
printlog " switch to tabpage 'shadowing' "
Messagebox.SetPage TabSchatten
kontext "TabSchatten"
'/// check 'use shadow' ///'
printlog " check 'use shadow' "
Anzeigen.check
Call DialogTest ( TabSchatten )
Kontext
'/// switch to tabpage 'Transparency' ///'
printlog " switch to tabpage 'Transparency' "
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
'/// check 'No transparency' ///'
printlog " check 'No transparency' "
KeineTransparenz.Check
'/// check 'Transparency' ///'
printlog " check 'Transparency' "
LineareTransparenz.Check
'/// check 'Gradient' ///'
printlog " check 'Gradient' "
Transparenzverlauf.Check
Kontext
'/// switch to tabpage 'Font' ///'
printlog " switch to tabpage 'Font' "
Messagebox.SetPage TabFont
kontext "TabFont"
Call DialogTest ( TabFont )
Kontext
'/// switch to tabpage 'Font Effect' ///'
printlog " switch to tabpage 'Font Effect' "
Messagebox.SetPage TabFontEffects
kontext "TabFontEffects"
Kontext
'/// switch to tabpage 'indents & spacing' ///'
printlog " switch to tabpage 'indents & spacing' "
Messagebox.SetPage TabEinzuegeUndAbstaende
kontext "TabEinzuegeUndAbstaende"
Call DialogTest ( TabEinzuegeUndAbstaende )
@@ -974,32 +991,32 @@ sub hWalkTheStyles (optional a as integer,optional b as integer)
i=2
if a <= i AND i <= b then
Kontext
'/// switch to tabpage 'Organize' ///'
printlog " switch to tabpage 'Organize' "
Messagebox.SetPage TabVerwalten
kontext "TabVerwalten"
Call DialogTest ( TabVerwalten )
Kontext
'/// switch to tabpage 'text' ///'
printlog " switch to tabpage 'text' "
Messagebox.SetPage TabText
Kontext "TabText"
Call DialogTest ( TabText )
Kontext
'/// switch to tabpage 'text animation' ///'
printlog " switch to tabpage 'text animation' "
Messagebox.SetPage TabLauftext
Kontext "TabLauftext"
Call DialogTest ( TabLauftext )
Kontext
'/// switch to tabpage 'dimension' ///'
printlog " switch to tabpage 'dimension' "
Messagebox.SetPage TabBemassung
Kontext "TabBemassung"
Call DialogTest ( TabBemassung )
Kontext
'/// switch to tabpage 'connector' ///'
printlog " switch to tabpage 'connector' "
Messagebox.setpage TabVerbinder
Kontext "TabVerbinder"
Call Dialogtest ( TabVerbinder )
Kontext
'/// switch to tabpage 'alignment' ///'
printlog " switch to tabpage 'alignment' "
Messagebox.setpage TabAusrichtungAbsatz
Kontext "TabAusrichtungAbsatz"
Links.Check
@@ -1007,44 +1024,44 @@ sub hWalkTheStyles (optional a as integer,optional b as integer)
Zentriert.Check
Blocksatz.Check
Kontext
'/// switch to tabpage 'Tabs' ///'
printlog " switch to tabpage 'Tabs' "
Messagebox.setpage TabTabulator
Kontext "TabTabulator"
'/// click 'new' ///'
printlog " click 'new' "
Neu.click
'/// ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS ///'
'/// click 'delete all' ///'
printlog " ' MAYBE CHECK COUNT OF THIS ?? Position svx:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS "
printlog " click 'delete all' "
AlleLoeschen.click
'/// click 'new' ///'
printlog " click 'new' "
Neu.click
'/// click 'delete' ///'
printlog " click 'delete' "
Loeschen.click
endif
i=3
if a <= i AND i <= b then
Kontext
'/// switch to tabpage 'Bullets' ///'
printlog " switch to tabpage 'Bullets' "
Messagebox.SetPage TabBullet
Kontext "TabBullet"
sleep 1
Call DialogTest (TabBullet)
sleep 1
Kontext
'/// switch to tabpage 'Numbering Type' ///'
printlog " switch to tabpage 'Numbering Type' "
Messagebox.SetPage TabNumerierungsart
Kontext "TabNumerierungsart"
sleep 1
Call DialogTest (TabNumerierungsart)
sleep 1
Kontext
'/// switch to tabpage 'Graphics' ///'
printlog " switch to tabpage 'Graphics' "
Messagebox.SetPage TabGrafiken
Kontext "TabGrafiken"
sleep 1
Call DialogTest (TabGrafiken)
sleep 1
Kontext
'/// switch to tabpage 'Customize' ///'
printlog " switch to tabpage 'Customize' "
Messagebox.SetPage TabOptionenNumerierung
Kontext "TabOptionenNumerierung"
sleep 1
@@ -1053,4 +1070,4 @@ sub hWalkTheStyles (optional a as integer,optional b as integer)
endif
end sub
'-------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------

View File

@@ -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"

View File

@@ -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
'* <http://www.openoffice.org/license.html>
'* 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

View File

@@ -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
'* <http://www.openoffice.org/license.html>
'* 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 "<SPACE>"
printlog " Tag 'Assume variables not negative'"
SolverSettings.Select (2)
SolverSettings.TypeKeys "<SPACE>"
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

View File

@@ -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
'* <http://www.openoffice.org/license.html>
'* 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 ("<SHIFT F4>")
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 ("<SHIFT F4>")
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 "<SHIFT F4>"
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 ("<SHIFT F4>")
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

View File

@@ -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

View File

@@ -788,8 +788,6 @@ endcase
'-----------------------------------------------------------------
testcase tFunctions_13
Warnlog "#i102752# - tFunctions_13 outcommented due to bug."
goto endsub
Dim sCombineCharacter as String
Dim sTestFile as String

View File

@@ -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

View File

@@ -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

View File

@@ -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,8 +150,6 @@ endcase
'-------------------------------------------------------------------------------------------
testcase tParagraphAlignment3
Warnlog "#i102752# - tParagraphAlignment3 outcommented due to bug."
goto endsub
Dim sTestFile as String
@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -217,7 +217,7 @@ endcase
' **********************************************************************
testcase tViewNavigator3
QaErrorLog "#i94614 + i102752# - tViewNavigator3 outcommented"
WarnLog "#i94614# - tViewNavigator3 outcommented"
goto endsub
Dim NavigationTearOff as boolean

View File

@@ -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 "<MOD1 HOME>"
' point cursor to index entry
Call wTypeKeys "<DOWN>", 4 + i
'execute Hyperlink
ContextOpenHyperlink
' check if it jumps to correct target
Call wTypeKeys "<SHIFT END>"
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 "<MOD1 HOME>"
' point cursor to index entry
Call wTypeKeys "<DOWN>", 5 + i
'execute Hyperlink
ContextOpenHyperlink
' check if it jumps to correct target
Call wTypeKeys "<SHIFT END>"
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

View File

@@ -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,8 +1035,6 @@ endcase
'-----------------------------------------------------------------
testcase tTextframes_65
Warnlog "#i102752# - tTextframes_65 outcommented due to bug."
goto endsub
Dim sTestFile as String
Dim iHorizontal as Integer
@@ -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

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -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
'* <http://www.openoffice.org/license.html>
'* 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

View File

@@ -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!"

View File

@@ -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,8 +1411,6 @@ endcase
'-----------------------------------------------------------
testcase tHtmlDocFormatAlignment
Warnlog "#i102752# - tHtmlDocFormatAlignment outcommented due to bug."
goto endsub
gApplication = "HTML"
PrintLog "- Format / Alignment"

View File

@@ -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"

View File

@@ -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"