summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtestautomation/extensions/optional/includes/location.inc37
-rwxr-xr-xtestautomation/extensions/optional/includes/publisher.inc46
-rwxr-xr-xtestautomation/framework/tools/includes/all_interfaces.txt297
-rwxr-xr-xtestautomation/global/tools/includes/required/t_files.inc2
-rwxr-xr-xtestautomation/global/tools/includes/required/t_menu.inc1344
-rwxr-xr-xtestautomation/math/required/m_updt.bas2
-rwxr-xr-xtestautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc2
-rwxr-xr-xtestautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_iz.inc2
8 files changed, 741 insertions, 991 deletions
diff --git a/testautomation/extensions/optional/includes/location.inc b/testautomation/extensions/optional/includes/location.inc
index 16b645f68..71b1b62c3 100755
--- a/testautomation/extensions/optional/includes/location.inc
+++ b/testautomation/extensions/optional/includes/location.inc
@@ -39,11 +39,7 @@
testcase tExtensionLocation
- '///<h3>Test the extension locator service</h3>
- '///<p>This test installs a dummy extension and loads a document afterwards
- '///+ which comes with a macro to trigger the locator service. By running the
- '///+ macro a messagebox should pop open to display the installation path of
- '///+ the extension.</b><br><br>
+ printlog( "Test the extension locator service" )
' The location of the sample extension and helper document
dim cWorkPath as string
@@ -61,20 +57,16 @@ testcase tExtensionLocation
printlog( "Using extension: " & cWorkPath & EXTENSION_NAME )
printlog( "Using document.: " & cWorkPath & DOCUMENT_NAME )
- '///<ul>
- '///+<li>Load the testdocument</li>
brc = hFileOpen( cWorkPath & DOCUMENT_NAME )
if ( not brc ) then
- warnlog( "Error while loading document" )
- endif
-
- '///+<li>Allow macro execution</li>
- brc = hAllowMacroExecution()
- if ( not brc ) then
+ brc = hAllowMacroExecution()
+ if ( not brc ) then
+ warnlog( "This is not the macro execution warning" )
+ endif
+ else
warnlog( "Macro execution warning is missing" )
endif
- '///+<li>Run the macro</li>
irc = hMacroOrganizerRunMacro( MACRO_NAME )
if ( irc = 0 ) then
warnlog( "No macro with the given name could be found, aborting" )
@@ -85,7 +77,6 @@ testcase tExtensionLocation
goto endsub
endif
- '///+<li>Test that the messagebox is open and verify that it contains an empty string</li>
kontext "active"
if ( active.exists( 2 ) ) then
cMsg = active.getText()
@@ -99,44 +90,34 @@ testcase tExtensionLocation
warnlog( "No messagebox displayed, please check that the macro is executed" )
endif
- '///+<li>Add the extension</li>
irc = hExtensionAddGUI( cWorkPath & EXTENSION_NAME , "verbose,InstallForUser" )
-
- '///+<li>Run the macro</li>
irc = hMacroOrganizerRunMacro( MACRO_NAME )
if ( irc = 0 ) then
warnlog( "No macro with the given name could be found" )
endif
- '///+<li>Test that the messagebox is open and verify that it contains an empty string</li>
- '///<ul>
kontext "active"
if ( active.exists( 2 ) ) then
cMsg = active.getText()
- '///+<li>Verify that the messagebox is not empty</li>
if ( cMsg = "" ) then
warnlog( "The messagebox is empty, please check." )
else
-
printlog( "Content of messagebox: " & cMsg )
- '///+<li>Verify that it is a file-URL</li>
if ( instr( cMsg , "file:///" ) > 0 ) then
printlog( "Found File-URL" )
else
warnlog( "This does not appear to be a File-URL, please check!" )
endif
- '///+<li>Verify that the string contains the extension name</li>
if ( instr( cMsg , EXTENSION_NAME ) > 0 ) then
printlog( "Extension string is present" )
else
warnlog( "Extension name seems to be missing" )
endif
- '///+<li>Test file presence on filesystem level</li>
if ( dir( cMsg ) = "" ) then
warnlog( "The extension could not be found at the expected location" )
else
@@ -148,17 +129,13 @@ testcase tExtensionLocation
else
warnlog( "No messagebox displayed, please check that the macro is executed" )
endif
- '///</ul>
- '///+<li>Cleanup: Remove the extension</li>
+
irc = hExtensionRemoveGUI( EXTENSION_NAME )
if ( irc <> 0 ) then
warnlog( "the extension was NOT cleanly removed" )
endif
- '///+<li>Cleanup: Close document</li>
hDestroyDocument()
- '///</ul>
-
endcase
diff --git a/testautomation/extensions/optional/includes/publisher.inc b/testautomation/extensions/optional/includes/publisher.inc
index 0acfbc641..9af9abb7b 100755
--- a/testautomation/extensions/optional/includes/publisher.inc
+++ b/testautomation/extensions/optional/includes/publisher.inc
@@ -39,21 +39,16 @@
testcase tExtensionPublisher
- '///<h1>Extension publisher and release notes</h1>
+ printlog( "Extension Manager and Release Notes" )
if ( gISOLang <> "en-US" ) then
qaerrorlog( "Test does not handle translated strings, aborting" )
goto endsub
endif
- '///<u><pre>Synopsis</pre></u>With CWS jl76 extensions can bring a link to the extension
- '///+ publisher and the release notes which are displayed in the online update dialog
- '///+ for extensions - if provided. Otherwise these fields are not visible.<br>
- '///<u><pre>Specification document</pre></u>
- '///+ <a href=http://specs.openoffice.org/appwide/packagemanager/online_update_for_extensions.odt>
- '///+ http://specs.openoffice.org/appwide/packagemanager/online_update_for_extensions.odt</a><br>
- '///<u><pre>Files used</pre></u>(gTesttoolPath)/extensions/input/publisher/*.oxt,*.info<br>
- '///<u><pre>Test case specification</pre></u>
+ ' Specification document
+ ' http://specs.openoffice.org/appwide/packagemanager/online_update_for_extensions.odt
+ ' http://specs.openoffice.org/appwide/packagemanager/online_update_for_extensions.odt
' This is the path where the test-extensions and the info file are located
dim cBasePath as string
@@ -87,15 +82,10 @@ testcase tExtensionPublisher
iExtensionCount = hGetExtensionCount()
- '///<ul>
- '///+<li>Read info-file about the testdocuments.</li>
hGetDataFileSection( cInfoFile, cConfigArray(), "info", "", "" )
iFileCount = int( hGetValueForKeyAsString( cConfigArray() , "filecount" ) )
printlog( cInfoFile & " specifies " & iFileCount & " documents to load" )
- '///+<li>Install all extensions specified in the info-file.<br>
- '///+You may use &quot;unopkg&quot; or the Extension Manager GUI.<br>
- '///+The test uses &quot;unopkg&quot;.</li>
printlog( "Installing extensions" )
for iCurrentFile = 1 to iFileCount
@@ -107,8 +97,7 @@ testcase tExtensionPublisher
next iCurrentFile
printlog( "Finished installing extensions" )
-
- '///+<li>Open the extension manager GUI (if not open yet).</li>
+
kontext "PackageManager"
if ( not PackageManager.exists() ) then
ToolsPackageManager
@@ -124,7 +113,6 @@ testcase tExtensionPublisher
goto endsub
endif
- '///+<li>Wait about 5 seconds - the &quot;Live-Deployment&quot; needs time to strike.</li>
iExitCounter = 0
kontext "PackageManager"
WaitSlot()
@@ -139,20 +127,15 @@ testcase tExtensionPublisher
endif
loop
- '///+<li>Click on &quot;update...&quot;<br>
- '///+The &quot;Update Extensions&quot; dialog should open.</li>
kontext "PackageManager"
if ( Updates.isEnabled() ) then
printlog( "Updates-button is enabled" )
Updates.click()
- '///+<li>Wait max 200 seconds for the &quot;Update&quot; dialog listbox to get populated.</li>
kontext "ExtensionUpdate"
if ( ExtensionUpdate.exists( 2 ) ) then
-
- '///+<li>Verify that all extensions (currently 7) are present - and only those</li>
iExitCounter = 0
do while ( AvailableUpdatesList.getItemCount() < iFileCount )
printlog( "Waiting for Updates List to populate..." )
@@ -168,8 +151,6 @@ testcase tExtensionPublisher
endif
loop
- '///+<li>&quot;Show all updates&quot; checkbox must be disabled.<br>
- '///+There are no additional extensions installed at this time</li>
if ( ShowAllUpdates.exists() ) then
if ( ShowAllUpdates.isEnabled() ) then
warnlog( """Show all updates"" should be disabled" )
@@ -185,30 +166,23 @@ testcase tExtensionPublisher
printlog( "Available updates list populated in " & iExitCounter & " seconds" )
if ( iExitCounter < 20 ) then
- '///+<li>Select each listed extension and verify its attributes.</li>
- '///<ul>
+
for iCurrentFile = 1 to iFileCount
- '///+<li>Retrieve the name of the extension from the config file.</li>
hGetDataFileSection( cInfoFile, cConfigArray(), iCurrentFile, "", "" )
cCurrentFileName = hGetValueForKeyAsString( cConfigArray() , "display_name" )
- '///+<li>Retrieve configuration of the extension from config file: Release Notes.</li>
cHasReleaseNotes = hGetValueForKeyAsString( cConfigArray() , "has_release_notes" )
cReleaseNotes = hGetValueForKeyAsString( cConfigArray() , "release_notes" )
- '///+<li>Retrieve configuration of the extension from config file: Publisher.</li>
cHasPublisher = hGetValueForKeyAsString( cConfigArray() , "has_publisher" )
cPublisher = hGetValueForKeyAsString( cConfigArray() , "publisher" )
- '///+<li>Select the current extension by index.</li>
AvailableUpdatesList.select( iCurrentFile )
- '///+<li>Verify that the extension is the one we expect.</li>
if ( AvailableUpdatesList.getText() = cCurrentFileName ) then
printlog( "Testing extension: " & cCurrentFileName )
- '///+<li>Verify the configuration for the Release Notes.</li>
if ( lcase( cHasReleaseNotes ) = "yes" ) then
if ( ReleaseNotesText.isVisible() ) then
printlog( " - Release notes text is visible. Good." )
@@ -232,7 +206,6 @@ testcase tExtensionPublisher
endif
endif
- '///+<li>Verify the configuration for the Publisher.</li>
if ( lcase( cHasPublisher ) = "yes" ) then
if ( UpdatePublisherText.isVisible() ) then
printlog( " - Publisher text is visible. Good." )
@@ -270,9 +243,7 @@ testcase tExtensionPublisher
else
warnlog( "No extensions available for update. Installation failed?" )
endif
- '///</ul>
-
- '///+<li>Close the extension update dialog.</li>
+
kontext "ExtensionUpdate"
ExtensionUpdate.cancel()
else
@@ -283,11 +254,9 @@ testcase tExtensionPublisher
warnlog( "Update-button on extension manager ui is disabled" )
endif
- '///+<li>Close extension manager GUI</li>
kontext "PackageManager"
PackageManager.close()
- '///+<li>Cleanup - remove all test-extensions.</li>
printlog( "Removing extensions" )
for iCurrentFile = 1 to iFileCount
hGetDataFileSection( cInfoFile, cConfigArray(), iCurrentFile, "", "" )
@@ -295,7 +264,6 @@ testcase tExtensionPublisher
sExtensionCLI( "remove" , cCurrentFileName )
next iCurrentFile
printlog( "Finished removing extensions" )
- '///</ul>
endcase
diff --git a/testautomation/framework/tools/includes/all_interfaces.txt b/testautomation/framework/tools/includes/all_interfaces.txt
index 7bb288c97..e81f5b783 100755
--- a/testautomation/framework/tools/includes/all_interfaces.txt
+++ b/testautomation/framework/tools/includes/all_interfaces.txt
@@ -1,218 +1,125 @@
-
-function checkCheckBox( _file as string , sKey as string , control as object , optional cBugID as string ) as boolean
-function checkComboBox( _file as string , sKey as string , control as object ) as boolean
-function checkEntryField( _file as string , sKey as string , control as object , optional cBugID as string ) as boolean
-function checkListBox( _file as string , sKey as string , control as object ) as boolean
-function checkListItem( _file as string , _iIndex as integer , sKey as string , control as object ) as boolean
-function checkRadioButton( _file as string , sKey as string , control as object ) as boolean
-function checkRadioButtons( _file as string , sKey as string , control1 as object , control2 as object , optional control3 as object , optional control4 as object ) as integer
-function hAccessStandardBar() as boolean
-function hAddTrustedPath( cPath as string ) as boolean
-function hAllowMacroExecution() as boolean
-function hBatchLoadJavaFiles( aFileList() , cIdent as string )
-function hCancelFilterDialog() as boolean
-function hChangeDoc() as string
-function hCheckPropertyPresence ( cSetting as string , iPos as integer ) as boolean
+function hGetFileLocationAPI() as string
+function hGetDocTypeAPI() as string
+function listdebug( lsList() as string , cComment as string ) as integer
+function initlistdebug( cComment as string ) as integer
+function listmoveitem( source() as string, target() as string, itemid as integer ) as integer
+function listconvertpath( lsList() as string ) as integer
+function listInsertSection( lsList() as string, cSection as string ) as integer
+function CheckAsianLanguageSupport( sSupport as String ) as String
+function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
+function fCloseNavigator
+function fGetCountryName( CountryID as Integer ) as String
+function hToolsCustomizeOpen() as boolean
+function hToolsCustomizeSelectTab( cTab as string ) as boolean
+function hToolsCustomizeClose( iMode as integer ) as boolean
+function hToolsCustomizeAddNewMenu( cName as string, bMode as boolean ) as boolean
+function hDeselectSeparator() as integer
function hClickCommandButton( iItemToClick as integer ) as boolean
-function hClickNextButton() as boolean
-function hCloseBasicIDE() as boolean
-function hCloseCollectionBar() as boolean
-function hCloseHelp() as boolean
-function hCloseNavigator() as boolean
-function hClosePropertyBrowser() as boolean
-function hCloseScriptOrganizer() as boolean
-function hCompareSubStrings( cRef as string, cSub as string ) as integer
-function hConvertStringToLong( cValue as string ) as long
-function hCountMatchesInList( acItemList() as string, cSearchTerm as string ) as integer
-function hCreateBasicWorkFiles() as string
+function hFileOpenMultiSelect( iArray() as integer ) as integer
+function hSaveLoadDelSuccess( cFile as string ) as integer
+function hLoadFileExpectSuccess( fpath as string ) as boolean
+function hLoadFileExpectFailure( fpath as string ) as boolean
+function hSaveFileExpectSuccess( fpath as string , bReplace as boolean ) as boolean
+function hSaveFileExpectFailure( fpath as string , errortype as integer ) as boolean
function hCreateDirectoryExpectSuccess( dirname as string ) as boolean
-function hCreateDocument() as boolean
-function hCreateFaxDevice( cName as string ) as boolean
-function hCreateModuleForDoc( optional cName as string ) as boolean
-function hCreateScriptingObject( cName as string ) as boolean
-function hDeleteFile( cFileOrig as string ) as boolean
function hDeleteFileViaFileOpen( cFile as String ) as boolean
-function hDeleteLibrary( iLocation as integer, cLibName as string ) as boolean
-function hDeleteMacro() as boolean
-function hDeleteScript( cName as string , bSuccess as boolean ) as boolean
-function hDeleteUserTemplates() as integer
-function hDelPrinter( cPrinterName as string ) as integer
-function hDenyMacroExecution() as boolean
-function hDeselectSeparator() as integer
-function hDestroyDocument() as boolean
-function hDocumentInfoSelectTab( cTabPage as string ) as boolean
-function hDocumentTypeKeys( cString as string ) as boolean
-function hDrawControlOnDialog( iControl as integer ) as string
-function hDrawControl( xPos as integer, yPos as integer, xEnd as integer, yEnd as integer ) as boolean
-function hExpandAllNodes( oControl as object ) as integer
-function hExpandNode( oControl as object, iNode as integer ) as integer
-function hFileOpenMultiSelect( iArray() as integer ) as integer
-function hFindCopyRemoveJavaLogs( cSourcePath as string ) as boolean
+function hGetFileCountViaFileOpen() as integer
+function hNameGen_append( iDecChar as long ) as string
+function hNameGen_lead( iDecChar as long ) as string
+function hGetRelPath( cStartDir, cFileName as String ) as string
function hFindFileObjectViaFileOpen( cName as string ) as integer
-function hFindFirstDialog() as boolean
-function hFindTemplate( sTemplateName as string ) as integer
-function hFindUNOTemplateInFilterList( sFilter as string ) as integer
-function hFinishWizard( iMode as integer ) as boolean
-function hGetAccel( cCommand as string ) as string
-function hGetBasicWorkFile( cMajorID as string ) as string
-function hGetControlName( iControl as integer ) as string
function hGetControlParams( cParam as string ) as integer
-function hGetControlPosXE( iControl as integer ) as integer
-function hGetControlPosXM( iControl as integer ) as integer
+function hGetControlName( iControl as integer ) as string
+function hInsertControl( iControl as integer ) as string
+function hDrawControlOnDialog( iControl as integer ) as string
+function hDrawControl( xPos as integer, yPos as integer, xEnd as integer, yEnd as integer ) as boolean
function hGetControlPosXO( iControl as integer ) as integer
+function hGetControlPosYO( iControl as integer ) as integer
+function hGetControlPosXE( iControl as integer ) as integer
function hGetControlPosYE( iControl as integer ) as integer
+function hGetControlPosXM( iControl as integer ) as integer
function hGetControlPosYM( iControl as integer ) as integer
-function hGetControlPosYO( iControl as integer ) as integer
-function hGetDataPairAsString( sKey as string, sVal as long ) as string
-function hGetDirTreeLevel( cFullPath as string ) as integer
-function hGetDocTypeAPI() as string
-function hGetFileCountViaFileOpen() as integer
-function hGetFileFolderName( iFolder as integer ) as string
-function hGetFileLocationAPI() as string
-function hGetFileSizeAsLong( cFileName as string ) as long
-function hGetFilter680FromUNO( bTemplate as boolean ) as string
+function hSelectControl( iControl as integer ) as boolean
+function hOpenHelp() as boolean
+function hCloseHelp() as boolean
+function hSelectHelpTab( cTab as string ) as boolean
+function hUseBookmarksContextMenu( cAction as string ) as boolean
+function hHelpGetAboutItemCount() as integer
+function hHelpGetSearchIndexItemCount() as integer
function hGetHelpContentHeader( iLength as integer ) as string
function hGetI18nData( cSection as string, cLanguage as string ) as string
-function hGetIndexForKeyAsInt( lsList() as string, sKey as string ) as integer
-function hGetInputPath( byval sBasePath as string, byval sFile as string ) as string
-function hGetKeyForPairAsString( cLine as string ) as string
-function hGetKeyForValueAsInt( lsList() as string, sVal as string ) as integer
-function hGetKeyForValueAsString( lsList() as string, sVal as string ) as string
-function hGetListItems( oControl as object, aList() as string ) as integer
-function hGetNodeCount( oControl as object ) as integer
-function hGetNodeName( oControl as object , iNode as integer ) as string
-function hGetPrinterPosition( cName as string, bWarn as boolean ) as integer
-function hGetPrivateFtpServer( _proxy as string, _port as string ) as boolean
-function hGetPrivateHttpServer( _proxy as string, _port as string ) as boolean
-function hGetPrivateInputFile( bVerbose as boolean ) as string
-function hGetPrivateInputPath( bVerbose as boolean ) as string
-function hGetPrivateSocksServer( _proxy as string, _port as string ) as boolean
-function hGetRefFilePath( cCategory as string, location as string) as string
-function hGetRelPath( cStartDir, cFileName as String ) as string
-function hGetSpadminPath() as string
-function hGetStringFromStaticTextField( oControl as object ) as string
-function hGetTabNameFromOrganizer() as string
function hGetTwoDigitLangCode( iLanguage as integer ) as string
-function hGetValueForKeyAsInt( lsList() as string, sKey as string ) as integer
-function hGetValueForKeyAsLong( lsList() as string, sKey as string ) as long
-function hGetValueForPairAsLong( cLine as string ) as long
-function hGetValueForPairAsString( cLine as string ) as string
-function hGetVisibleNodeNames( oControl as object , lsList() as string ) as integer
-function hGetWizardParams( cType as string, cParam as string ) as integer
-function hGetWorkFile( cFileName as string ) as string
-function hGetWorkPath() as string
-function hHandleActivesOnLoad( iTries as integer , iAdd as integer ) as boolean
-function hHandleInitialDialogs() as integer
-function hHandleSaveError() as integer
-function hHelpGetAboutItemCount() as integer
-function hHelpGetSearchIndexItemCount() as integer
-function hHideModule() as boolean
-function hIdentifyWriterDoc( cString as string, bWarn as boolean ) as boolean
-function hIDESelectTabByIndex( iIndex as integer ) as string
-function hInitBackingMode() as boolean
-function hInitBasicIde( cModule as string ) as boolean
-function hInitFormControls( cModule as string ) as boolean
+function hTestLocale() as boolean
function hInitSingleDoc() as boolean
+function hInitBackingMode() as boolean
function hInitWriteDocIdentifier( cString as string ) as boolean
-function hInsertControl( iControl as integer ) as string
-function hInsertMacroFromFile( cMacroId ) as integer
-function hInsertMacro( _id as integer ) as boolean
-function hIsEditWindowEmpty() as boolean
-function hIsMacroEditButtonEnabled() as boolean
-function hIsMacroNewButtonEnabled() as boolean
-function hIsObjectAFolder( iObjects as integer ) as boolean
-function hIsTemplateDialogClosed() as boolean
-function hListAppendList( aBaseList() as string, aListToAppend() as string ) as integer
-function hListAppend( sNewString as string, aTargetList() as string ) as integer
-function hListCompare( aListOne() as String, aListTwo() as String ) as boolean
-function hListDelete( aList() as string, iItemToDelete as integer ) as boolean
-function hListFileGetSize( sFileIn as string ) as integer
-function hListPrependString( aList() as string, cString as string ) as boolean
-function hListTestLowerBoundary( aList() as string ) as boolean
-function hListTestUpperBoundary( aList() as string ) as boolean
-function hLoadFileExpectFailure( fpath as string ) as boolean
-function hLoadFileExpectSuccess( fpath as string ) as boolean
-function hMacroOrganizerRunMacro( cMacroName as string ) as integer
-function hManageComparisionList( sFileIn as string, sFileOut as string, sListOut() as string ) as integer
-function hMaximizeDocument() as boolean
-function hNameBasicModule( cName as string ) as boolean
-function hNameGen_append( iDecChar as long ) as string
-function hNameGen_lead( iDecChar as long ) as string
-function hNewDialog() as boolean
-function hNewModule() as boolean
-function hNumericDocType( doctype as integer ) as string
-function hOpenBasicIDE() as boolean
-function hOpenBasicObjectOrganizer( iTabPage as integer ) as boolean
-function hOpenBasicOrganizerFromDoc() as boolean
-function hOpenDigitalSignaturesDialog() as boolean
-function hOpenHelp() as boolean
+function hBatchLoadJavaFiles( aFileList() , cIdent as string )
+function hFindCopyRemoveJavaLogs( cSourcePath as string ) as boolean
+sub GetPathList ( ls1 () as String, ls2 () as String, ls3 () as String )
+sub CreatePathList
+function URLGraphicCheck ( bRelativ as Boolean, sFile as String )
+sub DialogTestForViewOptions
+sub DialogTextForViewOptions_move
+sub MouseTestForViewOptions
+sub Make3D
+sub hResetAutosave()
+sub DeleteColor( cColorName as String )
+sub modifyColorRGB_PGUP( iColor as Integer )
+sub createNewColor( aColor() as String )
+sub getColorRGB( aColor() as String )
+sub compareTwoColorsRGB( aColor() as String )
+sub ModifyColorRGB( aColor() as String )
function hOpenPropertyBrowser() as boolean
-function hOpenRunMacroDialog() as boolean
-function hOpenScriptOrganizer( iDialog as integer ) as boolean
-function hOpenSpadmin() as boolean
-function hOpenWizardWithMenu( cType as string ) as integer
-function hPBGetControlName( cControl as string ) as boolean
+function hClosePropertyBrowser() as boolean
function hPBSetControlName( cControl as string ) as boolean
-function hRemoveLineBreaks( cString as string ) as string
-function hRemoveTrustedPath( cPath as string ) as boolean
+function hPBGetControlName( cControl as string ) as boolean
+function hCheckPropertyPresence ( cSetting as string , iPos as integer ) as boolean
+function hSetPBTabPage( iPage as integer ) as boolean
+function hSetLabelName( sLabelName as string ) as boolean
+function hWaitForObject( oControl as object, iTime as integer ) as integer
+function hGetPrivateHttpServer( _proxy as string, _port as string ) as boolean
+function hGetPrivateFtpServer( _proxy as string, _port as string ) as boolean
+function hGetPrivateSocksServer( _proxy as string, _port as string ) as boolean
+function hGetPrivateInputPath( bVerbose as boolean ) as string
+function hGetPrivateInputFile( bVerbose as boolean ) as string
+function hCreateScriptingObject( cName as string ) as boolean
function hRenameScriptingObject( cName as string ) as boolean
-function hRenameTab( cTabName as string ) as integer
-function hReOpenBasicDialog() as boolean
-function hResetStandardBar() as boolean
-function hSaveFileExpectFailure( fpath as string , errortype as integer ) as boolean
-function hSaveFileExpectSuccess( fpath as string , bReplace as boolean ) as boolean
-function hSaveLoadDelSuccess( cFile as string ) as integer
-function hSecurityEnterPasswordOnLoad( cPassword as string, bValid as boolean ) as boolean
-function hSecurityEnterPasswordOnSave( cPassword as string ) as boolean
-function hSelectBasicObjectOrganizerTab( iTabPage as integer ) as boolean
-function hSelectCategory( cCategory as string ) as boolean
-function hSelectControl( iControl as integer ) as boolean
-function hSelectDialogPane() as boolean
-function hSelectDocumentObject( iTitle as integer , iMode as integer ) as string
-function hSelectFileFolder( iFolder as integer , bVerbose as boolean ) as integer
-function hSelectHelpTab( cTab as string ) as boolean
-function hSelectNextNode( oControl as object ) as integer
-function hSelectNodeByName( oControl as object , _name as string ) as integer
-function hSelectNode( oControl as object , _id as integer ) as string
-function hSelectTheLastModule( bEditEnabled as Boolean ) as boolean
-function hSelectTheLastNode( oControl as object ) as integer
-function hSelectTopNode( oControl as object ) as boolean
+function hDeleteScript( cName as string , bSuccess as boolean ) as boolean
+function hOpenScriptOrganizer( iDialog as integer ) as boolean
+function hCloseScriptOrganizer() as boolean
+function hOpenRunMacroDialog() as boolean
function hSelectXMLSecTab( cTab as string ) as boolean
-function hSetControlValue( oObject as object, cValue as string ) as integer
-function hSetLabelName( sLabelName as string ) as boolean
-function hSetPasswordRecommendation( bEnable as boolean ) as boolean
-function hSetPBTabPage( iPage as integer ) as boolean
-function hSetProxies( HTTP_Server as string, HTTP_Port as string, FTP_Server as string, FTP_Port as string, NoProxyFor as string ) as integer
-function hSetTemplateSavePath( cFile as string ) as integer
-function hShowMacroControls() as boolean
+function hGetPrinterPosition( cName as string, bWarn as boolean ) as integer
+function hDelPrinter( cPrinterName as string ) as integer
+function hGetSpadminPath() as string
function hShutdownOffice() as integer
+function hOpenSpadmin() as boolean
+function hWaitForSpAdmin() as boolean
+function hCreateFaxDevice( cName as string ) as boolean
+function hDocumentInfoSelectTab( cTabPage as string ) as boolean
+function hFindTemplate( sTemplateName as string ) as integer
+function hGetRefFilePath( cCategory as string, location as string) as string
+function hSelectCategory( cCategory as string ) as boolean
+function hSelectFileFolder( iFolder as integer , bVerbose as boolean ) as integer
+function hGetFileFolderName( iFolder as integer ) as string
+function hSelectDocumentObject( iTitle as integer , iMode as integer ) as string
+function hIsTemplateDialogClosed() as boolean
+function hIsObjectAFolder( iObjects as integer ) as boolean
+function hDeleteUserTemplates() as integer
+function hAccessStandardBar() as boolean
+function hResetStandardBar() as boolean
function hStandardbarItemGetCount() as integer
+function hToggleToolbarItem( iMenuPos as integer )
function hStandardbarLoadUrl() as boolean
function hStandardbarNewDialog()
function hStandardbarSaveAs()
-function hSwitchMacroSecurityTab( cTab as string )
-function hTestLocale() as boolean
-function hTestMacro( _id as integer ) as integer
-function hToggleToolbarItem( iMenuPos as integer )
-function hToolsCustomizeAddNewMenu( cName as string, bMode as boolean ) as boolean
-function hToolsCustomizeClose( iMode as integer ) as boolean
-function hToolsCustomizeOpen() as boolean
-function hToolsCustomizeSelectTab( cTab as string ) as boolean
-function hUseBookmarksContextMenu( cAction as string ) as boolean
-function hUseImpressAutopilot( bEnable as boolean ) as boolean
-function hVerifyNodeName( oControl as object , cName as string ) as boolean
-function hWaitForObject( oControl as object, iTime as integer ) as integer
-function hWaitForSpAdmin() as boolean
-function hWaitForTreelist( oTreeList as object, cContext as string, iItemCount as integer ) as boolean
+function hSetProxies( HTTP_Server as string, HTTP_Port as string, FTP_Server as string, FTP_Port as string, NoProxyFor as string ) as integer
+function hMaximizeDocument() as boolean
+function hOpenWizardWithMenu( cType as string ) as integer
+function hFinishWizard( iMode as integer ) as boolean
+function hGetWizardParams( cType as string, cParam as string ) as integer
function hWaitForWizard() as integer
-function hWaitWhileLoading() as boolean
-function initlistdebug( cComment as string ) as integer
-function keycompare( found as string, expected as string, sKey as string, optional cBugID as string) as boolean
-function listconvertpath( lsList() as string ) as integer
-function listdebug( lsList() as string , cComment as string ) as integer
-function listInsertSection( lsList() as string, cSection as string ) as integer
-function listmoveitem( source() as string, target() as string, itemid as integer ) as integer
-function setCheckBox( _file as string , sKey as string , control as object , optional bverbose as boolean ) as boolean
-function setComboBox( _file as string , sKey as string , control as object , optional bverbose as boolean ) as integer
-function setEntryField( _file as string , sKey as string , control as object , optional bverbose as boolean ) as string
-function setListBox( _file as string , sKey as string , control as object , optional bverbose as boolean ) as integer
+function hSetTemplateSavePath( cFile as string ) as integer
+function hHandleSaveError() as integer
+function hClickNextButton() as boolean
+
diff --git a/testautomation/global/tools/includes/required/t_files.inc b/testautomation/global/tools/includes/required/t_files.inc
index 559b88a84..36b9f5aae 100755
--- a/testautomation/global/tools/includes/required/t_files.inc
+++ b/testautomation/global/tools/includes/required/t_files.inc
@@ -37,7 +37,7 @@
'*
'\******************************************************************************
-private const C_INFO = TRUE ' Set this to TRUE to increase verbosity of some functions
+private const C_INFO = FALSE ' Set this to TRUE to increase verbosity of some functions
function hGrafikEinfuegen ( Grafik$ ) as Boolean
'/// hGrafikEinfuegen hGraphicInsert
diff --git a/testautomation/global/tools/includes/required/t_menu.inc b/testautomation/global/tools/includes/required/t_menu.inc
index 5d46d77e9..f545d663a 100755
--- a/testautomation/global/tools/includes/required/t_menu.inc
+++ b/testautomation/global/tools/includes/required/t_menu.inc
@@ -1,7 +1,7 @@
'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
@@ -29,175 +29,175 @@
'* <http://www.openoffice.org/license.html>
'* for a copy of the LGPLv3 License.
'*
-'/************************************************************************
+'/******************************************************************************
'*
'* Owner : thorsten.bosbach@sun.com
'*
'* short description : wrappers for accessing menues (context-, bar-, button- menues)
'*
-'***********************************************************************************
-' #1 hMenuItemGetCount
-' #1 hMenuSelectNr
-' #1 hMenuItemCheck
-' #1 hMenuItemUnCheck
-' #1 hMenuFindSelect
-' #1 hMenuItemIsChecked
-' #1 hMenuItemIsEnabled
-' #1 hMenuItemGetText
-' #1 hMenuItemGetTextMitTilde
-' #1 hMenuGetTextList
-' #1 hMenuGetTextListMitTilden
-' #1 hMenuGetListOhneTilde
-' #1 hMenuGetTildenList
-' #1 hhEntferneTilde
-' #1 hMenuGetItemCommand
-' #1 hWindowGetCount
-' #1 hWindowGetIndex
-' #1 hWindowGetText
-' #1 hWindowSelect
-' #1 hUseMenu
-' #1 hMenuClose
-' #1 hOeffneNeuImMenue
-' #1 hOeffneEinstellungenImMenue
-' #1 hOeffneImMenue
-' #1 hGetWindowCaption
-' #1 fSplitWindowTitle
-' #1 hMenuGetItemID
-' #1 hOpenContextMenu
-'\*****************************************************************
+'\******************************************************************************
function hMenuItemGetCount as Integer
-'/// OUTPUT: number of entries in the activated menu (without seperators) ///'
-'///+ menu left open ///'
- Dim i, j, Ende, nID as Integer
- Sleep 2
-
- j=0
- for i=1 to MenuGetItemCount
- if NOT MenuIsSeperator ( i ) then j=j+1
- next i
- hMenuItemGetCount = j
+
+ '/// OUTPUT: number of entries in the activated menu (without seperators) ///'
+ '///+ menu left open ///'
+ dim iCurrentMenuItem as integer
+ dim iValidMenuItems as integer
+
+ sleep( 2 )
+
+ iValidMenuItems = 0
+ for iCurrentMenuItem = 1 to MenuGetItemCount
+ if ( NOT MenuIsSeperator ( iCurrentMenuItem ) ) then
+ iValidMenuItems = iValidMenuItems + 1
+ endif
+ next iCurrentMenuItem
+ hMenuItemGetCount = iValidMenuItems
+
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hMenuSelectNr ( EintragsNr as Integer ) as String
-'/// Selects the given nr. of <b>enabled</b> menu entry.
-'/// <u>Note</u>: If there are disabled menu items are included the routine ignores them!
-'///INPUT : number of entry from the top (>=1) OR
-'///INPUT : number of entry from the bottom (<=-1)
-'///INPUT : 0 to close menu
-'///+ OUTPUT: text of the entry
- Dim i, j, RealEnd, Ende as Integer
- Dim nID as long
- Sleep 2
-
- Ende = EintragsNr
- RealEnd = MenuGetItemCount
- If (Ende > 0) then
- if Ende > RealEnd then
- Warnlog "hMenuSelectNr canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- else
- if ((RealEnd + Ende) < 0) then
- Warnlog "hMenuSelectNr canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=1
- for i=-1 to Ende step -1
- if MenuIsSeperator (RealEnd +i+j) then dec(j)
- next i
- j = j + RealEnd
- endif
- if EintragsNr = 0 then
+
+ '/// Selects the given nr. of <b>enabled</b> menu entry.
+ '/// <u>Note</u>: If there are disabled menu items are included the routine ignores them!
+ '///INPUT : number of entry from the top (>=1) OR
+ '///INPUT : number of entry from the bottom (<=-1)
+ '///INPUT : 0 to close menu
+ '///+ OUTPUT: text of the entry
+
+ Dim i, j, RealEnd, Ende as Integer
+ Dim nID as long
+
+ sleep( 2 )
+
+ Ende = EintragsNr
+ RealEnd = MenuGetItemCount
+ If (Ende > 0) then
+ if Ende > RealEnd then
+ Warnlog "hMenuSelectNr canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=0
+ for i=1 to Ende
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ else
+ if ((RealEnd + Ende) < 0) then
+ Warnlog "hMenuSelectNr canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=1
+ for i=-1 to Ende step -1
+ if MenuIsSeperator (RealEnd +i+j) then
+ j = j -1
+ endif
+ next i
+ j = j + RealEnd
+ endif
+ if EintragsNr = 0 then
hMenuClose
exit function
- endif
- nID = MenuGetItemID ( EintragsNr+j )
- hMenuSelectNr = MenuGetItemText ( nID )
- MenuSelect ( nID )
+ endif
+ nID = MenuGetItemID ( EintragsNr+j )
+ hMenuSelectNr = MenuGetItemText ( nID )
+ MenuSelect ( nID )
+
end function
+'*******************************************************************************
+
function hMenuItemCheck ( EintragsNr as Integer ) as String
-'/// check the menu item (if it is checked, it stays checked) ///'
-'///+ INPUT : number of entry from the top (>=1)///'
-'///+ OUTPUT: text of the entry ///'
- Dim i as Integer, j as Integer, RealEnd as Integer, Ende as Integer, nID as Integer
-
- Ende = EintragsNr
- RealEnd = hMenuItemGetCount
- if Ende > RealEnd then
- Warnlog "hMenuItemCheck canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- nID = MenuGetItemID ( EintragsNr+j )
- hMenuItemCheck = MenuGetItemText ( nID )
- if NOT MenuIsItemChecked ( nID ) then
- MenuSelect ( nID )
- else
- hMenuClose
- end if
+
+ '/// check the menu item (if it is checked, it stays checked) ///'
+ '///+ INPUT : number of entry from the top (>=1)///'
+ '///+ OUTPUT: text of the entry ///'
+ Dim i as Integer, j as Integer, RealEnd as Integer, Ende as Integer, nID as Integer
+
+ Ende = EintragsNr
+ RealEnd = hMenuItemGetCount
+
+ if Ende > RealEnd then
+ Warnlog "hMenuItemCheck canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=0
+ for i=1 to Ende
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ nID = MenuGetItemID ( EintragsNr+j )
+ hMenuItemCheck = MenuGetItemText ( nID )
+ if NOT MenuIsItemChecked ( nID ) then
+ MenuSelect ( nID )
+ else
+ hMenuClose()
+ endif
+
end function
+'*******************************************************************************
+
function hMenuItemUnCheck ( EintragsNr as Integer ) as String
-'/// UNcheck the menu item (if it is UNchecked, it stays UNchecked) ///'
-'///+ INPUT : number of entry from the top (>=1)///'
-'///+ OUTPUT: text of the entry ///'
- Dim i, j, RealEnd, Ende, nID as Integer
-
- Ende = EintragsNr
- RealEnd = hMenuItemGetCount
- if Ende > RealEnd then
- Warnlog "hMenuItemUnCheck canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- nID = MenuGetItemID ( EintragsNr+j )
- hMenuItemUnCheck = MenuGetItemText ( nID )
- if MenuIsItemChecked ( nID ) then
- MenuSelect ( nID )
- else
- hMenuClose
- end if
+
+ '/// UNcheck the menu item (if it is UNchecked, it stays UNchecked) ///'
+ '///+ INPUT : number of entry from the top (>=1)///'
+ '///+ OUTPUT: text of the entry ///'
+ Dim i, j, RealEnd, Ende, nID as Integer
+
+ Ende = EintragsNr
+ RealEnd = hMenuItemGetCount
+ if Ende > RealEnd then
+ Warnlog "hMenuItemUnCheck canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=0
+ for i=1 to Ende
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ nID = MenuGetItemID ( EintragsNr+j )
+ hMenuItemUnCheck = MenuGetItemText ( nID )
+ if MenuIsItemChecked ( nID ) then
+ MenuSelect ( nID )
+ else
+ hMenuClose()
+ endif
+
end function
-'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+'*******************************************************************************
function hMenuFindSelect(MenuID as variant, SelectSlot as Boolean, ExpectedNr as integer, optional VerboseWrongPosition as Boolean) as Boolean
-'/// Find specified MenuID in Menu, check if its found on the expected place, ///'
-'/// if not - report the correct slot, and if specified to do so - Select the correct slot. ///'
-'///+ INPUT: MenuID: the string-name of the menu-entry we are lookin for. ///'
-'///+ INPUT: TRUE, if the slot should be called, ///'
-'///+ FALSE, if the slot shouldn't be called. ///'
-'///+ INPUT: Optional: TRUE, if errors should be reported. ///'
-'///+ FALSE, silent mode for errors. ///'
-'///+ INPUT: Optional: The Expected Number of entry from the top (>=1) ///'
-'///+ OUTPUT: If not found at the expected place - the correct Entry-number is reported ///'
- Dim i as Integer
- Dim RealId as Integer
- Dim RealPosition as Integer
- Dim MenuIDAsNumber as integer
- Dim MenuIDAsString as string
- Dim RealEnd as Integer
- Dim nID as string
- Dim found as string
- Dim StringType as Boolean
+
+ '/// Find specified MenuID in Menu, check if its found on the expected place, ///'
+ '/// if not - report the correct slot, and if specified to do so - Select the correct slot. ///'
+ '///+ INPUT: MenuID: the string-name of the menu-entry we are lookin for. ///'
+ '///+ INPUT: TRUE, if the slot should be called, ///'
+ '///+ FALSE, if the slot shouldn't be called. ///'
+ '///+ INPUT: Optional: TRUE, if errors should be reported. ///'
+ '///+ FALSE, silent mode for errors. ///'
+ '///+ INPUT: Optional: The Expected Number of entry from the top (>=1) ///'
+ '///+ OUTPUT: If not found at the expected place - the correct Entry-number is reported ///'
+
+ Dim i as Integer
+ Dim RealId as Integer
+ Dim RealPosition as Integer
+ Dim MenuIDAsNumber as integer
+ Dim MenuIDAsString as string
+ Dim RealEnd as Integer
+ Dim nID as string
+ Dim found as string
+ Dim StringType as Boolean
'/// find out if we are going to search for an ID, or a string (.uno:) ///'
if IsNumeric(MenuID) then
@@ -206,12 +206,12 @@ function hMenuFindSelect(MenuID as variant, SelectSlot as Boolean, ExpectedNr as
else
MenuIDAsString = MenuID
StringType = TRUE
- end if
+ endif
RealEnd = MenuGetItemCount
if ExpectedNr > RealEnd then
Warnlog "Entry number "+ ExpectedNr +" is higher than the number of entries (" + RealEnd + ") in this menu! "
- end if
+ endif
if StringType = FALSE then 'Search for the number.
@@ -219,7 +219,7 @@ function hMenuFindSelect(MenuID as variant, SelectSlot as Boolean, ExpectedNr as
if nID <> MenuID then
if VerboseWrongPosition = TRUE then
warnlog " the questioned ID (" + MenuID + ") were not found on position " + ExpectedNr
- end if
+ endif
Found = FALSE
for i=1 to RealEnd
nID = MenuGetItemID (i)
@@ -230,15 +230,15 @@ function hMenuFindSelect(MenuID as variant, SelectSlot as Boolean, ExpectedNr as
RealPosition = i
if VerboseWrongPosition = TRUE then
warnlog "The real Position (Separators included) was: " + i
- end if
+ endif
i = RealEnd
- end if
+ endif
next i
else
Found = TRUE
RealPosition = ExpectedNr
RealId = MenuGetItemID (ExpectedNr)
- end if
+ endif
if Found = TRUE then
if SelectSlot then
@@ -248,588 +248,458 @@ function hMenuFindSelect(MenuID as variant, SelectSlot as Boolean, ExpectedNr as
printlog "the slot was found, but the tester had choosen NOT to open the slot"
hMenuFindSelect = TRUE
hMenuClose
- end if
+ endif
else
if VerboseWrongPosition = TRUE then
warnlog "The slot was NOT found. Has either been removed, or it's a bug."
- end if
+ endif
hMenuFindSelect = FALSE
hMenuClose
- end if
-
- else 'StringType = TRUE : Seach for the .uno; -name.
- nID = lCase(MenuGetItemCommand (MenuGetItemID (ExpectedNr)))
-
- if nID <> lCase(MenuID) then
- if VerboseWrongPosition = TRUE then
- warnlog " the questioned ID (" + MenuID + ") were not found on position " + ExpectedNr
- end if
- Found = FALSE
- for i=1 to RealEnd
- nID = MenuGetItemCommand (MenuGetItemID (i))
- printlog "For the position '" + i + "', the ItemCommand was: " + nID + " and the ID was: " + MenuGetItemID (i) + "."
- if nID = MenuID then
- Found = TRUE
- RealID = MenuGetItemID (i)
- RealPosition = i
- if VerboseWrongPosition = TRUE then
- warnlog "The real Position (Separators included) was: " + i
- end if
- i = RealEnd
- end if
- next i
- else
- Found = TRUE
- RealPosition = ExpectedNr
- RealId = MenuGetItemID (ExpectedNr)
- end if
- if Found = TRUE then
- if SelectSlot then
- MenuSelect (RealID)
- hMenuFindSelect = TRUE
- else
- printlog "the slot was found, but the tester had choosen NOT to open the slot"
- hMenuFindSelect = TRUE
- hMenuClose
- end if
- else
- if VerboseWrongPosition = TRUE then
- warnlog "The slot was NOT found. Has either been removed, or it's a bug."
- end if
- hMenuFindSelect = FALSE
- hMenuClose
- end if
- end if 'StringType = TRUE
- wait 200 'Wait 0,2 seconds in case we just have called a Submenu.
+ endif
+
+ else 'StringType = TRUE : Seach for the .uno; -name.
+ nID = lCase(MenuGetItemCommand (MenuGetItemID (ExpectedNr)))
+
+ if nID <> lCase(MenuID) then
+ if VerboseWrongPosition = TRUE then
+ warnlog " the questioned ID (" + MenuID + ") were not found on position " + ExpectedNr
+ endif
+ Found = FALSE
+ for i=1 to RealEnd
+ nID = MenuGetItemCommand (MenuGetItemID (i))
+ printlog "For the position '" + i + "', the ItemCommand was: " + nID + " and the ID was: " + MenuGetItemID (i) + "."
+ if nID = MenuID then
+ Found = TRUE
+ RealID = MenuGetItemID (i)
+ RealPosition = i
+ if VerboseWrongPosition = TRUE then
+ warnlog "The real Position (Separators included) was: " + i
+ endif
+ i = RealEnd
+ endif
+ next i
+ else
+ Found = TRUE
+ RealPosition = ExpectedNr
+ RealId = MenuGetItemID (ExpectedNr)
+ endif
+ if Found = TRUE then
+ if SelectSlot then
+ MenuSelect (RealID)
+ hMenuFindSelect = TRUE
+ else
+ printlog "the slot was found, but the tester had choosen NOT to open the slot"
+ hMenuFindSelect = TRUE
+ hMenuClose()
+ endif
+ else
+ if VerboseWrongPosition = TRUE then
+ warnlog "The slot was NOT found. Has either been removed, or it's a bug."
+ endif
+ hMenuFindSelect = FALSE
+ hMenuClose()
+ endif
+ endif 'StringType = TRUE
+ wait 200 'Wait 0,2 seconds in case we just have called a Submenu.
+
end function
-'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+'*******************************************************************************
function hMenuItemIsChecked ( EintragsNr as Integer ) as Boolean
-'/// is the the menu item checked ? ///'
-'///+ INPUT : number of entry from the top (>=1)///'
-'///+ OUTPUT: True = yes!, False = no! ///'
- Dim i, j, Ende, RealEnd, nID as Integer
-
- Ende = EintragsNr
- RealEnd = hMenuItemGetCount
- if Ende > RealEnd then
- Warnlog "hMenuItemIsChecked canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- nID = MenuGetItemID ( EintragsNr + j )
- hMenuItemIsChecked = MenuIsItemChecked ( nID )
+
+ '/// is the the menu item checked ? ///'
+ '///+ INPUT : number of entry from the top (>=1)///'
+ '///+ OUTPUT: True = yes!, False = no! ///'
+
+ Dim i, j, Ende, RealEnd, nID as Integer
+
+ Ende = EintragsNr
+ RealEnd = hMenuItemGetCount
+ if Ende > RealEnd then
+ Warnlog "hMenuItemIsChecked canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=0
+ for i=1 to Ende
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ nID = MenuGetItemID ( EintragsNr + j )
+ hMenuItemIsChecked = MenuIsItemChecked ( nID )
+
end function
+'*******************************************************************************
+
function hMenuItemIsEnabled ( EintragsNr as Integer ) as Boolean
-'/// is the the menu item enabled (not greyed out) ? ///'
-'///+ INPUT : number of entry from the top (>=1)///'
-'///+ OUTPUT: True = yes!, False = no! ///'
-'///+ menu left open ///'
- Dim i, j, Ende, RealEnd, nID as Integer
-
- Ende = EintragsNr
- RealEnd = MenuGetItemCount
- if Ende > RealEnd then
- Warnlog "hMenuItemIsEnabled canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- nID = MenuGetItemID ( EintragsNr + j )
- hMenuItemIsEnabled = MenuIsItemEnabled ( nID )
-end function
-function hMenuItemGetText ( EintragsNr as Integer ) as String
-'///+ INPUT : number of entry from the top (>=1)///'
-'///+ OUTPUT: text of item without tilde ///'
-'///+ menu left open ///'
- Dim i, j, RealEnd, Ende, nID as Integer
-
- Ende = EintragsNr
- RealEnd = MenuGetItemCount
- if Ende > RealEnd then
- Warnlog "hMenuItemGetText canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- nID = MenuGetItemID ( EintragsNr + j )
- hMenuItemGetText = hhEntferneTilde ( MenuGetItemText ( nID ) )
-end function
+ '/// is the the menu item enabled (not greyed out) ? ///'
+ '///+ INPUT : number of entry from the top (>=1)///'
+ '///+ OUTPUT: True = yes!, False = no! ///'
+ '///+ menu left open ///'
-function hMenuItemGetTextMitTilde ( EintragsNr as Integer ) as String
-'/// INPUT : number of entry from the top (>=1)///'
-'///+ OUTPUT: text of item with tilde (which indicates the shortcurt of the entry)///'
-'///+ menu left open ///'
- Dim i, j, RealEnd, Ende, nID as Integer
-
- Ende = EintragsNr
- RealEnd = MenuGetItemCount
- if Ende > RealEnd then
- Warnlog "hMenuItemGetTextMitTilde canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
- hMenuClose
- exit function
- end if
- j=0
- for i=1 to Ende
- if MenuIsSeperator ( i+j ) then j = j+1
- next i
- nID = MenuGetItemID ( EintragsNr + j )
- hMenuItemGetTextMitTilde = MenuGetItemText ( nID )
-end function
+ Dim i, j, Ende, RealEnd, nID as Integer
-function hMenuGetTextList ( lsEintragsliste() as String ) as Integer
-'/// INPUT : a 'list-variable' aka string array; ///'
-'///+ OUTPUT: number of entries in the menue/list; the list-variable contains now the strings of the menu (withOUT tildes) ///'
-'///+ menu left open ///'
- Dim i, j, nID as Integer
- Dim Eintrag as String
-
- lsEintragsListe(0) = 0
- j=0
- for i=1 to MenuGetItemCount
- if NOT MenuIsSeperator ( i ) then
- nID = MenuGetItemID ( i )
- Eintrag = hhEntferneTilde ( MenuGetItemText ( nID ) )
- ListAppend ( lsEintragsListe(), Eintrag )
- j=j+1
- end if
- next i
- hMenuGetTextList = j
-end function
+ Ende = EintragsNr
+ RealEnd = MenuGetItemCount
+ if Ende > RealEnd then
+ Warnlog "hMenuItemIsEnabled canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=0
+ for i=1 to Ende
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ nID = MenuGetItemID ( EintragsNr + j )
+ hMenuItemIsEnabled = MenuIsItemEnabled ( nID )
-function hMenuGetTextListMitTilden ( lsEintragsliste() as String ) as Integer
-'/// INPUT : a 'list-variable' aka string array; ///'
-'///+ OUTPUT: number of entries in the menue/list; the list-variable contains now the strings of the menu (with tildes) ///'
-'///+ menu left open ///'
- Dim i, j, nID as Integer
- Dim Eintrag as String
-
- lsEintragsListe(0) = 0
- j=0
- for i=1 to MenuGetItemCount
- if NOT MenuIsSeperator ( i ) then
- nID = MenuGetItemID ( i )
- Eintrag = MenuGetItemText ( nID )
- ListAppend ( lsEintragsListe(), Eintrag )
- j=j+1
- end if
- next i
- hMenuGetTextListMitTilden = j
end function
-function hMenuGetListOhneTilde ( lsEintragsliste() as String ) as Integer
-'/// put the entries of the menues in a list that don't have a tilde -> BUG ///'
-'///+ INPUT : a 'list-variable' aka string array; ///'
-'///+ OUTPUT: number of entries without a tilde; the list-variable contains now the strings of the menu without tildes ///'
-'///+ menu left open ///'
- Dim i, j, nID as Integer
- Dim Eintrag as String
-
- lsEintragsListe(0) = 0
- j=0
- for i=1 to MenuGetItemCount
- if NOT MenuIsSeperator ( i ) then
- nID = MenuGetItemID ( i )
- Eintrag = MenuGetItemText ( nID )
- if Eintrag = ( hhEntferneTilde ( Eintrag ) ) then
- ListAppend ( lsEintragsListe(), Eintrag )
- j=j+1
- end if
- end if
- next i
- hMenuGetListOhneTilde = j
-end function
+'*******************************************************************************
+
+function hMenuItemGetText ( EintragsNr as Integer ) as String
+
+ '///+ INPUT : number of entry from the top (>=1)///'
+ '///+ OUTPUT: text of item without tilde ///'
+ '///+ menu left open ///'
+
+ Dim i, j, RealEnd, Ende, nID as Integer
+
+ Ende = EintragsNr
+ RealEnd = MenuGetItemCount
+ if Ende > RealEnd then
+ Warnlog "hMenuItemGetText canceled: Entry number "+ Ende +" does not exists, because there are only " + RealEnd + " entries! "
+ hMenuClose
+ exit function
+ endif
+ j=0
+ for i=1 to Ende
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ nID = MenuGetItemID ( EintragsNr + j )
+ hMenuItemGetText = hhEntferneTilde ( MenuGetItemText ( nID ) )
-function hMenuGetTildenList ( lsEintragsliste() as String ) as Integer
-'/// put the entries of the menues in a list that HAVE a tilde ///'
-'///+ INPUT : a 'list-variable' aka string array; ///'
-'///+ OUTPUT: number of entries a tilde; the list-variable contains now the strings of the menu with tildes ///'
-'///+ menu left open ///'
- Dim i, j, nID, Stelle as Integer
- Dim Eintrag as String
-
- lsEintragsListe(0) = 0
- j=0
- for i=1 to MenuGetItemCount
- if NOT MenuIsSeperator ( i ) then
- nID = MenuGetItemID ( i )
- Eintrag = MenuGetItemText ( nID ) + " - "
- Stelle = Instr ( 1, Eintrag, "~", 1 )
- if Stelle <> 0 then
- Eintrag = Eintrag + Mid ( Eintrag, Stelle, 2 )
- end if
- ListAppend ( lsEintragsListe(), Eintrag )
- j=j+1
- end if
- next i
- hMenuGetTildenList = j
end function
+'*******************************************************************************
sub hMenuClose
-'/// close menue ///'
-'///+ after a hMenuClose you have to execute Kontext.UseMenu again
-'///+ if you want to open any other menu.
+
+ '/// close menue ///'
+ '///+ after a hMenuClose you have to execute Kontext.UseMenu again
+ '///+ if you want to open any other menu.
MenuSelect ( 0 )
+
end sub
-' ***************************************************************************
-' ************ subroutines *****************
-' ***************************************************************************
+'*******************************************************************************
function hhEntferneTilde ( sEintrag as String ) as String
-'///+ INPUT : string with tilde ///'
-'///+ OUTPUT: string without tilde ///'
- Dim i
- i = Instr ( 1, sEintrag, "~", 1 )
- if i <> 0 then
- hhEntferneTilde = Left ( sEintrag, i-1 ) + Right ( sEintrag, ( Len(sEintrag) - i ) )
- else
- hhEntferneTilde = sEintrag
- end if
-end function
-sub hOeffneNeuImMenue
-'/// open the entry 'new' in all languages in a menu ///'
-'///+ menue has to be opened before! ///'
- Dim SpracheNeu as string
- Dim Treffer as string
- Dim y, GrossesEnde, openID as integer
-
- select case iSprache
- case 01 : SpracheNeu = "New"
- case 03 : SpracheNeu = "Novo"
- case 31 : SpracheNeu = "Nieuw"
- case 33 : SpracheNeu = "Nouveau"
- case 34 : SpracheNeu = "Nuevo"
- case 39 : SpracheNeu = "Nuovo"
- case 46 : SpracheNeu = "Nytt"
- case 49 : SpracheNeu = "Neu"
- case else : warnlog "Sprache nicht aufgenommen in hOeffneImMenue!!!!"
- end select
- GrossesEnde = MenuGetItemCount
-
- for y=1 to GrossesEnde-1
- Treffer = hMenuItemGetText ( y )
- if InStr ( Treffer , SpracheNeu ) > 0 then
- Exit For
- end if
- next y
- hMenuSelectNr ( y )
-end sub
+ '///+ INPUT : string with tilde ///'
+ '///+ OUTPUT: string without tilde ///'
-sub hOeffneEinstellungenImMenue
-'/// open the entry 'Properties' in all languages in a menu ///'
-'///+ menue has to be opened before! ///'
- Dim SpracheEinstellungen as string
- Dim Treffer as string
- Dim y, GrossesEnde, openID as integer
-
- select case iSprache
-
- case 01 : SpracheEinstellungen = "Properties"
- case 03 : SpracheEinstellungen = "Eigenschaften"
- case 31 : SpracheEinstellungen = "Eigenschappen"
- case 33 : SpracheEinstellungen = "Prop"
- case 34 : SpracheEinstellungen = "Eigenschaften"
- case 39 : SpracheEinstellungen = "Propriet"
- case 46 : SpracheEinstellungen = "Egenskaper"
- case 49 : SpracheEinstellungen = "Eigenschaften"
- case else : warnlog "Sprache nicht aufgenommen in hOeffneEinstellungenImMenue!!!!"
-
- end select
- GrossesEnde = MenuGetItemCount
-
- for y=1 to GrossesEnde-1
- Treffer = hMenuItemGetText ( y )
- if InStr ( Treffer , SpracheEinstellungen ) > 0 then
- Exit For
- end if
- next y
- hMenuSelectNr ( y )
-end sub
+ Dim i
+ i = Instr ( 1, sEintrag, "~", 1 )
+ if i <> 0 then
+ hhEntferneTilde = Left ( sEintrag, i-1 ) + Right ( sEintrag, ( Len(sEintrag) - i ) )
+ else
+ hhEntferneTilde = sEintrag
+ endif
-sub hOeffneImMenue ( OeffneDas$ )
-'/// open an entry in in a menu ///'
-'///+ INPUT: string of emntry to open ///'
-'///+ menue has to be opened before! ///'
-Dim Treffer as string
- Dim y, GrossesEnde, openID as integer
- GrossesEnde = MenuGetItemCount
-
- for y=1 to GrossesEnde-1
- Treffer = hMenuItemGetText ( y )
- if InStr ( Treffer , OeffneDas$ ) > 0 then
- Exit For
- end if
- next y
- hMenuSelectNr ( y )
- sleep(2)
-end sub
+end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hMenuGetItemCommand ( EintragsNr as Integer ) as String
-'/// <u>hMenuGetItemCommand(Nr)</u> ///
-'///+ To read the slot/UNO slot which is behind a menu item. ///
-'///+ Seperators will be ignored for the input INTEGER!
- Dim i as integer
- Dim j as integer
- Dim RealEnd as integer
- Dim DasEnde as integer
- Dim nID as Integer
- DasEnde = EintragsNr
- RealEnd = MenuGetItemCount
- if DasEnde > RealEnd then
- warnlog "Parameter (" & DasEnde & ") bigger than items in menu (" & RealEnd & ") , 'hMenuGetItemCommand' canceled."
- else
- j=0
- for i=1 to DasEnde
- if MenuIsSeperator ( i+j ) then
- j = j+1
- end if
- next i
- nID = MenuGetItemID ( EintragsNr+j )
- hMenuGetItemCommand = MenuGetItemCommand ( nID )
- end if
+
+ '/// <u>hMenuGetItemCommand(Nr)</u> ///
+ '///+ To read the slot/UNO slot which is behind a menu item. ///
+ '///+ Seperators will be ignored for the input INTEGER!
+
+ Dim i as integer
+ Dim j as integer
+ Dim RealEnd as integer
+ Dim DasEnde as integer
+ Dim nID as Integer
+ DasEnde = EintragsNr
+ RealEnd = MenuGetItemCount
+ if DasEnde > RealEnd then
+ warnlog "Parameter (" & DasEnde & ") bigger than items in menu (" & RealEnd & ") , 'hMenuGetItemCommand' canceled."
+ else
+ j=0
+ for i=1 to DasEnde
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ nID = MenuGetItemID ( EintragsNr+j )
+ hMenuGetItemCommand = MenuGetItemCommand ( nID )
+ endif
+
end function
+'*******************************************************************************
+
function hMenuGetItemId ( EintragsNr as Integer ) as integer
-'///+ To read the Slot ID which is behind a menu item. ///
-'///+ Seperators will be ignored for the input INTEGER!
- Dim i as integer
- Dim j as integer
- Dim RealEnd as integer
- Dim DasEnde as integer
- DasEnde = EintragsNr
- RealEnd = MenuGetItemCount
- if DasEnde > RealEnd then
- warnlog "Parameter (" & DasEnde & ") bigger than items in menu (" & RealEnd & ") , 'hMenuGetItemId' canceled."
- else
- j=0
- for i=1 to DasEnde
- if MenuIsSeperator ( i+j ) then
- j = j+1
- end if
- next i
- hMenuGetItemId = MenuGetItemID ( EintragsNr+j )
- end if
-end function
-'-------------------------------------------------------------------------
+ '///+ To read the Slot ID which is behind a menu item. ///
+ '///+ Seperators will be ignored for the input INTEGER!
+
+ Dim i as integer
+ Dim j as integer
+ Dim RealEnd as integer
+ Dim DasEnde as integer
+ DasEnde = EintragsNr
+ RealEnd = MenuGetItemCount
+ if DasEnde > RealEnd then
+ warnlog "Parameter (" & DasEnde & ") bigger than items in menu (" & RealEnd & ") , 'hMenuGetItemId' canceled."
+ else
+ j=0
+ for i=1 to DasEnde
+ if MenuIsSeperator ( i+j ) then
+ j = j+1
+ endif
+ next i
+ hMenuGetItemId = MenuGetItemID ( EintragsNr+j )
+ endif
+
+end function
+'*******************************************************************************
'/// Functions for the lower part of the 'Window' Menu ///'
'///+ philosophie: you can't do any actions on the first document -> it get's the number 0 and it doesn't count ///'
'///+ so the first window you can work with gets the number 1 and counting starts with 1 ... ///'
-
'///<b> function hUseMenu () </b>///'
'///+ very global function: depends on 'gApplication' just activates the menu-bar ///'
-
-'///<b> function hWindowGetCount () as integer </b>///'
-'///+ returns the number of windows (all inclusive the first one!) ///'
-
'///<b> function hWindowGetIndex () as integer </b>///'
'///+ returns the number of the active window ///'
-
'///<b> function hWindowGetText (optional iWindow as integer) as string </b>///'
'///+ returns the text of the menu entry without the tilde: ///'
'///+ w/ calling parameter: the active window ///'
'///+ w/o calling parameter: the window i ///'
-
'///<b> function hWindowSelect (iWindow as integer) </b>///'
'///+ switches to the window i ///'
'///+ calling parameter: id of the window to activate ///'
-'-------------------------------------------------------------------------
+'*******************************************************************************
-function hWindowGetCount () as integer
-'///<b> function hWindowGetCount () as integer </b>///'
-'///+ returns the number of windows ///'
+function hWindowGetIndex () as integer
- 'uShort GetDocumentCount() ' testool command
- hWindowGetCount = GetDocumentCount()
-end function
+ '///<b> function hWindowGetIndex () as integer </b>///'
+ '///+ returns the number of the active window ///'
+
+ dim iMenues as integer ' takes the number of entries in the windows menue
+ dim iNotWindows as integer ' number of open windows
+ dim iKandidate as integer
+ dim i as integer
-'-------------------------------------------------------------------------
+ iNotWindows = GetDocumentCount()
+ hUseMenu()
+
+ iMenues = hMenuItemGetCount
+ hMenuSelectNr(iMenues-1) ' 'windows' ist usually the one before the last
+ waitslot() 'wait 200
+ iKandidate = 0
+ iMenues = hMenuItemGetCount
+ for i = ((iMenues - iNotWindows) + 1) to iMenues
+ if (hMenuItemIsChecked (i)) then
+ if (iKandidate = 0) then
+ iKandidate = i
+ else
+ Warnlog "unexpected error 4711 - more than one window active??!! hWindowGetIndex () "
+ endif
+ endif
+ next i
+ iMenues = (iKandidate - (iMenues - iNotWindows) - 1)
+ hMenuClose()
+
+ hWindowGetIndex = iMenues
-function hWindowGetIndex () as integer
-'///<b> function hWindowGetIndex () as integer </b>///'
-'///+ returns the number of the active window ///'
- dim iMenues as integer ' takes the number of entries in the windows menue
- dim iNotWindows as integer ' number of open windows
- dim iKandidate as integer
- dim i as integer
-
- iNotWindows = hWindowGetCount ()
- hUseMenu()
-
- iMenues = hMenuItemGetCount
- hMenuSelectNr(iMenues-1) ' 'windows' ist usually the one before the last
- wait 200
- iKandidate = 0
- iMenues = hMenuItemGetCount
- for i = ((iMenues - iNotWindows) + 1) to iMenues
- if (hMenuItemIsChecked (i)) then
- if (iKandidate = 0) then
- iKandidate = i
- else
- Warnlog "unexpected error 4711 - more than one window active??!! hWindowGetIndex () "
- endif
- endif
- next i
- iMenues = (iKandidate - (iMenues - iNotWindows) - 1)
- hMenuClose
-
- hWindowGetIndex = iMenues
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hWindowGetText (optional iWindow as integer) as string
-'///<b> function hWindowGetText (optional iWindow as integer) as string </b>///'
-'///+ returns the text of the menu entry without the tilde: ///'
-'///+ w/ calling parameter: the active window ///'
-'///+ w/o calling parameter: the window i ///'
- dim iMenues as integer ' takes the number of entries in the windows menue
- dim iNotWindows as integer ' number of open windows
- dim iUseWindow
-
-
- if (isMissing(iWindow) = FALSE) then
- iUseWindow = iWindow
- else
- iUseWindow = hWindowGetIndex()
- endif
-
- iNotWindows = hWindowGetCount ()
- hUseMenu()
-
- iMenues = hMenuItemGetCount
- hMenuSelectNr(iMenues-1) ' 'windows' ist usually the one before the last
- wait 200
- iMenues = hMenuItemGetCount
- hWindowGetText = hMenuItemGetTextMitTilde (iUseWindow + (iMenues - iNotWindows) + 1)
- hWindowGetText = hhEntferneTilde(hWindowGetText)
- hMenuClose
+
+ '///<b> function hWindowGetText (optional iWindow as integer) as string </b>///'
+ '///+ returns the text of the menu entry without the tilde: ///'
+ '///+ w/ calling parameter: the active window ///'
+ '///+ w/o calling parameter: the window i ///'
+
+ dim iMenues as integer ' takes the number of entries in the windows menue
+ dim iNotWindows as integer ' number of open windows
+ dim iUseWindow
+
+ if (isMissing(iWindow) = FALSE) then
+ iUseWindow = iWindow
+ else
+ iUseWindow = hWindowGetIndex()
+ endif
+
+ iNotWindows = GetDocumentCount()
+ hUseMenu()
+
+ iMenues = hMenuItemGetCount
+ hMenuSelectNr(iMenues-1) ' 'windows' ist usually the one before the last
+
+ waitslot() 'wait 200
+ iMenues = hMenuItemGetCount
+ hWindowGetText = hMenuItemGetTextMitTilde (iUseWindow + (iMenues - iNotWindows) + 1)
+ hWindowGetText = hhEntferneTilde(hWindowGetText)
+ hMenuClose()
+
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hWindowSelect (iWindow as integer)
-'///<b> function hWindowSelect (iWindow as integer) </b>///'
-'///+ switches to the window i ///'
-'///+ calling parameter: id of the window to activate ///'
- dim iMenues as integer ' takes the number of entries in the windows menue
- dim iNotWindows as integer ' number of open windows
-
- iNotWindows = hWindowGetCount ()
- hUseMenu()
-
- 'ActivateDocument iNumber as integer ' is a testtool command, but there is no system that stays behind iNumber :-[
- iMenues = hMenuItemGetCount
- hMenuSelectNr(iMenues-1) ' 'windows' ist usually the one before the last
- wait 200
- iMenues = hMenuItemGetCount
- hMenuSelectNr (iWindow + 1 + (iMenues - iNotWindows))
+
+ '///<b> function hWindowSelect (iWindow as integer) </b>///'
+ '///+ switches to the window i ///'
+ '///+ calling parameter: id of the window to activate ///'
+
+ dim iMenues as integer ' takes the number of entries in the windows menue
+ dim iNotWindows as integer ' number of open windows
+
+ iNotWindows = GetDocumentCount ()
+ hUseMenu()
+
+ 'ActivateDocument iNumber as integer ' is a testtool command, but there is no system that stays behind iNumber :-[
+ iMenues = hMenuItemGetCount
+ hMenuSelectNr(iMenues-1) ' 'windows' ist usually the one before the last
+ WaitSlot() 'wait 200
+
+ iMenues = hMenuItemGetCount
+ hMenuSelectNr (iWindow + 1 + (iMenues - iNotWindows))
+
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hUseMenu ()
-'///<b> function hUseMenu () </b>///'
-'///+ very global function: depends on 'gApplication' just activates the menu-bar ///'
- Select Case Ucase(gApplication)
- Case "WRITER"
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
-
- Case "MASTERDOC"
- Kontext "DocumentMasterDoc"
- DocumentMasterDoc.UseMenu
-
- Case "HTMLDOKUMENT"
- Kontext "DocumentWriterWeb"
- DocumentWriterWeb.UseMenu
-
- case "CALC" ' there are 2 entries over :-( usually only one, html 0 :-((((
- Kontext "DocumentCalc"
- DocumentCalc.UseMenu
-
- case "DRAW"
- Kontext "DocumentDraw"
- DocumentDraw.UseMenu
-
- case "IMPRESS"
- Kontext "DocumentImpress"
- DocumentImpress.UseMenu
-
- case "MATH" :
- Kontext "DocumentMath"
- DocumentMath.UseMenu
-
- case "INSIGHT" :
- Kontext "Insight"
- Insight.UseMenu
-
- case "BASIC" :
- Kontext "BasicIde"
- BasicIde.UseMenu
-
- case "NONE" :
- Kontext "DocumentBackground"
- DocumentBackground.UseMenu
- end select
+
+ '///<b> function hUseMenu () </b>///'
+ '///+ very global function: depends on 'gApplication' just activates the menu-bar ///'
+
+ Select Case Ucase(gApplication)
+ Case "WRITER"
+
+ Kontext "DocumentWriter"
+ DocumentWriter.UseMenu
+
+ Case "MASTERDOC"
+
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.UseMenu
+
+ Case "HTMLDOKUMENT"
+
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.UseMenu
+
+ case "CALC" ' there are 2 entries over :-( usually only one, html 0 :-((((
+
+ Kontext "DocumentCalc"
+ DocumentCalc.UseMenu
+
+ case "DRAW"
+
+ Kontext "DocumentDraw"
+ DocumentDraw.UseMenu
+
+ case "IMPRESS"
+
+ Kontext "DocumentImpress"
+ DocumentImpress.UseMenu
+
+ case "MATH" :
+
+ Kontext "DocumentMath"
+ DocumentMath.UseMenu
+
+ case "INSIGHT" :
+
+ Kontext "Insight"
+ Insight.UseMenu
+
+ case "BASIC" :
+
+ Kontext "BasicIde"
+ BasicIde.UseMenu
+
+ case "NONE" :
+
+ Kontext "DocumentBackground"
+ DocumentBackground.UseMenu
+
+ end select
+
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hOpenContextMenu()
-'/// very global function: depends on 'gApplication' just opens the Context Menu ///'
+
+ '/// very global function: depends on 'gApplication' just opens the Context Menu ///'
+
Select Case Ucase(gApplication)
- Case "WRITER"
- Kontext "DocumentWriter"
- DocumentWriter.openContextMenu
- Case "MASTERDOC"
- Kontext "DocumentMasterDoc"
- DocumentMasterDoc.openContextMenu
- Case "HTMLDOKUMENT"
- Kontext "DocumentWriterWeb"
- DocumentWriterWeb.openContextMenu
- case "CALC"
- Kontext "DocumentCalc"
- DocumentCalc.openContextMenu
- case "DRAW"
- Kontext "DocumentDraw"
- DocumentDraw.openContextMenu
- case "IMPRESS"
- Kontext "DocumentImpress"
- DocumentImpress.openContextMenu
- case "MATH" :
- Kontext "DocumentMath"
- DocumentMath.openContextMenu
+ Case "WRITER"
+
+ Kontext "DocumentWriter"
+ DocumentWriter.openContextMenu
+
+ Case "MASTERDOC"
+
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.openContextMenu
+
+ Case "HTMLDOKUMENT"
+
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.openContextMenu
+
+ case "CALC"
+
+ Kontext "DocumentCalc"
+ DocumentCalc.openContextMenu
+
+ case "DRAW"
+
+ Kontext "DocumentDraw"
+ DocumentDraw.openContextMenu
+
+ case "IMPRESS"
+
+ Kontext "DocumentImpress"
+ DocumentImpress.openContextMenu
+
+ case "MATH" :
+
+ Kontext "DocumentMath"
+ DocumentMath.openContextMenu
+
end select
+
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function hGetWindowCaption(sApplication as string, optional bAll as boolean)
-'///<b> function hGetWindowCaption () </b>///'
-'///+ just returns the string from the application main window ///'
-'///+ If optional parameter = true, thenn go throught all applications and get caption; return array ///'
+
+ '///<b> function hGetWindowCaption () </b>///'
+ '///+ just returns the string from the application main window ///'
+ '///+ If optional parameter = true, thenn go throught all applications and get caption; return array ///'
+
dim sTemp as string
dim aApplication() as string
dim aTemp(10) as string
@@ -845,63 +715,72 @@ function hGetWindowCaption(sApplication as string, optional bAll as boolean)
endif
for i=0 to iTimes
Select Case Ucase(sApplication)
- Case "SWRITER"
- Kontext "DocumentWriter"
- try
- sTemp = DocumentWriter.caption
- catch
- endcatch
- Case "SGLOBAL"
- Kontext "DocumentMasterDoc"
- try
- sTemp = DocumentMasterDoc.caption
- catch
- endcatch
- Case "SWEB"
- Kontext "DocumentWriterWeb"
- try
- sTemp = DocumentWriterWeb.caption
- catch
- endcatch
- case "SCALC"
- Kontext "DocumentCalc"
- try
- sTemp = DocumentCalc.caption
- catch
- endcatch
- case "SDRAW"
- Kontext "DocumentDraw"
- try
- sTemp = DocumentDraw.caption
- catch
- endcatch
- case "SIMPRESS"
+ Case "SWRITER"
+
+ Kontext "DocumentWriter"
+ try
+ sTemp = DocumentWriter.caption
+ catch
+ endcatch
+ Case "SGLOBAL"
+
+ Kontext "DocumentMasterDoc"
+ try
+ sTemp = DocumentMasterDoc.caption
+ catch
+ endcatch
+ Case "SWEB"
+
+ Kontext "DocumentWriterWeb"
+ try
+ sTemp = DocumentWriterWeb.caption
+ catch
+ endcatch
+ case "SCALC"
+
+ Kontext "DocumentCalc"
+ try
+ sTemp = DocumentCalc.caption
+ catch
+ endcatch
+ case "SDRAW"
+
+ Kontext "DocumentDraw"
+ try
+ sTemp = DocumentDraw.caption
+ catch
+ endcatch
+ case "SIMPRESS"
+
Kontext "DocumentImpress"
- try
- sTemp = DocumentImpress.caption
- catch
- endcatch
- case "SMATH"
- Kontext "DocumentMath"
- try
- sTemp = DocumentMath.caption
- catch
- endcatch
- Case "BASIC"
+ try
+ sTemp = DocumentImpress.caption
+ catch
+ endcatch
+ case "SMATH"
+
+ Kontext "DocumentMath"
+ try
+ sTemp = DocumentMath.caption
+ catch
+ endcatch
+ Case "BASIC"
+
Kontext "BasicIDE"
- try
- sTemp = BasicIDE.caption
- catch
- endcatch
- Case "BACK"
+ try
+ sTemp = BasicIDE.caption
+ catch
+ endcatch
+ Case "BACK"
+
Kontext "DocumentBackground"
- try
- sTemp = DocumentBackground.caption
- catch
- endcatch
- case else
- qaErrorLog "sApplication not defined: '" + sApplication + "'"
- sTemp = ""
+ try
+ sTemp = DocumentBackground.caption
+ catch
+ endcatch
+ case else
+ qaErrorLog "sApplication not defined: '" + sApplication + "'"
+ sTemp = ""
end select
aTemp(i) = sTemp
try
@@ -914,11 +793,13 @@ function hGetWindowCaption(sApplication as string, optional bAll as boolean)
else
hGetWindowCaption = sTemp
endif
+
end function
-'-------------------------------------------------------------------------
+'*******************************************************************************
function fSplitWindowTitle(sInString as string)
+
dim a, b, x, i as integer
dim sTemp() as string
dim sTempReturn(2) as string
@@ -940,9 +821,9 @@ function fSplitWindowTitle(sInString as string)
a = instr(sInString, " - ") ' get Document file name or Untitledi
if (a > 1) then
if (instr(a+1,sInString, " - ") > a) then
- qaErrorLog "Argh!"
- bError = TRUE
- endif
+ qaErrorLog "Argh!"
+ bError = TRUE
+ endif
sTempReturn(0) = left(sInString, a-1) ' (0) Filename
else
sTempReturn(0) = ""
@@ -976,24 +857,34 @@ function fSplitWindowTitle(sInString as string)
' sanity checks, to warn if assumptions are not met!
select case x
- case 1: if ((bTestToolCommunication) OR (bDebugVersion)) then
+ case 1:
+ if ((bTestToolCommunication) OR (bDebugVersion)) then
qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 1"
bError = TRUE
- endif
- case 2: if ((bTestToolCommunication) OR (NOT bDebugVersion)) then
+ endif
+ case 2:
+ if ((bTestToolCommunication) OR (NOT bDebugVersion)) then
qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 2"
bError = TRUE
- endif
- case 3: if ((NOT bTestToolCommunication) OR (bDebugVersion)) then
+ endif
+ case 3:
+ if ((NOT bTestToolCommunication) OR (bDebugVersion)) then
qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 3"
bError = TRUE
- endif
- case 4: if ((NOT bTestToolCommunication) OR (NOT bDebugVersion)) then
+ endif
+
+ '***** Warning: Indention error *****
+ case 4:
+ if ((NOT bTestToolCommunication) OR (NOT bDebugVersion)) then
+
+
+ '***** Warning: Indention error *****
qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 4"
bError = TRUE
- endif
- case else: qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 0"
- bError = TRUE
+ endif
+ case else:
+ qaErrorLog "t_menu.inc::fSplitWindowTitle: Unknown count of Window Title Strings! 0"
+ bError = TRUE
end select
if bError then
@@ -1003,26 +894,32 @@ function fSplitWindowTitle(sInString as string)
if (x > 1) then ' there is more to evaluate
' save the current computed values
for i=0 to 2
+ '***** Warning: Indention error *****
sTempReturn2(i) = sTempReturn(i)
next i
' make return array bigger
redim sTempReturn(4) as string
' copy data back
for i=0 to 2
+ '***** Warning: Indention error *****
sTempReturn(i) = sTempReturn2(i)
next i
' set remaining values, if exist
' debug version string
if bDebugVersion then
+ '***** Warning: Indention error *****
sTempReturn(3) = mid(sTemp(2),2,len(sTemp(2))-2) ' optional (3) Debug Version
else
+ '***** Warning: Indention error *****
sTempReturn(3) = ""
endif
' TestTool Communication string
if bTestToolCommunication then
+ '***** Warning: Indention error *****
' if true, then always the two last strings
sTempReturn(4) = sTemp(x-1) + " " + sTemp(x) ' optional (4) TestTool Communication
else
+ '***** Warning: Indention error *****
sTempReturn(4) = ""
endif
endif
@@ -1032,5 +929,6 @@ function fSplitWindowTitle(sInString as string)
endif
fSplitWindowTitle = sTempReturn()
+
end function
diff --git a/testautomation/math/required/m_updt.bas b/testautomation/math/required/m_updt.bas
index 423741e79..7472d02e2 100755
--- a/testautomation/math/required/m_updt.bas
+++ b/testautomation/math/required/m_updt.bas
@@ -76,7 +76,7 @@ sub LoadIncludeFiles
use "global\required\includes\g_customize.inc"
use "global\required\includes\g_001.inc"
use "global\required\includes\g_009.inc"
- use "global\optional\includes\t_ui_filters.inc" ' for gMathFilter in m_001_.inc
+ use "global\tools\includes\optional\t_ui_filters.inc" ' for gMathFilter in m_001_.inc
gApplication = "MATH"
Call GetUseFiles
end sub
diff --git a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc
index 76428a60f..0228e8bdc 100755
--- a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc
+++ b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc
@@ -217,7 +217,7 @@ printlog "iBIS Task 111711"
try
DocumentCalc.typekeys "<DELETE>"
sleep (2)
- printlog "OK, there are still " & hWindowGetCount & " documents open"
+ printlog "OK, there are still " & GetDocumentCount & " documents open"
catch
warnlog "Probably the office did crash -> #111711#"
call hCloseDocument
diff --git a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_iz.inc b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_iz.inc
index 4b8937b67..3a1988fb1 100755
--- a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_iz.inc
+++ b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_iz.inc
@@ -206,7 +206,7 @@ Kontext "Active"
'/// check for crash
try
- printlog "OK, there are still " & hWindowGetCount & " documents open"
+ printlog "OK, there are still " & GetDocumentCount & " documents open"
catch
warnlog "Probably the office did crash -> #I21036#"
goto endsub