diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-04-30 15:36:44 +0200 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-04-30 15:36:44 +0200 |
commit | 47ece945a698bcb64f88cdc9c832df6b7957c49b (patch) | |
tree | 169f8ba225880fcf3755f1bf0250ef29692bca83 /testautomation/global/tools | |
parent | c054caae20b1008ad9da69519472fcf0d09a8e35 (diff) |
vitomation01: #i111282 - extended f_window_functions.bas to cover BASIC IDE, StartCenter and Database as well. Needed to get rid of fSplitWindowTitle (too complex and not flexible enough to do the job) and needed to build in some safeguard against hGetWindowCaption() which causes array out of bounds errors and modifies its function parameters. Removed QAErrorlog as the issue with the incorrect windowtitle of the StartCenter is never going to be fixed, printlog will do.
Diffstat (limited to 'testautomation/global/tools')
-rwxr-xr-x | testautomation/global/tools/includes/optional/t_ole.inc | 2 | ||||
-rwxr-xr-x | testautomation/global/tools/includes/required/t_menu.inc | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/testautomation/global/tools/includes/optional/t_ole.inc b/testautomation/global/tools/includes/optional/t_ole.inc index f31798c37bbc..0ea179822cd2 100755 --- a/testautomation/global/tools/includes/optional/t_ole.inc +++ b/testautomation/global/tools/includes/optional/t_ole.inc @@ -73,7 +73,7 @@ function hGetOleObjectName( cApplication as string ) as string ' The application names for the API are case sensitive so we cannot use gApplication select case ( cApplication ) - case "WRITER" : Application_API_Name = "Writer + case "WRITER" : Application_API_Name = "Writer" case "CALC" : Application_API_Name = "Calc" case "IMPRESS": Application_API_Name = "Impress" case "DRAW" : Application_API_Name = "Draw" diff --git a/testautomation/global/tools/includes/required/t_menu.inc b/testautomation/global/tools/includes/required/t_menu.inc index f78e2239e943..a7c64b37865d 100755 --- a/testautomation/global/tools/includes/required/t_menu.inc +++ b/testautomation/global/tools/includes/required/t_menu.inc @@ -687,19 +687,22 @@ end function '******************************************************************************* -function hGetWindowCaption(sApplication as string, optional bAll as boolean) +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 ///' + ' BEWARE: THIS FUNCTION MODIFIES ITS FUNCTION PARAMETER UNDER CERTAIN + ' CONDITIONS! + dim sTemp as string dim aApplication() as string dim aTemp(10) as string dim iTimes as integer dim i as integer - aApplication = array("SWRITER","SGLOBAL","SWEB","SCALC","SDRAW","SIMPRESS","SMATH","BASIC","BACK") + aApplication = array("SWRITER","SGLOBAL","SWEB","SCALC","SDRAW","SIMPRESS","SMATH","BASIC","DATABASE","SOFFICE") if (isMissing(bAll) OR (NOT bAll)) then iTimes = 0 else @@ -756,7 +759,13 @@ function hGetWindowCaption(sApplication as string, optional bAll as boolean) sTemp = BasicIDE.caption catch endcatch - Case "BACK" + Case "DATABASE" + Kontext "DATABASE" + try + sTemp = DataBase.caption + catch + endcatch + Case "SOFFICE" Kontext "DocumentBackground" try sTemp = DocumentBackground.caption @@ -782,7 +791,7 @@ end function '******************************************************************************* -function fSplitWindowTitle(sInString as string) +function fSplitWindowTitle( sInString as string ) dim a, b, x, i, iProductname as integer dim sTemp() as string |