summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional/includes/ole_tools.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/framework/optional/includes/ole_tools.inc')
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/ole_tools.inc49
1 files changed, 24 insertions, 25 deletions
diff --git a/testautomation/framework/optional/includes/ole_tools.inc b/testautomation/framework/optional/includes/ole_tools.inc
index 0428f758cb3d..fdcfb6c62166 100644..100755
--- a/testautomation/framework/optional/includes/ole_tools.inc
+++ b/testautomation/framework/optional/includes/ole_tools.inc
@@ -25,7 +25,7 @@
'
'/************************************************************************
'*
-'* owner : thorsten.bosbach@sun.com
+'* owner : thorsten.bosbach@oracle.com
'*
'* short description : global-level-1-test -> insert all OLE-Objects out of OLE-dialog into all doc-types
'*
@@ -74,22 +74,38 @@ end sub
'*******************************************************************************
-sub hSetToStandardView ( DieApp$ )
- select case DieApp$
+function hSetToStandardView ( cApplication as string ) as boolean
+
+ const MAX_WAIT_FOR_DIALOG = 2
+
+ select case ( cApplication )
case "WRITER"
- gApplication = "WRITER"
+ gApplication = cApplication
Call hNewDocument
Kontext "DocumentWriter"
case "MASTERDOCUMENT"
- gApplication = "MASTERDOCUMENT"
+ gApplication = cApplication
Call hNewDocument
Kontext "DocumentMasterDoc"
+ case else
+ printlog( "Application not supported by this function: " & cApplication )
+ hSetToStandardView() = false
+ exit function
end select
- ViewZoom
+
+ hUseAsyncSlot( "ViewZoom" )
+
Kontext "Massstab"
- Optimal.Check
- Massstab.ok()
+ if ( Massstab.exists( MAX_WAIT_FOR_DIALOG ) ) then
+ Optimal.Check()
+ hCloseDialog( Massstab, "ok" )
+ else
+ warnlog( "Zoom-Dialog did not open" )
+ endif
+
Call hCloseDocument
+ hSetToStandardView() = true
+
end sub
'*******************************************************************************
@@ -140,23 +156,6 @@ end sub
'*******************************************************************************
-sub DisableNavigator()
- printlog( " - disable the navigator in globaldoc/writer" )
- select case gApplication
- case "MASTERDOCUMENT" : Kontext "NavigatorGlobalDoc"
- if NavigatorGlobalDoc.Exists() then
- ViewNavigator
- endif
- case "WRITER" : Kontext "NavigatorWriter"
- if NavigatorWriter.Exists() then
- ViewNavigator
- endif
- end select
- sleep( 1)
-end sub
-
-'*******************************************************************************
-
sub UncheckAutoFileExtension()
Kontext "SpeichernDlg"
if SpeichernDlg.exists(5) then