summaryrefslogtreecommitdiff
path: root/testautomation/writer/optional/includes/fields/w_fields4.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/writer/optional/includes/fields/w_fields4.inc')
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields4.inc114
1 files changed, 24 insertions, 90 deletions
diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc
index d1e16a1a36be..315c6b0f96d3 100644
--- a/testautomation/writer/optional/includes/fields/w_fields4.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields4.inc
@@ -67,8 +67,8 @@ testcase tDocInformationTitle
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
+ hFileOpenLocally( sTestFile )
+
'/// File / Properties / Description , input some
'/// + new text in Title
@@ -119,8 +119,8 @@ testcase tDocInformationSubject
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
+ hFileOpenLocally( sTestFile )
+
'/// File / Properties / Description , input some
'/// + text in Subject
@@ -171,8 +171,8 @@ testcase tDocInformationKeywords
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
+ hFileOpenLocally( sTestFile )
+
'/// File / Properties / Description , input some
'/// + text in Keywords
@@ -223,8 +223,8 @@ testcase tDocInformationDescription
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
+ hFileOpenLocally( sTestFile )
+
'/// File / Properties / Description , input some
'/// + text in Description
@@ -264,23 +264,13 @@ testcase tDocInformationUserDefined
QAErrorLog "#i112077#Tabpage 'Custom properties' has no declaration"
goto endsub
Dim sTestFile as String
- Dim sOriginalFile as string
Dim sVarResult() as String
Dim sFixResult() as String
Dim i as integer
Dim j as Integer
j = UBound(sVarResult)
- sTestFile = Convertpath (gOfficepath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
-
+ sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
sVarResult = Array( _
"A1" , _
"B2" , _
@@ -301,7 +291,7 @@ testcase tDocInformationUserDefined
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
+ hFileOpenLocally( sTestFile )
'/// File / Properties / Description , input some
'/// + text in Description
@@ -344,26 +334,17 @@ endcase
testcase tDocInformationCreated
- Dim sTestFile as String
- Dim sOriginalFile as String
Dim sFirstName as String
Dim sLastName as String
Dim sFirstName1 as String
Dim sLastName1 as String
Dim sVarResult(3) as String
Dim sFixResult(3) as String
+ dim sTestFile as string
Dim i as Integer
sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
+ sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
sVarResult(0) = sFirstName1 + " " + sLastName1
sVarResult(1) = fGetDate1(Date)
@@ -378,8 +359,8 @@ testcase tDocInformationCreated
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
+ hFileOpenLocally( sTestFile )
+
Call fFindWord ("Created")
Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
@@ -458,7 +439,6 @@ endcase
testcase tDocInformationModified
Dim sTestFile as String
- Dim sOriginalFile as String
Dim sSaveasFile as String
Dim sFirstName as String
Dim sLastName as String
@@ -469,15 +449,7 @@ testcase tDocInformationModified
Dim i as Integer
sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
+ sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
sVarResult(0) = sFirstName1 + " " + sLastName1
@@ -495,7 +467,7 @@ testcase tDocInformationModified
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
+ hFileOpenLocally( sTestFile )
Call hFileSaveAsKill (sSaveAsFile)
Call fFindWord ("Modified")
@@ -595,7 +567,6 @@ testcase tDocInformationModifiedSavefile
goto endsub
Dim sTestFile as String
- Dim sOriginalFile as string
Dim sSaveasFile as String
Dim sFirstName as String
Dim sLastName as String
@@ -606,15 +577,7 @@ testcase tDocInformationModifiedSavefile
Dim i as Integer
sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
+ sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
sVarResult(0) = sFirstName1 + " " + sLastName1
@@ -632,7 +595,7 @@ testcase tDocInformationModifiedSavefile
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
+ hFileOpenLocally( sTestFile )
Call fFindWord ("Modified")
Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
@@ -715,7 +678,6 @@ endcase
testcase tDocInformationPrinted
Dim sTestFile as String
- Dim sOriginalFile as String
Dim sFirstName as String
Dim sLastName as String
Dim sFirstName1 as String
@@ -725,17 +687,7 @@ testcase tDocInformationPrinted
Dim i as Integer
sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
-
-
+ sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
sVarResult(0) = sFirstName1 + " " + sLastName1
sVarResult(1) = fGetDate1(Date)
@@ -749,7 +701,7 @@ testcase tDocInformationPrinted
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
+ hFileOpenLocally( sTestFile )
Call fFindWord ("Last printed")
Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
@@ -842,7 +794,6 @@ endcase
testcase tDocInformationRevisionnumber
Dim sTestFile as String
- Dim sOriginalFile as string
Dim sSaveasFile as String
Dim sFirstName as String
Dim sLastName as String
@@ -854,15 +805,7 @@ testcase tDocInformationRevisionnumber
sFirstName1 = "Test1" : sLastName1 = "Test2"
sVarResult = "17" : sFixResult = "4"
- sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
+ sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw"
sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
@@ -873,7 +816,7 @@ testcase tDocInformationRevisionnumber
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
+ hFileOpenLocally( sTestFile )
'/// Change author to author : Test2 Test1
ToolsOptions
@@ -947,21 +890,12 @@ endcase
testcase tDocInformationTotaleditingtime
Dim sTestFile as String
- Dim sOriginalFile as string
Dim sSaveasFile as String
Dim sVarResult as String
Dim sFixResult as String
sFixResult = "00:29:05"
- sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
- sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- ' document has to be copied to local file system to avoid opening a read-only file
- ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
- FileCopy (sOriginalFile, sTestFile)
- if FileExists ( sTestFile ) = false then
- Warnlog "Test document couldn't be copied to local file system. Test aborted!"
- goto endsub
- end if
+ sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
@@ -972,7 +906,7 @@ testcase tDocInformationTotaleditingtime
Call hNewDocument
'/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
+ hFileOpenLocally( sTestFile )
'/// Save the file as another file
Call hFileSaveAsKill(sSaveAsFile)