summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
Diffstat (limited to 'smoketestoo_native')
-rwxr-xr-xsmoketestoo_native/data/Global.xml137
-rw-r--r--smoketestoo_native/data/OptionsDlg.xml1
2 files changed, 43 insertions, 95 deletions
diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml
index a412b9d2259c..d437eafe3457 100755
--- a/smoketestoo_native/data/Global.xml
+++ b/smoketestoo_native/data/Global.xml
@@ -35,7 +35,7 @@ const cParagraphBreak = 0
global const cExtensionFileName = "TestExtension.oxt"
-global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocSaveOpen50 = 3, cDocClose = 4
+global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocClose = 3
global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
global const cOtherSetupDoc = 0, cOtherWriteStatus = 1
@@ -89,7 +89,7 @@ Global const cUserFieldTestWriter = "Writer", cUserFieldTestCalc = &qu
Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "Math", cUserFieldTestChart = "Chart"
Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database"
Global const cUserFieldTestExtension = "Extension"
-Global const cUserFieldTestOpenSaveXML = "SaveOpenXML", cUserFieldTestOpenSave50 = "SaveOpen50"
+Global const cUserFieldTestOpenSaveXML = "SaveOpenXML"
Global const cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8"
Global const cOptionsDialogName = "OptionsDlg", cTest10Modul = "Standard"
@@ -107,7 +107,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, bMakeSaveOpen50Test as boolean
+Global bMakeSaveOpenXMLTest as boolean
Global bMakeTerminateAfterTest as boolean, bShowTable as boolean
Global bMakeSaveOpen8Test as boolean
@@ -139,11 +139,12 @@ Sub AssertionHandler( sMessage as String )
End Sub
Sub Main
- CaptureAssertions( "AssertionHandler" )
-
gCurrentDocTest = frmTestGlue
gCurrentTestCase = cOtherSetupDoc
+ On Local Error Goto MainError
+ CaptureAssertions( "AssertionHandler" )
+
call SetGlobalDoc
Dim bWasModified as Boolean
@@ -155,14 +156,18 @@ Sub Main
call ClearStatus
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+
Call Test_10er.Main
+ gCurrentDocTest = frmTestGlue
+ gCurrentTestCase = cOtherWriteStatus
if bShowTable then
- gCurrentDocTest = frmTestGlue
- gCurrentTestCase = cOtherWriteStatus
call CreateStatusTable2
call CreateStatusTable
call CreateDocState
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+ ' do this LogTestResult call before CreateSecondState, since the latter accesses (and displays) the result
call CreateSecondState
gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage
end if
@@ -170,8 +175,23 @@ Sub Main
gOutputDoc.setModified( bWasModified )
CaptureAssertions( "" )
+ Exit Sub
+
+MainError:
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), FALSE )
End Sub
+Function GetTestGlueDescription( nTestCase as Integer )
+ Select Case ( nTestCase )
+ case cOtherSetupDoc
+ GetTestGlueDescription = "setup test document"
+ case cOtherWriteStatus
+ GetTestGlueDescription = "write test status"
+ case Else
+ GetTestGlueDescription = ""
+ End Select
+End Function
+
Sub CreateStatusTable
dim tableHeaders(7) as string
tableHeaders(cStWriter) = "Writer"
@@ -183,11 +203,10 @@ Sub CreateStatusTable
tableHeaders(cStHTML) = "HTML"
tableHeaders(cStJava) = "Java"
- dim tableRows(4) as string
+ dim tableRows(3) as string
tableRows(cDocNew) = "new"
tableRows(cDocSaveOpen8) = "V8.0"
tableRows(cDocSaveOpenXML) = "XML"
- tableRows(cDocSaveOpen50) = "V5.0"
tableRows(cDocClose) = "close"
aDoc = gOutputDoc
@@ -205,6 +224,7 @@ Sub CreateStatusTable
table = aDoc.createInstance("com.sun.star.text.TextTable")
table.initialize(6,9)
table.Name = "StTab1"
+ table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
tableCursor = table.createCursorByCellName(table.CellNames(0))
@@ -212,37 +232,13 @@ Sub CreateStatusTable
tableCursor.goRight(1,FALSE)
for i% = 0 to 7
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableHeaders(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- tableCursor.goRight(1,FALSE)
- next i%
-
- xCursor.gotoStart(FALSE)
-
- tableCursor.gotoStart(FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- for i% = 0 to 4
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableRows(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ tableCell = table.getCellByPosition( i% + 1, 0 )
+ tableCell.String = tableHeaders( i% )
next i%
end Sub
Sub CreateStatusTable2
- dim tableHeaders(5) as string
+ dim tableHeaders(4) as string
tableHeaders(0) = "Database"
tableHeaders(1) = ""
tableHeaders(2) = "Extension"
@@ -263,8 +259,8 @@ Sub CreateStatusTable2
tableRows2(cEXTUninstall ) = "uninstall"
dim tableRows3(1) as string
- tableRows3(cOtherSetupDoc ) = "setup doc"
- tableRows3(cOtherWriteStatus ) = "write status"
+ tableRows3(cOtherSetupDoc ) = "setup test"
+ tableRows3(cOtherWriteStatus ) = "write test result"
aDoc = gOutputDoc
@@ -284,62 +280,24 @@ Sub CreateStatusTable2
xText.insertTextContent(xCursor, table, FALSE)
- tableCursor = table.createCursorByCellName(table.CellNames(0))
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(1,FALSE)
-
for i% = LBound( tableHeaders ) to UBound( tableHeaders )
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableHeaders(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- tableCursor.goRight(1,FALSE)
+ tableCell = table.getCellByPosition( i% + 1, 0 )
+ tableCell.String = tableHeaders(i%)
next i%
- tableCursor.gotoStart(FALSE)
-
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
for i% = LBound( tableRows ) to UBound( tableRows )
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableRows(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ tableCell = table.getCellByPosition( 0, i% + 1 )
+ tableCell.String=tableRows(i%)
next i%
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(2,FALSE)
-
for i% = LBound( tableRows2 ) to UBound( tableRows2 )
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableRows2(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ tableCell = table.getCellByPosition( 2, i% + 1 )
+ tableCell.String=tableRows2(i%)
next i%
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(4,FALSE)
-
for i% = LBound( tableRows3 ) to UBound( tableRows3 )
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableRows3(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ tableCell = table.getCellByPosition( 4, i% + 1 )
+ tableCell.String=tableRows3(i%)
next i%
end Sub
@@ -579,7 +537,6 @@ Sub SetOptions
SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl("cbDatabaseTest").getState), gOutputDoc)
SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl("cbExtensionTest").getState), gOutputDoc)
SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl("cbSaveOpenXMLTest").getState), gOutputDoc)
- SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl("cbSaveOpen50Test").getState), gOutputDoc)
SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutputDoc)
SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl("cbTerminateAfterTest").getState), gOutputDoc)
end Sub
@@ -597,7 +554,6 @@ Sub GetOptions
gOptionsDialog.getControl("cbDatabaseTest").setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)))
gOptionsDialog.getControl("cbExtensionTest").setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc)))
gOptionsDialog.getControl("cbSaveOpenXMLTest").setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)))
- gOptionsDialog.getControl("cbSaveOpen50Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutputDoc)))
gOptionsDialog.getControl("cbSaveOpen8Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
gOptionsDialog.getControl("cbTerminateAfterTest").setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)))
End Sub
@@ -615,7 +571,6 @@ Sub ReadOptions
bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)
bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc)
bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)
- bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutputDoc)
bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)
bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)
end Sub
@@ -639,11 +594,6 @@ Sub SetDefaultOptions
End If
bMakeSaveOpenXMLTest = true
REM Disable StarOffice 5.0 tests in case binfilter has not been included
- if Environ("WITH_BINFILTER") = "NO" then
- bMakeSaveOpen50Test = false
- else
- bMakeSaveOpen50Test = true
- End If
bMakeSaveOpen8Test = true
bMakeTerminateAfterTest = false
end Sub
@@ -678,11 +628,10 @@ Function StartTestWithDefaultOptions
component(cStJava) = "Java"
component(cStDataBase) = "Base"
component(cStExtension) = "Extensions"
- dim action(3) as string
+ dim action(2) as string
action(cDocNew) = "new"
action(cDocSaveOpen8) = "V8.0"
action(cDocSaveOpenXML) = "XML"
- action(cDocSaveOpen50) = "V5.0"
dim baseAction(5) as string
baseAction(cDBService) = "services"
baseAction(cDBOpen) = "open"
diff --git a/smoketestoo_native/data/OptionsDlg.xml b/smoketestoo_native/data/OptionsDlg.xml
index 942500f61d71..c03026185886 100644
--- a/smoketestoo_native/data/OptionsDlg.xml
+++ b/smoketestoo_native/data/OptionsDlg.xml
@@ -47,7 +47,6 @@
</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="cbSaveOpen50Test" dlg:tab-index="14" dlg:left="126" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Save / 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"/>