summaryrefslogtreecommitdiff
path: root/testautomation/global/tools/includes
diff options
context:
space:
mode:
authorJoerg Skottke [jsk] <jsk@openoffice.org>2010-07-07 19:17:49 +0200
committerJoerg Skottke [jsk] <jsk@openoffice.org>2010-07-07 19:17:49 +0200
commite2ffe6b8de7cd6277582afad1bff94556db485aa (patch)
treea68a0d74686557a76227ea9beba5f4461f4c668b /testautomation/global/tools/includes
parent9d3fb56757b41358c0adddc9797527c41449de23 (diff)
automationdev300m84: #ii112847 - Fixed IsNamedDocLoaded by creating an exception list of suffixes which indicate a template being loaded. Not 100 percent safe but better than the old implementation
Diffstat (limited to 'testautomation/global/tools/includes')
-rwxr-xr-xtestautomation/global/tools/includes/required/t_files.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/testautomation/global/tools/includes/required/t_files.inc b/testautomation/global/tools/includes/required/t_files.inc
index 1b9cd4c028df..d9da7ce5191a 100755
--- a/testautomation/global/tools/includes/required/t_files.inc
+++ b/testautomation/global/tools/includes/required/t_files.inc
@@ -114,13 +114,28 @@ function hIsNamedDocLoaded( cFileName as string ) as boolean
dim cDocumentName as string
dim iDocumentNameLength as integer
+ dim bTemplateDocument as boolean
hIsNamedDocLoaded() = false
+ ' If the requested document is a template, we cannot use its filename to
+ ' identify the document as it is named "Untitled 1" or "Untitled" in the
+ ' FileSave dialog and the document properties dialog. The string is locale
+ ' dependent. So we do a shortcut here, the calling tests fail at a later
+ ' point if this function does not work properly
+
+ select case( right( cFileName, 4 ) )
+ case ".vor", ".dot", ".sti", ".pot", ".std", ".xlt", ".stc", ".ots", "xltm", "xltx"
+ if ( GVERBOSE ) then printlog( CFN & "Template document filtered" )
+ hIsNamedDocLoaded() = true
+ exit function
+ end select
+
if ( hUseAsyncSlot( "FileProperties" ) <> RC_FAILURE ) then
kontext
active.setpage(tabdokument)
+
kontext "TabDokument"
if ( TabDokument.exists( 2 ) ) then