summaryrefslogtreecommitdiffstats
path: root/testautomation/writer/optional
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-12-02 17:08:51 +0100
committerKurt Zenker <kz@openoffice.org>2009-12-02 17:08:51 +0100
commitd4dfb041bd147e3b128f953c575e470f5eb14469 (patch)
treebca4b5e774b6559c0a86de52b20a5b08e86eb273 /testautomation/writer/optional
parentCWS-TOOLING: integrate CWS dba33a (diff)
parentreworked some problems loading files (diff)
downloadcore-d4dfb041bd147e3b128f953c575e470f5eb14469.tar.gz
core-d4dfb041bd147e3b128f953c575e470f5eb14469.zip
CWS-TOOLING: integrate CWS automationOOO320m3_DEV300
Diffstat (limited to 'testautomation/writer/optional')
-rwxr-xr-xtestautomation/writer/optional/includes/drawing/w_drawing_tools2.inc6
-rw-r--r--testautomation/writer/optional/includes/loadsave/w_loadsave.inc633
-rwxr-xr-xtestautomation/writer/optional/includes/table/w_204a_.inc58
3 files changed, 303 insertions, 394 deletions
diff --git a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
index f96238cb11a8..463ef593930c 100755
--- a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
+++ b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc
@@ -304,9 +304,9 @@ testcase tGroup_6
Call wTypeKeys "<Right>",2
PrintLog "- Set the focus to rectangle , check if it is moved (Should NOT)"
- Call gMouseClick(35,35)
+ Call gMouseClick(41,40)
Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX1 then Warnlog "Rectangle should NOT be moved: X Not -> "+sPositionX1+" but -> "+ Horizontalby.Gettext
+ if Horizontalby.Gettext <> sPositionX1 then Warnlog "#i106719#Rectangle should NOT be moved: X Not -> "+sPositionX1+" but -> "+ Horizontalby.Gettext
if Verticalby.Gettext <> sPositionY1 then Warnlog "Rectangle should NOT be moved: Y Not -> "+sPositionY1+" but -> "+ Verticalby.Gettext
TabPositionAndSizeWriter.Cancel
@@ -377,7 +377,7 @@ testcase tGroup_7
PrintLog "- Set the focus to rectangle , check if it is moved (Should NOT)."
Call gMouseClick(40,40)
Call fPositionAndSize("TabPositionAndSizeWriter")
- if Horizontalby.Gettext <> sPositionX1 then Warnlog "Rectangle should NOT be moved: X Not -> "+sPositionX1+" but -> "+ Horizontalby.Gettext
+ if Horizontalby.Gettext <> sPositionX1 then Warnlog "#i106719#Rectangle should NOT be moved: X Not -> "+sPositionX1+" but -> "+ Horizontalby.Gettext
if Verticalby.Gettext <> sPositionY1 then Warnlog "Rectangle should NOT be moved: Y Not -> "+sPositionY1+" but -> "+ Verticalby.Gettext
TabPositionAndSizeWriter.Cancel
diff --git a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
index ad2c3122da63..fd927b339685 100644
--- a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
+++ b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
@@ -51,7 +51,6 @@ testcase tExportAllReadableFormatsIntoODF
end if
Dim AvailableFilters( 35 ) as String
- Dim TemplateFilterFile as String
Dim ImportFileList ( 300 ) as String
Dim ExportFileList ( 300 ) as String
Dim WorkDirectory as String
@@ -61,7 +60,6 @@ testcase tExportAllReadableFormatsIntoODF
Dim sExportFile as string
Dim i as Integer
- TemplateFilterFile = ConvertPath ( gTesttoolPath + "writer\optional\input\filterlist.txt")
WorkDirectory = ( ConvertPath ( gOfficePath + "user\work\" + gPlatgroup + "\export\"))
ImportDir = ConvertPath ( gTesttoolPath + "writer\optional\input\import\")
@@ -84,98 +82,103 @@ testcase tExportAllReadableFormatsIntoODF
printlog "- Start loading files in list"
For i = 1 to listCount(ImportFileList())
printlog "- " & i & ". load: " & ImportFileList(i)
- Call hFileOpen ( ImportFileList(i) )
- printlog "- done"
-
- Kontext "TextImport"
- if TextImport.Exists then
- TextImport.Ok
- printlog "- Text import dialog passed"
- end if
-
- Kontext "Filterauswahl"
- if Filterauswahl.Exists then
- Filterauswahl.Cancel
- printlog "- Filterdialog passed"
- end if
-
- Kontext "AsciiFilterOptionen"
- if AsciiFilterOptionen.Exists then
- AsciiFilterOptionen.Ok
- printlog "- ASCII-Filter dialog passed"
- end if
-
- Kontext "SecurityWarning"
- if SecurityWarning.Exists(3) then
- SecurityWarning.Ok
- printlog "- Security warning passed"
- end if
-
- Kontext "DocumentWriter"
- if DocumentWriter.Exists(3) then
- Do until DocumentWriter.StatusIsProgress = false
- wait 500
- Loop
+ sExportFile = ImportFileList(i)
+ if GetExtention ( sExportFile ) = "psw" then
+ QAErrorlog "#i102221#Pocket Word filter puts General I/O Error"
else
- Kontext "DocumentCalc"
- if DocumentCalc.Exists(3) then
- Do until DocumentCalc.StatusIsProgress = false
+ Call hFileOpen ( ImportFileList(i) )
+ printlog "- done"
+
+ Kontext "TextImport"
+ if TextImport.Exists then
+ TextImport.Ok
+ printlog "- Text import dialog passed"
+ end if
+
+ Kontext "Filterauswahl"
+ if Filterauswahl.Exists then
+ Filterauswahl.Cancel
+ printlog "- Filterdialog passed"
+ end if
+
+ Kontext "AsciiFilterOptionen"
+ if AsciiFilterOptionen.Exists then
+ AsciiFilterOptionen.Ok
+ printlog "- ASCII-Filter dialog passed"
+ end if
+
+ Kontext "SecurityWarning"
+ if SecurityWarning.Exists(3) then
+ SecurityWarning.Ok
+ printlog "- Security warning passed"
+ end if
+
+ Kontext "DocumentWriter"
+ if DocumentWriter.Exists(3) then
+ Do until DocumentWriter.StatusIsProgress = false
wait 500
Loop
else
- Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
+ Kontext "DocumentCalc"
+ if DocumentCalc.Exists(3) then
+ Do until DocumentCalc.StatusIsProgress = false
+ wait 500
+ Loop
+ else
+ Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
+ end if
end if
- end if
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(ImportFileList(i),"sw40") = false then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
+
+ ' Check for macro alert
+ Kontext "SecurityWarning"
+ if SecurityWarning.Exists then
+ if inStr(ImportFileList(i),"sw40") = false then
+ QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
+ end if
+ SecurityWarning.Cancel
+ end if
+ Sleep 1
+
+ Kontext "AlienWarning"
+ if AlienWarning.Exists then
+ AlienWarning.Ok
+ printlog "- Alien warning passed"
end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- Kontext "AlienWarning"
- if AlienWarning.Exists then
- AlienWarning.Ok
- printlog "- Alien warning passed"
- end if
-
- ' HTML-File can't be exported as odf this way
- if GetExtention(ImportFileList(i)) <> "html" then
-
- sExportFile = WorkDirectory & "ExportedFile" & i & ".odf"
- Printlog "- Save as : " & ConvertPath ( sExportFile )
- if hFileSaveAsWithFilterKill (sExportFile, "writer8") = true then
- printlog "- done"
- printlog "- close file"
- Call hCloseDocument
- Printlog "- Open previous saved file"
- Call hFileOpenWithFilter (sExportFile, "writer8")
- printlog "- done"
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(ImportFileList(i),"sw40") = false then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
+ ' HTML-File can't be exported as odf this way
+ if GetExtention(ImportFileList(i)) <> "html" then
+
+ sExportFile = WorkDirectory & "ExportedFile" & i & ".odf"
+ Printlog "- Save as : " & ConvertPath ( sExportFile )
+ if hFileSaveAsWithFilterKill (sExportFile, "writer8") = true then
+ printlog "- done"
+ printlog "- close file"
+ Call hCloseDocument
+
+ Printlog "- Open previous saved file"
+ Call hFileOpenWithFilter (sExportFile, "writer8")
+ printlog "- done"
+ ' Check for macro alert
+ Kontext "SecurityWarning"
+ if SecurityWarning.Exists then
+ if inStr(ImportFileList(i),"sw40") = false then
+ QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
+ end if
+ SecurityWarning.Cancel
end if
- SecurityWarning.Cancel
+ Sleep 1
+ else
+ Warnlog "Unable to save file: " & sExportFile
end if
- Sleep 1
else
- Warnlog "Unable to save file: " & sExportFile
+ printlog "- HTML-file is not exported this way"
end if
- else
- printlog "- HTML-file is not exported this way"
- end if
-
- printlog "- Close all open files."
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
+
+ printlog "- Close all open files."
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ endif
next i 'File
endcase
@@ -190,7 +193,6 @@ testcase tExportAllReadableFormatsIntoThemselves
end if
Dim AvailableFilters( 35 ) as String
- Dim TemplateFilterFile as String
Dim SavedCorrectly as Boolean
Dim ImportFileList ( 300 ) as String
Dim ExportFileList ( 300 ) as String
@@ -205,7 +207,6 @@ testcase tExportAllReadableFormatsIntoThemselves
Dim iCounter as integer
Dim DocumentCount as integer
- TemplateFilterFile = ConvertPath ( gTesttoolPath + "writer\optional\input\filterlist.txt")
sWorkDirectory = ( ConvertPath ( gOfficePath + "user\work\" + gPlatgroup + "\export\"))
sImportDir = ConvertPath ( gTesttoolPath + "writer\optional\input\import\")
@@ -220,155 +221,150 @@ testcase tExportAllReadableFormatsIntoThemselves
end if
app.Mkdir sWorkDirectory
- QAErrorlog "#i102221#Pocketword-filter seems broken."
-
- For iCurrentFileIndex = 1 to 16
+ For iCurrentFileIndex = 7 to 7
select case iCurrentFileIndex
- case 1 : sCurrentFile = "xml2.odt"
- sCurrentFilter = "writer8"
- case 2 : sCurrentFile = "wpsfile.wps"
- sCurrentFilter = "Text (encoded)"
- case 3 : sCurrentFile = "dostext.txt"
- sCurrentFilter = "Text (encoded)"
- case 4 : sCurrentFile = "sw30.sdw"
- sCurrentFilter = "StarWriter 3.0"
- case 5 : sCurrentFile = "sw50.vor"
- sCurrentFilter = "StarWriter 5.0 Vorlage/Template"
- case 6 : sCurrentFile = "sw31.sdw"
- sCurrentFilter = "StarWriter 3.0"
- case 7 : sCurrentFile = "sw31.vor"
- sCurrentFilter = "StarWriter 3.0 Vorlage/Template"
- case 8 : sCurrentFile = "sw40.sdw"
- sCurrentFilter = "StarWriter 4.0"
- case 9 : sCurrentFile = "sw40_sp2.vor"
- sCurrentFilter = "StarWriter 4.0 Vorlage/Template"
- case 10 : sCurrentFile = "sw50.sdw"
- sCurrentFilter = "StarWriter 5.0"
- case 11 : sCurrentFile = "html.html"
- sCurrentFilter = "HTML (StarWriter)"
- case 12 : sCurrentFile = "rtf.rtf"
- sCurrentFilter = "Rich Text Format"
- case 13 : sCurrentFile = "sw60.sxw"
- sCurrentFilter = "StarOffice XML (Writer)"
- case 14 : sCurrentFile = "winw97.doc"
- sCurrentFilter = "MS Word 97"
- case 15 : sCurrentFile = "winword6.doc"
- sCurrentFilter = "MS Word 95"
- case 16 : sCurrentFile = "wintext.txt"
- sCurrentFilter = "Text (encoded)"
-' case 17 : sCurrentFile = "pocketword.psw"
-' sCurrentFilter = "PocketWord File"
-
-
-'TODO: 18-23 not applyable. Can be opened, but saving in the format is not supported.
-
-' case 18 : sCurrentFile = "unixtext.txt"
-' sCurrentFilter = "Text"
-' case 19 : sCurrentFile = "sw2.sdw"
-' sCurrentFilter = "StarWriter 2.0"
-' case 20 : sCurrentFile = "amipro3.sam"
-' sCurrentFilter = "Ami Pro 1.x-3.1 (W4W)"
-' case 21 : sCurrentFile = "mactext.txt"
-' sCurrentFilter = "Mac Write 4.x 5.0 (W4W)"
-' case 22 : sCurrentFile = "sw1.sdw"
-' sCurrentFilter = "StarWriter 1.0"
-' case 23 : sCurrentFile = "swdoc.txt"
-' sCurrentFilter = "Text (encoded) (StarWriter/GlobalDocument)"
-' case 24 : sCurrentFile = "hangul.hwp"
-' sCurrentFilter = "writer_MIZI_Hwp_97"
+ case 1 : sCurrentFile = "xml2.odt"
+ sCurrentFilter = "writer8"
+ case 2 : sCurrentFile = "wpsfile.wps"
+ sCurrentFilter = "Text (encoded)"
+ case 3 : sCurrentFile = "dostext.txt"
+ sCurrentFilter = "Text (encoded)"
+ case 4 : sCurrentFile = "sw30.sdw"
+ sCurrentFilter = "StarWriter 3.0"
+ case 5 : sCurrentFile = "sw50.vor"
+ sCurrentFilter = "StarWriter 5.0 Vorlage/Template"
+ case 6 : sCurrentFile = "sw31.sdw"
+ sCurrentFilter = "StarWriter 3.0"
+ case 7 : sCurrentFile = "sw31.vor"
+ sCurrentFilter = "StarWriter 3.0 Vorlage/Template"
+ case 8 : sCurrentFile = "sw40.sdw"
+ sCurrentFilter = "StarWriter 4.0"
+ case 9 : sCurrentFile = "sw40_sp2.vor"
+ sCurrentFilter = "StarWriter 4.0 Vorlage/Template"
+ case 10 : sCurrentFile = "sw50.sdw"
+ sCurrentFilter = "StarWriter 5.0"
+ case 11 : sCurrentFile = "html.html"
+ sCurrentFilter = "HTML (StarWriter)"
+ case 12 : sCurrentFile = "rtf.rtf"
+ sCurrentFilter = "Rich Text Format"
+ case 13 : sCurrentFile = "sw60.sxw"
+ sCurrentFilter = "StarOffice XML (Writer)"
+ case 14 : sCurrentFile = "winw97.doc"
+ sCurrentFilter = "MS Word 97"
+ case 15 : sCurrentFile = "winword6.doc"
+ sCurrentFilter = "MS Word 95"
+ case 16 : sCurrentFile = "wintext.txt"
+ sCurrentFilter = "Text (encoded)"
+' case 17 : sCurrentFile = "pocketword.psw"
+' sCurrentFilter = "PocketWord File"
+' TODO: 18-23 not applyable. Can be opened, but saving in the format is not supported.
+' case 18 : sCurrentFile = "unixtext.txt"
+' sCurrentFilter = "Text"
+' case 19 : sCurrentFile = "sw2.sdw"
+' sCurrentFilter = "StarWriter 2.0"
+' case 20 : sCurrentFile = "amipro3.sam"
+' sCurrentFilter = "Ami Pro 1.x-3.1 (W4W)"
+' case 21 : sCurrentFile = "mactext.txt"
+' sCurrentFilter = "Mac Write 4.x 5.0 (W4W)"
+' case 22 : sCurrentFile = "sw1.sdw"
+' sCurrentFilter = "StarWriter 1.0"
+' case 23 : sCurrentFile = "swdoc.txt"
+' sCurrentFilter = "Text (encoded) (StarWriter/GlobalDocument)"
+' case 24 : sCurrentFile = "hangul.hwp"
+' sCurrentFilter = "writer_MIZI_Hwp_97"
end select
- printlog " - Export of File nr " + iCurrentFileIndex + " started."
-
sLoadFile = sImportDir & sCurrentFile
- sSaveFile = sWorkDirectory & "filenr_" & iCurrentFileIndex
-
- try
-
- ' Load In-file
- Call hFileOpenWithFilter(sLoadFile, sCurrentFilter, false)
-
- kontext "active"
- if active.exists(2) then
- active.ok
- warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
- end if
-
- Kontext "TextImport"
- if TextImport.Exists then
- TextImport.Ok
- end if
-
- Kontext "Filterauswahl"
- if Filterauswahl.Exists then
- Filterauswahl.Cancel
- end if
-
- Kontext "AsciiFilterOptionen"
- if AsciiFilterOptionen.Exists then AsciiFilterOptionen.Ok
- Kontext "SecurityWarning"
- if SecurityWarning.Exists(3) then SecurityWarning.Ok
- Kontext "DocumentWriter"
- if DocumentWriter.Exists(3) then
- Do until DocumentWriter.StatusIsProgress = false
- wait 500
- Loop
- else
- Kontext "DocumentCalc"
- if DocumentCalc.Exists(3) then
- Do until DocumentCalc.StatusIsProgress = false
- wait 500
- Loop
- else
- Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
- end if
- end if
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(currentfile,"sw40") = false then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- Kontext "AlienWarning"
- if AlienWarning.Exists then AlienWarning.Ok
-
- ' Save Out-file
- Call hFileSaveAsWithFilterKill(sSaveFile, sCurrentFilter)
-
- kontext "active"
- if active.exists(2) then
- active.ok
- warnlog "Error saving file " + sLoadFile + " as " + sSaveFile + "."
- goto Cleanup
- end if
-
- ' Load Out-file again
- Call hFileOpenWithFilter(sSaveFile, sCurrentFilter, false)
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(currentfile,"sw40") > 0 then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- catch
- Warnlog "Error with file: " + sLoadFile
- endcatch
+ sSaveFile = sWorkDirectory & "filenr_" & iCurrentFileIndex & "." & GetExtention ( sCurrentFile )
+ printlog "- Export of File nr " + iCurrentFileIndex + " started"
+ printlog " - Save file: " & sLoadFile
+ printlog " - to file: " & sSaveFile
+
+
+ ' Load In-file
+ Call hFileOpenWithFilter(sLoadFile, sCurrentFilter, false)
+
+ kontext "active"
+ if active.exists(2) then
+ active.ok
+ warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
+ end if
+
+ Kontext "TextImport"
+ if TextImport.Exists then
+ TextImport.Ok
+ end if
+
+ Kontext "Filterauswahl"
+ if Filterauswahl.Exists then
+ Filterauswahl.Cancel
+ end if
+
+ Kontext "AsciiFilterOptionen"
+ if AsciiFilterOptionen.Exists then AsciiFilterOptionen.Ok
+ Kontext "SecurityWarning"
+ if SecurityWarning.Exists(3) then SecurityWarning.Ok
+ Kontext "DocumentWriter"
+ if DocumentWriter.Exists(3) then
+ Do until DocumentWriter.StatusIsProgress = false
+ wait 500
+ Loop
+ else
+ Kontext "DocumentCalc"
+ if DocumentCalc.Exists(3) then
+ Do until DocumentCalc.StatusIsProgress = false
+ wait 500
+ Loop
+ else
+ Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
+ end if
+ end if
+
+ ' Check for macro alert
+ Kontext "SecurityWarning"
+ if SecurityWarning.Exists then
+ if inStr(currentfile,"sw40") = false then
+ QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
+ end if
+ SecurityWarning.Cancel
+ end if
+ Sleep 1
+
+ Kontext "AlienWarning"
+ if AlienWarning.Exists then AlienWarning.Ok
+
+ ' Save Out-file
+ Call hFileSaveAsWithFilterKill(sSaveFile, sCurrentFilter)
+
+ kontext "active"
+ if active.exists(2) then
+ active.ok
+ warnlog "Error saving file " + sLoadFile + " as " + sSaveFile + "."
+ goto Cleanup
+ end if
+
+ ' Load Out-file again
+ Call hFileOpenWithFilter(sSaveFile, sCurrentFilter, false)
+
+ ' Check for macro alert
+ Kontext "SecurityWarning"
+ if SecurityWarning.Exists then
+ if inStr(currentfile,"sw40") > 0 then
+ QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
+ end if
+ SecurityWarning.Cancel
+ end if
+ Sleep 1
Cleanup:
kontext "active"
if active.exists(2) then
active.ok
- warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
+ Select Case iCurrentFileIndex
+ case 7: QAErrorlog "#i106758#Saving StarWriter 3 template corrupts file"
+ case else
+ warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
+ end select
end if
printlog " Close all open files."
@@ -420,132 +416,79 @@ testcase tExportTop5FormatsIntoTop5
'// Start of the LOAD-Loop
For iCurrentLoadFileIndex = 1 to 4
Select case iCurrentLoadFileIndex
- case 1 : sCurrentLoadFile = "xml2.odt"
- sCurrentLoadFilter = "writer8"
- case 2 : sCurrentLoadFile = "sw60.sxw"
- sCurrentLoadFilter = "StarOffice XML (Writer)"
- case 3 : sCurrentLoadFile = "winw97.doc"
- sCurrentLoadFilter = "MS Word 97"
- case 4 : sCurrentLoadFile = "rtf.rtf"
- sCurrentLoadFilter = "Rich Text Format"
- case 5 : sCurrentLoadFile = "html.html"
- sCurrentLoadFilter = "HTML (StarWriter)"
+ case 1 : sCurrentLoadFile = sImportDir & "xml2.odt"
+ sCurrentLoadFilter = "writer8"
+ case 2 : sCurrentLoadFile = sImportDir & "sw60.sxw"
+ sCurrentLoadFilter = "StarOffice XML (Writer)"
+ case 3 : sCurrentLoadFile = sImportDir & "winw97.doc"
+ sCurrentLoadFilter = "MS Word 97"
+ case 4 : sCurrentLoadFile = sImportDir & "rtf.rtf"
+ sCurrentLoadFilter = "Rich Text Format"
+ case 5 : sCurrentLoadFile = sImportDir & "html.html"
+ sCurrentLoadFilter = "HTML (StarWriter)"
End select
- printlog " - Export of File nr " + iCurrentLoadFileIndex + " started."
-
- call fLoadTheFile((sImportDir & sCurrentLoadFile), sCurrentLoadFilter)
-
+ printlog "- Export of File nr " + iCurrentLoadFileIndex + " started."
+ printlog " - Save file: " & sCurrentLoadFile
+
'/// Here comes the SAVE-Loop
For iCurrentSaveFileIndex = 1 to 5
- Select case iCurrentSaveFileIndex
- case 1 : sCurrentSaveFile = "SavedFile_l" + iCurrentLoadFileIndex + "_s1.odt"
- sCurrentSaveFilter = "writer8"
- case 2 : sCurrentSaveFile = "SavedFile_l" + iCurrentLoadFileIndex + "_s2.sxw"
- sCurrentSaveFilter = "StarOffice XML (Writer)"
- case 3 : sCurrentSaveFile = "SavedFile_l" + iCurrentLoadFileIndex + "_s3.doc"
- sCurrentSaveFilter = "MS Word 97"
- case 4 : sCurrentSaveFile = "SavedFile_l" + iCurrentLoadFileIndex + "_s4.rtf"
- sCurrentSaveFilter = "Rich Text Format"
- case 5 : sCurrentSaveFile = "SavedFile_l" + iCurrentLoadFileIndex + "_s5.html"
- sCurrentSaveFilter = "HTML (StarWriter)"
- End select
-
- Call hFileSaveAsWithFilterKill((sWorkDirectory & sCurrentSaveFile), sCurrentSaveFilter)
-
- if hFileExists (sWorkDirectory & sCurrentSaveFile) then
-
- 'Check if the saved file can be loaded
- call fLoadTheFile((sWorkDirectory & sCurrentSaveFile), sCurrentSaveFilter)
-
- 'Close the opened file
- Do Until GetDocumentCount = 1
- Call hCloseDocument
- Loop
- end if
+ if hFileOpenWithFilter((sCurrentLoadFile), sCurrentLoadFilter) = true then
+ Select case iCurrentSaveFileIndex
+ case 1 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s1.odt"
+ sCurrentSaveFilter = "writer8"
+ case 2 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s2.sxw"
+ sCurrentSaveFilter = "StarOffice XML (Writer)"
+ case 3 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s3.doc"
+ sCurrentSaveFilter = "MS Word 97"
+ case 4 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s4.rtf"
+ sCurrentSaveFilter = "Rich Text Format"
+ case 5 : sCurrentSaveFile = sWorkDirectory & "SavedFile_l" + iCurrentLoadFileIndex + "_s5.html"
+ sCurrentSaveFilter = "HTML (StarWriter)"
+ End select
+
+ printlog " - " & iCurrentSaveFileIndex & ". to file: " & sCurrentSaveFile
+ if hFileSaveAsWithFilterKill(sCurrentSaveFile, sCurrentSaveFilter) = true then
+ printlog " - close all open documents"
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ printlog " - check if file exists"
+ if hFileExists (sCurrentSaveFile) then
+ printlog " - success"
+ printlog " - reload previously saved file"
+ if hFileOpenWithFilter(sCurrentSaveFile, sCurrentSaveFilter) = true then
+ printlog " - success"
+ else
+ Warnlog "error loading file: " & sCurrentSaveFile
+ end if
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ else
+ Warnlog "Saved file doesn't exist"
+ 'Close the opened file
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ end if
+ else
+ Warnlog "Error saving file: " & sCurrentLoadFile
+ 'Close the opened file
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ end if
+ else
+ Warnlog "Error loading file: " & sCurrentLoadFile
+ 'Close the opened file
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ end if
Next iCurrentSaveFileIndex
- '/// Here ends the Save-Loop
-
- Cleanup:
- kontext "active"
- if active.exists(2) then
- active.ok
- warnlog "Error. Last file processed: " + sCurrentLoadFile + " as " + sCurrentSaveFile + "."
- end if
-
- printlog " Close all open files."
-
- Do Until GetDocumentCount = 0
- Call hCloseDocument
- Loop
-
- printlog " - File nr " + iCurrentLoadFileIndex + " completed."
+ printlog "- Export of File nr " + iCurrentLoadFileIndex + " completed."
Next iCurrentLoadFileIndex
'// End of the LOAD-Loop.
endcase
-
-'---------------------------------------------------------------------------------------------------------------------
-
-function fLoadTheFile(sLoadFile as string, sCurrentFilter as string)
-
- try
- ' Load In-file
- Call hFileOpenWithFilter(sLoadFile, sCurrentFilter, false)
-
- kontext "active"
- if active.exists(2) then
- active.ok
- warnlog "Error with file " + sLoadFile + " as " + sSaveFile + "."
- end if
-
- Kontext "TextImport"
- if TextImport.Exists then
- TextImport.Ok
- end if
-
- Kontext "Filterauswahl"
- if Filterauswahl.Exists then
- Filterauswahl.Cancel
- end if
-
- Kontext "AsciiFilterOptionen"
- if AsciiFilterOptionen.Exists then AsciiFilterOptionen.Ok
- Kontext "SecurityWarning"
- if SecurityWarning.Exists(3) then SecurityWarning.Ok
- Kontext "DocumentWriter"
- if DocumentWriter.Exists(3) then
- Do until DocumentWriter.StatusIsProgress = false
- wait 500
- Loop
- else
- Kontext "DocumentCalc"
- if DocumentCalc.Exists(3) then
- Do until DocumentCalc.StatusIsProgress = false
- wait 500
- Loop
- else
- Warnlog "Neither DocumentWriter or DocumentCalc existed? Some other dialogue in focus?"
- end if
- end if
-
- ' Check for macro alert
- Kontext "SecurityWarning"
- if SecurityWarning.Exists then
- if inStr(currentfile,"sw40") > 0 then
- QAErrorlog "Macro-Security Warning is up though document should have no macro! Macro disabled"
- end if
- SecurityWarning.Cancel
- end if
- Sleep 1
-
- Kontext "AlienWarning"
- if AlienWarning.Exists then AlienWarning.Ok
-
- catch
- Warnlog "Error with file: " + sLoadFile
- endcatch
-end function 'fLoadTheFile
-
-'------------------------------------------------------------------------------------------------------------------------------------------------
-
diff --git a/testautomation/writer/optional/includes/table/w_204a_.inc b/testautomation/writer/optional/includes/table/w_204a_.inc
index 4b18bb064fe2..9ab42295d521 100755
--- a/testautomation/writer/optional/includes/table/w_204a_.inc
+++ b/testautomation/writer/optional/includes/table/w_204a_.inc
@@ -355,19 +355,13 @@ testcase sTableMergeCell
Call hNewDocument
- ' set marks to find
- Call wTypeKeys "NULL<return>"
- Call wTypeKeys "Start<return>"
- Call wTypeKeys "End<return>"
- Call wTypeKeys "NULL<return><up><up>"
-
temp (1) = "Table1"
- '/// Insert a table with 10 columns and 7 rows
+ printlog "Insert a table with 10 columns and 7 rows"
Call TBOhTabelleEinfuegen (temp (1) ,0,1,0,1,"10",tHeight:="7") ' insert table
+ printlog "Point cursor out of the table"
Call wTypeKeys "<MOD1 END>", 2
- Call wTypeKeys "<up><up>"
- '/// Insert a table with 10 columns and 10 rows
+ printlog "Insert a table with 10 columns and 10 rows"
temp (1) = "Table2"
Call TBOhTabelleEinfuegen (temp (1) ,0,0,1,1,"10",tHeight:="10") ' insert table
@@ -383,49 +377,21 @@ testcase sTableMergeCell
Call wTypeKeys "<down><shift down>" ' 2 vertical (1,2) & (1,3)
TableMergeCells : inc ac : dec fc
Call wTypeKeys "<down><up><shift down><shift up>" ' merge again
- 'Warnlog "Merge cells will crash when only one cell is selected (#i33394)"
TableMergeCells
- ' go to top of table, move to end & count
+ printlog "Go to top of table"
Call wTypeKeys "<mod1 home>"
- for i=1 to fc
- Call wTypeKeys "<right>"
- next i
- Call wTypeKeys "<down>"
- Call wTypeKeys "<shift end>" ' right after/outside the table ->
- try
- EditCopy
- catch
- Warnlog "Test didn't find the end of the table, stops here!"
- Call hCloseDocument
- goto endsub
- endcatch
- if (GetClipboardText <> "End") then
- Warnlog "Test didn't find the end of the table, stops here! Found:" & GetClipboardtext
- Call hCloseDocument
- goto endsub
- end if
- ' undo & check where we are
+ printlog "Undo all cell mergers (3 times)"
for i=1 to ac
- EditUndo
+ try
+ EditUndo
+ wait 500
+ catch
+ Warnlog "Edit / Undo disabled on Undo step: " & i
+ endcatch
next i
-
- sleep (3)
- temp (2) = hGetTableName()
- if (temp(2) <> temp(1)) then warnlog " --- wrong table? schould be : "+temp (1)+ ", is : "+temp(2)
- EditUndo ' go one step further
- EditUndo ' go one step further
- Call wTypeKeys "<up><shift end>"
- EditCopy
- temp(2) = GetClipboardText
- Call wTypeKeys "<down><shift home>"
- EditCopy
- temp(3) = GetClipboardText
- if ((temp(2) <> "Start") AND (temp(3) <> "End")) then
- warnlog "there is smth. wrong with the undo stuff !!! is:"+temp(3) +" and:"+temp(2)+" should:End Start"
- end if
- '/// Close document
+ printlog "Close document"
Call hCloseDocument
endcase