summaryrefslogtreecommitdiff
path: root/smoketestdoc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-24 10:33:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-03-24 10:33:51 +0000
commit528d1effaee79ea3e03ba1553a59b6a5cf360168 (patch)
tree18c50dfef569a7bbdbd1a7eeb30deccc841f5f4e /smoketestdoc
parent8d2d57012c83f3a42a905b582fcb0eeca6365c67 (diff)
fix smoketest post-merge
Diffstat (limited to 'smoketestdoc')
-rw-r--r--smoketestdoc/data/Global.xml23
-rw-r--r--smoketestdoc/data/OptionsDlg.xml2
-rw-r--r--smoketestdoc/data/Test_10er.xml40
-rw-r--r--smoketestdoc/data/content.xml2
4 files changed, 46 insertions, 21 deletions
diff --git a/smoketestdoc/data/Global.xml b/smoketestdoc/data/Global.xml
index a35a8300d..3991a36bb 100644
--- a/smoketestdoc/data/Global.xml
+++ b/smoketestdoc/data/Global.xml
@@ -35,7 +35,7 @@ const cParagraphBreak = 0
global const cExtensionFileName = &quot;TestExtension.oxt&quot;
-global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocClose = 3
+global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocOpen50 = 3, cDocClose = 4
global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
global const cTestClosureSetupDoc = 0, cTestClosureWriteStatus = 1
@@ -90,6 +90,7 @@ Global const cUserFieldTestDraw = &quot;Draw&quot;, cUserFieldTestMath = &quot;M
Global const cUserFieldTestHTML = &quot;HTML&quot;, cUserFieldTestJava = &quot;Java&quot;, cUserFieldTestDatabase = &quot;Database&quot;
Global const cUserFieldTestExtension = &quot;Extension&quot;
Global const cUserFieldTestOpenSaveXML = &quot;SaveOpenXML&quot;
+Global const cUserFieldTestOpen50 = &quot;Open50&quot;
Global const cUserFieldTestTerminateAfterTest = &quot;Terminate&quot;, cUserFieldTestOpenSave8 = &quot;SaveOpen8&quot;
Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;Standard&quot;
@@ -107,7 +108,7 @@ Global bMakeWriterTest as boolean, bMakeCalcTest as boolean, bMakeImpressTest a
Global bMakeDrawTest as Boolean, bMakeMathTest as boolean, bMakeChartTest as boolean
Global bMakeHTMLTest as boolean, bMakeJavaTest as boolean, bMakeDBTest as boolean
Global bMakeExtensionTest as boolean
-Global bMakeSaveOpenXMLTest as boolean
+Global bMakeSaveOpenXMLTest as boolean, bMakeOpen50Test as boolean
Global bMakeTerminateAfterTest as boolean, bShowTable as boolean
Global bMakeSaveOpen8Test as boolean
@@ -231,10 +232,11 @@ Sub CreateStatusTable
tableHeaders(cStHTML) = &quot;HTML&quot;
tableHeaders(cStJava) = &quot;Java&quot;
- dim tableRows(3) as string
+ dim tableRows(4) as string
tableRows(cDocNew) = &quot;new&quot;
tableRows(cDocSaveOpen8) = &quot;V8.0&quot;
tableRows(cDocSaveOpenXML) = &quot;XML&quot;
+ tableRows(cDocOpen50) = &quot;V5.0&quot;
tableRows(cDocClose) = &quot;close&quot;
aDoc = gOutputDoc
@@ -250,7 +252,7 @@ Sub CreateStatusTable
xCursor.GoRight (1, False)
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
- table.initialize(5,9)
+ table.initialize(6,9)
table.Name = &quot;StTab1&quot;
table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
@@ -336,7 +338,7 @@ Sub CreateDocState
table = aDoc.TextTables.GetByIndex (1)
for j% = 0 to 7
- for i% = 0 to 3
+ for i% = 0 to 4
sRangeName = GetRangeName(j%, i%+1)
tableCursor = table.createCursorByCellName(sRangeName)
@@ -568,6 +570,7 @@ Sub SetOptions
SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutputDoc)
SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutputDoc)
SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpen50, -(gOptionsDialog.getControl(&quot;cbOpen50Test&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutputDoc)
SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutputDoc)
end Sub
@@ -585,6 +588,7 @@ Sub GetOptions
gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)))
gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc)))
gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbOpen50Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc)))
gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)))
End Sub
@@ -602,6 +606,7 @@ Sub ReadOptions
bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)
bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc)
bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)
+ bMakeOpen50Test = GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc)
bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)
bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)
end Sub
@@ -625,6 +630,11 @@ Sub SetDefaultOptions
End If
bMakeSaveOpenXMLTest = true
REM Disable StarOffice 5.0 tests in case binfilter has not been included
+ if Environ(&quot;WITH_BINFILTER&quot;) = &quot;NO&quot; then
+ bMakeOpen50Test = false
+ else
+ bMakeOpen50Test = true
+ End If
bMakeSaveOpen8Test = true
bMakeTerminateAfterTest = false
end Sub
@@ -659,10 +669,11 @@ Function StartTestWithDefaultOptions
component(cStJava) = &quot;Java&quot;
component(cStDataBase) = &quot;Base&quot;
component(cStExtension) = &quot;Extensions&quot;
- dim action(3) as string
+ dim action(4) as string
action(cDocNew) = &quot;new&quot;
action(cDocSaveOpen8) = &quot;V8.0&quot;
action(cDocSaveOpenXML) = &quot;XML&quot;
+ action(cDocOpen50) = &quot;V5.0&quot;
action(cDocClose) = &quot;close&quot;
dim baseAction(5) as string
baseAction(cDBService) = &quot;services&quot;
diff --git a/smoketestdoc/data/OptionsDlg.xml b/smoketestdoc/data/OptionsDlg.xml
index c03026185..809f03712 100644
--- a/smoketestdoc/data/OptionsDlg.xml
+++ b/smoketestdoc/data/OptionsDlg.xml
@@ -47,7 +47,7 @@
</dlg:titledbox>
<dlg:checkbox dlg:id="cbSaveOpen8Test" dlg:tab-index="12" dlg:left="126" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Save / Open V8.0" dlg:checked="false"/>
<dlg:checkbox dlg:id="cbSaveOpenXMLTest" dlg:tab-index="13" dlg:left="126" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Save / Open XML" dlg:checked="false"/>
-
+ <dlg:checkbox dlg:id="cbOpen50Test" dlg:tab-index="14" dlg:left="126" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Open V5.0" dlg:checked="false"/>
<dlg:titledbox dlg:id="fmBroker" dlg:tab-index="15" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
<dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="16" dlg:disabled="true" dlg:left="19" dlg:top="174" dlg:width="190" dlg:height="8" dlg:value="Terminate Office after test" dlg:checked="false"/>
diff --git a/smoketestdoc/data/Test_10er.xml b/smoketestdoc/data/Test_10er.xml
index 26c85ea0b..d93077be0 100644
--- a/smoketestdoc/data/Test_10er.xml
+++ b/smoketestdoc/data/Test_10er.xml
@@ -91,6 +91,22 @@ Sub DeleteAllSavedFiles()
If FileExists (sFileName) then
Kill (sFileName)
End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmWriter or cFlt50)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmCalc or cFlt50)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmImpress or cFlt50)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
+ sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmDraw or cFlt50)
+ If FileExists (sFileName) then
+ Kill (sFileName)
+ End If
End Sub
Sub DeleteAllLogFiles()
@@ -324,7 +340,7 @@ end Sub
Sub MakeDocTest
Dim oDoc as Object
- Dim sFileNameXML$, sFileName8$
+ Dim sFileNameXML$, sFileName50$, sFileName8$
Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR
@@ -334,9 +350,9 @@ Sub MakeDocTest
oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- gCurrentTestCase = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
- sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFlt8)
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+ sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFlt8)
SaveDoc (sFileName8, oDoc, GetDocFilter(gCurrentDocTest or cFlt8))
end if
gCurrentTestCase = cDocSaveOpenXML
@@ -372,24 +388,22 @@ Sub MakeDocTest
oDoc.close (true)
end If
end if
-
- nCurrentAction = cDocOpen50
- if bMakeOpen50Test and IsFilterAvailable (FilterType or cFlt50) then
+
+ gCurrentTestCase = cDocOpen50
+ if bMakeOpen50Test and IsFilterAvailable (gCurrentDocTest or cFlt50) then
SOLARSRC = ConvertToURL(Environ(&quot;SOLARSRC&quot;))
- sFileName50 = SOLARSRC+&quot;/qadevOOo/testdocs/&quot;+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt50)
+ sFileName50 = SOLARSRC+&quot;/qadevOOo/testdocs/ttt.&quot;+GetDocEndings(gCurrentDocTest or cFlt50)
oDoc = LoadDoc (sFileName50)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSave50Doc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageOpen50Doc, MainFileChannel)
- SetStatus (FilterType, cDocOpen50, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageOpen50Doc, not IsNull (oDoc) )
if not IsNull (oDoc) then
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
+ gCurrentTestCase = cDocClose
oDoc.close (true)
end If
end if
+
end If
Print #LocalTestLog, &quot;---&quot;
Close #LocalTestLog%
diff --git a/smoketestdoc/data/content.xml b/smoketestdoc/data/content.xml
index 3c81bbfba..5aba7013c 100644
--- a/smoketestdoc/data/content.xml
+++ b/smoketestdoc/data/content.xml
@@ -97,7 +97,7 @@
<text:user-field-decl text:value-type="string" text:string-value="y" text:name="Math"/>
<text:user-field-decl text:value-type="string" text:string-value="y" text:name="Chart"/>
<text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpenXML"/>
- <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen50"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Open50"/>
<text:user-field-decl text:value-type="string" text:string-value="n" text:name="Terminate"/>
<text:user-field-decl text:value-type="string" text:string-value="y" text:name="Java"/>
<text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen8"/>