diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-04-28 11:55:30 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-04-28 11:55:30 +0000 |
commit | 3dcd151334e98e4f00672890cb1cd4c905cd17ea (patch) | |
tree | 3b1c5a831c56a196f9baa4bbafa4a8f2f220f717 | |
parent | 8d838b7e9eafbf2f4e75c70b393ff7a0cd4a1978 (diff) |
#i101399#,#i101405#
-rwxr-xr-x | testautomation/global/tools/includes/required/t_doc2.inc | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/testautomation/global/tools/includes/required/t_doc2.inc b/testautomation/global/tools/includes/required/t_doc2.inc index cf8386af6..680962f3f 100755 --- a/testautomation/global/tools/includes/required/t_doc2.inc +++ b/testautomation/global/tools/includes/required/t_doc2.inc @@ -127,6 +127,7 @@ function sMakeReadOnlyDocumentEditable() as boolean ' no action was required (that is: Document was not read-only) dim iTry as integer + dim rc as integer const CFN = "sMakeReadOnlyDocumentEditable::" if ( VERBOSE ) then printlog( CFN & "Making document editable (create a copy) if it is readonly" ) @@ -136,31 +137,34 @@ function sMakeReadOnlyDocumentEditable() as boolean if ( Bearbeiten.getState( 2 ) = 0 ) then - Bearbeiten.Click() + rc = hUseAsyncSlot("editdoc") - for iTry = 1 to 2 - - sleep( 2 ) - - Kontext "Active" - if ( Active.exists( 5 ) ) then + if ( rc >= 0 ) then + for iTry = 1 to 2 + - printlog( CFN & "Messagebox: " & Active.getText() ) + Kontext "Active" + if ( Active.exists( 5 ) ) then - try - if ( VERBOSE ) then printlog( CFN & "Document was read-only. A copy will be used." ) - Active.Yes() - if ( VERBOSE ) then printlog( CFN & "Closed 'use copy' message" ) - catch - if ( VERBOSE ) then printlog( CFN & "Probing for unexpected messagebox..." ) - active.ok() - qaerrorlog( "#i100701 - Object not found message" ) - endcatch - else - printlog( CFN & "No messagebox informing about a copy being used" ) - endif - sMakeReadOnlyDocumentEditable() = TRUE - next iTry + printlog( CFN & "Messagebox: " & Active.getText() ) + + try + if ( VERBOSE ) then printlog( CFN & "Document was read-only. A copy will be used." ) + Active.Yes() + if ( VERBOSE ) then printlog( CFN & "Closed 'use copy' message" ) + catch + if ( VERBOSE ) then printlog( CFN & "Probing for unexpected messagebox..." ) + active.ok() + qaerrorlog( "#i100701 - Object not found message" ) + endcatch + else + printlog( CFN & "No messagebox informing about a copy being used" ) + endif + sMakeReadOnlyDocumentEditable() = TRUE + next iTry + else + printlog( CFN & "Document appears to be editable" ) + endif else if ( VERBOSE ) then printlog( CFN & "Button <Bearbeiten> is pressed, document is editable" ) sMakeReadOnlyDocumentEditable() = FALSE |