summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-25 09:25:18 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-25 09:25:18 +0100
commit6d5880a46ca136c69bea3efea703f0d654505c2b (patch)
tree1796e287945d36d195263b43e8d9b1a3ce1b380a
parentfs34b: pulled and merged CWS dba34d (diff)
parentCWS-TOOLING: integrate CWS dba34c (diff)
downloadcore-6d5880a46ca136c69bea3efea703f0d654505c2b.tar.gz
core-6d5880a46ca136c69bea3efea703f0d654505c2b.zip
fs34b: pulled and merged DEV300:m104
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF (renamed from smoketestoo_native/com/sun/star/comp/smoketest/MANIFEST.MF)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/TestExtension.idl (renamed from smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/TestExtension.java (renamed from smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/delzip (renamed from smoketestoo_native/com/sun/star/comp/smoketest/delzip)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/makefile.mk (renamed from smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk)41
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/manifest.xml (renamed from smoketestoo_native/com/sun/star/comp/smoketest/manifest.xml)0
-rw-r--r--smoketestdoc/data/Events.xml (renamed from smoketestoo_native/data/Events.xml)23
-rw-r--r--smoketestdoc/data/Global.xml (renamed from smoketestoo_native/data/Global.xml)479
-rw-r--r--smoketestdoc/data/OptionsDlg.xml (renamed from smoketestoo_native/data/OptionsDlg.xml)42
-rw-r--r--smoketestdoc/data/Test_10er.xml (renamed from smoketestoo_native/data/Test_10er.xml)388
-rw-r--r--smoketestdoc/data/Test_DB.xml (renamed from smoketestoo_native/data/Test_DB.xml)78
-rw-r--r--smoketestdoc/data/Test_Ext.xml (renamed from smoketestoo_native/data/Test_Ext.xml)57
-rw-r--r--smoketestdoc/data/content.xml113
-rw-r--r--smoketestdoc/data/dialog-lb.xml (renamed from smoketestoo_native/data/dialog-lb.xml)0
-rw-r--r--smoketestdoc/data/dialog-lc.xml (renamed from smoketestoo_native/data/dialog-lc.xml)0
-rw-r--r--smoketestdoc/data/makefile.mk (renamed from smoketestoo_native/data/makefile.mk)32
-rw-r--r--smoketestdoc/data/manifest.xml (renamed from smoketestoo_native/data/manifest.xml)0
-rw-r--r--smoketestdoc/data/meta.xml (renamed from smoketestoo_native/data/meta.xml)0
-rw-r--r--smoketestdoc/data/script-lb.xml (renamed from smoketestoo_native/data/script-lb.xml)0
-rw-r--r--smoketestdoc/data/script-lc.xml (renamed from smoketestoo_native/data/script-lc.xml)0
-rw-r--r--smoketestdoc/data/settings.xml (renamed from smoketestoo_native/data/settings.xml)0
-rw-r--r--smoketestdoc/data/styles.xml (renamed from smoketestoo_native/data/styles.xml)0
-rwxr-xr-xsmoketestdoc/prj/build.lst4
-rwxr-xr-xsmoketestdoc/prj/d.lst4
-rw-r--r--smoketestoo_native/data/content.xml28
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/makefile.mk14
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/prj/build.lst6
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/smoketest.cxx7
-rw-r--r--test/prj/build.lst3
-rw-r--r--test/prj/d.lst3
-rw-r--r--test/source/cpp/makefile.mk11
-rw-r--r--test/source/cpp/unoexceptionprotector/makefile.mk56
-rw-r--r--test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx98
-rw-r--r--testautomation/graphics/required/includes/global/id_004.inc2
34 files changed, 894 insertions, 595 deletions
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/MANIFEST.MF b/smoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF
index 09e2f42ca0f6..09e2f42ca0f6 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/MANIFEST.MF
+++ b/smoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.idl
index 83c370e11a18..83c370e11a18 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl
+++ b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.idl
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.java
index c08c719116ae..c08c719116ae 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java
+++ b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.java
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/delzip b/smoketestdoc/com/sun/star/comp/smoketest/delzip
index 636fda90bfcb..636fda90bfcb 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/delzip
+++ b/smoketestdoc/com/sun/star/comp/smoketest/delzip
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk b/smoketestdoc/com/sun/star/comp/smoketest/makefile.mk
index da9b302791f0..173898970254 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk
+++ b/smoketestdoc/com/sun/star/comp/smoketest/makefile.mk
@@ -25,9 +25,9 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..$/..
-PRJNAME = smoke_test
-PACKAGE = com$/sun$/star$/comp$/smoketest
+PRJ = ../../../../..
+PRJNAME = smoketestdoc
+PACKAGE = com/sun/star/comp/smoketest
TARGET = com_sun_star_comp_smoketest
no_common_build_zip:=TRUE
@@ -40,7 +40,6 @@ no_common_build_zip:=TRUE
JARFILES = ridl.jar jurt.jar unoil.jar juh.jar
-
JARTARGET = TestExtension.jar
JARCOMPRESS = TRUE
CUSTOMMANIFESTFILE = MANIFEST.MF
@@ -48,41 +47,41 @@ CUSTOMMANIFESTFILE = MANIFEST.MF
ZIP1TARGET=TestExtension
ZIP1LIST=*
ZIPFLAGS=-r
-ZIP1DIR=$(MISC)$/$(TARGET)
+ZIP1DIR=$(MISC)/$(TARGET)
ZIP1EXT=.oxt
# --- Files --------------------------------------------------------
-#COPY_OXT_MANIFEST:= $(MISC)$/$(TARGET)$/META-INF$/manifest.xml
+#COPY_OXT_MANIFEST:= $(MISC)/$(TARGET)/META-INF/manifest.xml
JAVAFILES = TestExtension.java
# --- Targets ------------------------------------------------------
-ZIP1DEPS=$(MISC)$/$(TARGET)$/$(JARTARGET)\
- $(MISC)$/$(TARGET)$/TestExtension.rdb\
- $(MISC)$/$(TARGET)$/META-INF$/manifest.xml
+ZIP1DEPS=$(MISC)/$(TARGET)/$(JARTARGET)\
+ $(MISC)/$(TARGET)/TestExtension.rdb\
+ $(MISC)/$(TARGET)/META-INF/manifest.xml
.INCLUDE : target.mk
-$(MISC)$/$(TARGET)$/META-INF:
+$(MISC)/$(TARGET)/META-INF:
@-$(MKDIRHIER) $(@)
-$(MISC)$/TestExtension.urd: TestExtension.idl
- $(IDLC) -O$(MISC) -I$(SOLARIDLDIR) -cid -we $<
+$(MISC)/TestExtension.urd: TestExtension.idl
+ $(COMMAND_ECHO)$(IDLC) -O$(MISC) -I$(SOLARIDLDIR) -cid -we $<
-$(MISC)$/$(TARGET)$/META-INF$/manifest.xml $(MISC)$/$(TARGET)$/TestExtension.rdb : $(MISC)$/$(TARGET)$/META-INF
+$(MISC)/$(TARGET)/META-INF/manifest.xml $(MISC)/$(TARGET)/TestExtension.rdb : $(MISC)/$(TARGET)/META-INF
-$(MISC)$/$(TARGET)$/META-INF$/manifest.xml: manifest.xml
- $(COPY) $< $@
+$(MISC)/$(TARGET)/META-INF/manifest.xml: manifest.xml
+ $(COMMAND_ECHO)$(COPY) $< $@
-$(MISC)$/$(TARGET)$/TestExtension.rdb: $(MISC)$/TestExtension.urd
- $(REGMERGE) $@ /UCR $<
+$(MISC)/$(TARGET)/TestExtension.rdb: $(MISC)/TestExtension.urd
+ $(COMMAND_ECHO)$(REGMERGE) $@ /UCR $<
-$(JAVACLASSFILES) .UPDATEALL: $(MISC)$/$(TARGET)$/TestExtension.rdb
- $(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -X$(SOLARBINDIR)/types.rdb $<
+$(JAVACLASSFILES) .UPDATEALL: $(MISC)/$(TARGET)/TestExtension.rdb
+ $(COMMAND_ECHO)$(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -X$(SOLARBINDIR)/types.rdb $<
-$(MISC)$/$(TARGET)$/$(JARTARGET) : $(JARTARGETN)
- $(COPY) $< $@
+$(MISC)/$(TARGET)/$(JARTARGET) : $(JARTARGETN)
+ $(COMMAND_ECHO)$(COPY) $< $@
.ELSE
@all:
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/manifest.xml b/smoketestdoc/com/sun/star/comp/smoketest/manifest.xml
index 7e3e7947aa0f..7e3e7947aa0f 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/manifest.xml
+++ b/smoketestdoc/com/sun/star/comp/smoketest/manifest.xml
diff --git a/smoketestoo_native/data/Events.xml b/smoketestdoc/data/Events.xml
index 61272293f633..414f2c48e884 100644
--- a/smoketestoo_native/data/Events.xml
+++ b/smoketestdoc/data/Events.xml
@@ -28,6 +28,8 @@
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Events" script:language="StarBasic">REM ***** BASIC *****
+Global s_CloseListenerCalled As Boolean
+
Sub PressCancel
gDlgState = cDlgCancel
end Sub
@@ -40,4 +42,25 @@ Sub PressTest
gOptionsDialog.EndExecute()
gDlgState = cDlgStartTest
end Sub
+
+Sub closeListener_queryClosing
+ &apos; not interested in
+ closeListener_queryClosing = TRUE
+End Sub
+
+Sub closeListener_notifyClosing
+ s_CloseListenerCalled = TRUE
+End Sub
+
+Sub closeListener_disposing
+ &apos; not interested in
+End Sub
+
+Sub ResetCloseListenerFlag
+ s_CloseListenerCalled = FALSE
+End Sub
+
+Function HasCloseListenerBeenCalled As Boolean
+ HasCloseListenerBeenCalled = s_CloseListenerCalled
+End Function
</script:module>
diff --git a/smoketestoo_native/data/Global.xml b/smoketestdoc/data/Global.xml
index 1ff082b0a1eb..99c7bf1fe9af 100644
--- a/smoketestoo_native/data/Global.xml
+++ b/smoketestdoc/data/Global.xml
@@ -28,30 +28,36 @@
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Global" script:language="StarBasic">REM ***** BASIC *****
-const cMaxErrorStates = 13
+const cMaxErrorStates = 14
const cCoGreen = 4057917, cCoRed = 16711680, cCoGrey = 12632256
const cParagraphBreak = 0
global const cExtensionFileName = &quot;TestExtension.oxt&quot;
-global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocSaveOpen50 = 3, cDocClose = 4, cDocWrite = 5
+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 cTestClosureSetupDoc = 0, cTestClosureWriteStatus = 1
global const cLogfileFailed = 255
global const cStWriter = 0, cStCalc = 1, cStPraesentation = 2, cStZeichnen = 3
-global const cStMessage = 12, cStHTML = 6, cStChart = 4, cStJava = 7
+global const cStHTML = 6, cStChart = 4, cStJava = 7
global const cStMath = 5, cStDataBase = 9
global const cStExtension = 11
+global const cStTestGlue = 12
global const cStNone = -1
global const cFlt8 = 0, cFlt50 = 32, cFltNewDoc = 64, cFltXML = 128
-global const frmWriter = 1, frmCalc = 2, frmMessage = 3, frmImpress = 4
-global const frmMath = 5, frmImage = 6, frmChart = 7, frmHyperText = 8, frmDraw = 9
+global const frmWriter = 1, frmCalc = 2, frmImpress = 4
+global const frmMath = 5, frmChart = 7, frmHyperText = 8, frmDraw = 9
global const frmDataBase = 10, frmJava = 13
global const frmExtension = 14
+global const frmTestClosure = 15
+
+Global gCurrentDocTest As Integer
+Global gCurrentTestCase As Integer
global const cLogUnknown = 0, cLogFalse = 1, cLogTrue = 2
@@ -83,7 +89,7 @@ Global const cUserFieldTestWriter = &quot;Writer&quot;, cUserFieldTestCalc = &qu
Global const cUserFieldTestDraw = &quot;Draw&quot;, cUserFieldTestMath = &quot;Math&quot;, cUserFieldTestChart = &quot;Chart&quot;
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;, cUserFieldTestOpenSave50 = &quot;SaveOpen50&quot;
+Global const cUserFieldTestOpenSaveXML = &quot;SaveOpenXML&quot;
Global const cUserFieldTestTerminateAfterTest = &quot;Terminate&quot;, cUserFieldTestOpenSave8 = &quot;SaveOpen8&quot;
Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;Standard&quot;
@@ -91,6 +97,7 @@ Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;S
Global const cDlgCancel = 1, cDlgOk = 0, cDlgStartTest = 2
global gErrorState (cMaxErrorStates, 5) as integer
+Global gTestCaseAnnotations( cMaxErrorStates, 5 ) As String
global gOutputDoc as Object
global gOutputDocNotUno as Object
@@ -100,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
@@ -109,42 +116,110 @@ global sExtensionURL as string
Dim gDlgState as Integer
Sub SetGlobalDoc
- gOutPutDoc = ThisComponent
+ gOutputDoc = ThisComponent
end Sub
Sub ClearStatus
for j% = 0 to cMaxErrorStates
for i% = 0 to 5
- gErrorState (j%, i%) = cLogUnknown
+ gErrorState (j%, i%) = cLogUnknown
+ gTestCaseAnnotations( J%, i% ) = ""
next i%
next j%
end Sub
Sub ClearAllText
call SetGlobalDoc
- call ClearDoc (gOutPutDoc)
+ call ClearDoc (gOutputDoc)
call ClearStatus
end Sub
+Sub AssertionHandler( sMessage as String )
+ LogTestResult( &quot;assertion caught: &quot; + sMessage, FALSE )
+End Sub
+
Sub Main
+ On Local Error Goto MainError
+
+ gCurrentDocTest = frmTestClosure
+ gCurrentTestCase = cLogfileFailed
+
+ DeleteAllSavedFiles()
+ DeleteAllLogFiles()
+ SetupWorkPath()
+
+ if GetSystem (sWorkPath) = &quot;windows&quot; then
+ sWorkPath = ConvertPathToWin (sWorkPath)
+ end if
+
+ LocalTestLog% = OpenLogDat( GetLogFileName( gCurrentDocTest ) )
+
+ gCurrentTestCase = cTestClosureSetupDoc
+ CaptureAssertions( "AssertionHandler" )
+
call SetGlobalDoc
+
+ Dim bWasModified as Boolean
+ bWasModified = gOutputDoc.isModified()
+
if bShowTable then
- call ClearDoc (gOutPutDoc)
+ call ClearDoc (gOutputDoc)
end If
call ClearStatus
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+
+ Dim nPreserveFileHandle%
+ nPreserveFileHandle% = LocalTestLog%
Call Test_10er.Main
+ LocalTestLog% = nPreserveFileHandle%
+ gCurrentDocTest = frmTestClosure
+ gCurrentTestCase = cTestClosureWriteStatus
if bShowTable then
call CreateStatusTable2
call CreateStatusTable
call CreateDocState
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+ &apos; do this LogTestResult call before CreateSecondState, since the latter accesses (and displays) the result
call CreateSecondState
gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage
- end if
+ Else
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+ End If
+
+ &apos; print the &apos;test complete&apos; marker
+ Print #LocalTestLog%, &quot;---&quot;
+ LocalTestLog% = 0
+
+ gOutputDoc.setModified( bWasModified )
+
+ CaptureAssertions( &quot;&quot; )
+ Exit Sub
+
+MainError:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot;&quot;, False )
+ Exit Sub
+ else
+ LogTestResult( &quot;testclosure &quot; + GetTestGlueDescription( gCurrentTestCase ), FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
End Sub
+Function GetTestGlueDescription( nTestCase as Integer )
+ Select Case ( nTestCase )
+ case cTestClosureSetupDoc
+ GetTestGlueDescription = &quot;setup&quot;
+ case cTestClosureWriteStatus
+ GetTestGlueDescription = &quot;write_status&quot;
+ case Else
+ GetTestGlueDescription = &quot;&quot;
+ End Select
+End Function
+
Sub CreateStatusTable
dim tableHeaders(7) as string
tableHeaders(cStWriter) = &quot;Writer&quot;
@@ -156,22 +231,17 @@ Sub CreateStatusTable
tableHeaders(cStHTML) = &quot;HTML&quot;
tableHeaders(cStJava) = &quot;Java&quot;
- dim tableColums(3) as string
- tableColums(cDocNew) = &quot;new&quot;
- tableColums(cDocSaveOpen8) = &quot;V8.0&quot;
- tableColums(cDocSaveOpenXML) = &quot;XML&quot;
- tableColums(cDocSaveOpen50) = &quot;V5.0&quot;
-&apos; tableColums(cDocClose) = &quot;close&quot;
+ dim tableRows(3) as string
+ tableRows(cDocNew) = &quot;new&quot;
+ tableRows(cDocSaveOpen8) = &quot;V8.0&quot;
+ tableRows(cDocSaveOpenXML) = &quot;XML&quot;
+ tableRows(cDocClose) = &quot;close&quot;
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
xText = aDoc.Text
xCursor = xText.createTextCursor()
-&apos; xCursor.gotoStart(FALSE)
-&apos; xCursor.GoRight (2, False)
-&apos; SetParagraphBreak (xCursor)
-&apos; SetParagraphBreak (xCursor)
xCursor.gotoStart(FALSE)
xCursor.GoRight (4, False)
SetParagraphBreak (xCursor)
@@ -180,68 +250,48 @@ Sub CreateStatusTable
xCursor.GoRight (1, False)
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
- table.initialize(7,9)
+ table.initialize(5,9)
table.Name = &quot;StTab1&quot;
+ table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
- tableCursor = table.createCursorByCellName(table.CellNames(0))
- tableCursor.gotoStart(FALSE)
- 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)
+ tableCell = table.getCellByPosition( i% + 1, 0 )
+ tableCell.String = tableHeaders( i% )
next i%
- xCursor.gotoStart(FALSE)
-&apos; SetParagraphBreak (xCursor)
-&apos; SetParagraphBreak (xCursor)
-
- tableCursor.gotoStart(FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- for i% = 0 to 3
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ for i% = LBound( tableRows ) to UBound( tableRows )
+ tableCell = table.getCellByPosition( 0, i% + 1 )
+ tableCell.String=tableRows(i%)
next i%
end Sub
Sub CreateStatusTable2
- dim tableHeaders(5) as string
- tableHeaders(cStDataBase-9) = &quot;Database&quot;
+ dim tableHeaders(4) as string
+ tableHeaders(0) = &quot;Database&quot;
tableHeaders(1) = &quot;&quot;
- tableHeaders(cStExtension-9) = &quot;Extension&quot;
+ tableHeaders(2) = &quot;Extension&quot;
tableHeaders(3) = &quot;&quot;
- tableHeaders(4) = &quot;&quot;
+ tableHeaders(4) = &quot;Other&quot;
+
+ dim tableRows(5) as string
+ tableRows(cDBService ) = &quot;services&quot;
+ tableRows(cDBOpen ) = &quot;open&quot;
+ tableRows(cDBInsert ) = &quot;insert&quot;
+ tableRows(cDBDelete ) = &quot;delete&quot;
+ tableRows(cDBSeek ) = &quot;seek&quot;
+ tableRows(cDBClose ) = &quot;close&quot;
- dim tableColums(5) as string
- tableColums(cDBService ) = &quot;services&quot;
- tableColums(cDBOpen ) = &quot;open&quot;
- tableColums(cDBInsert ) = &quot;insert&quot;
- tableColums(cDBDelete ) = &quot;delete&quot;
- tableColums(cDBSeek ) = &quot;seek&quot;
- tableColums(cDBClose ) = &quot;close&quot;
+ dim tableRows2(2) as string
+ tableRows2(cEXTService ) = &quot;services&quot;
+ tableRows2(cEXTInstall ) = &quot;install&quot;
+ tableRows2(cEXTUninstall ) = &quot;uninstall&quot;
- dim tableColums2(3) as string
- tableColums2(cEXTService ) = &quot;services&quot;
- tableColums2(cEXTInstall ) = &quot;install&quot;
- tableColums2(cEXTUninstall ) = &quot;uninstall&quot;
+ dim tableRows3(1) as string
+ tableRows3(cTestClosureSetupDoc ) = &quot;setup test&quot;
+ tableRows3(cTestClosureWriteStatus ) = &quot;write test result&quot;
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
xText = aDoc.Text
xCursor = xText.createTextCursor()
@@ -255,111 +305,98 @@ Sub CreateStatusTable2
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
table.initialize(7,6)
table.Name = &quot;StTab2&quot;
- &apos;table.RelativeWidth =500
+ table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
- tableCursor = table.createCursorByCellName(table.CellNames(0))
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(1,FALSE)
-
- for i% = 0 to 5
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableHeaders(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- tableCursor.goRight(1,FALSE)
+ for i% = LBound( tableHeaders ) to UBound( tableHeaders )
+ 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% = 0 to 5
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ for i% = LBound( tableRows ) to UBound( tableRows )
+ tableCell = table.getCellByPosition( 0, i% + 1 )
+ tableCell.String=tableRows(i%)
next i%
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(2,FALSE)
-
- for i% = 0 to 3
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums2(i%)
+ for i% = LBound( tableRows2 ) to UBound( tableRows2 )
+ tableCell = table.getCellByPosition( 2, i% + 1 )
+ tableCell.String=tableRows2(i%)
+ next i%
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ for i% = LBound( tableRows3 ) to UBound( tableRows3 )
+ tableCell = table.getCellByPosition( 4, i% + 1 )
+ tableCell.String=tableRows3(i%)
next i%
end Sub
Sub CreateDocState
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
table = aDoc.TextTables.GetByIndex (1)
- &apos;table = aDoc.TextTables.GetByName (&quot;StTab1&quot;)
for j% = 0 to 7
- for i% = 0 to 5
+ for i% = 0 to 3
sRangeName = GetRangeName(j%, i%+1)
tableCursor = table.createCursorByCellName(sRangeName)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
-
- xCell.BackTransparent = False
-
- if gErrorState (j%, i%) = cLogTrue then
- xCell.BackColor = cCoGreen
- else if gErrorState (j%, i%) = cLogFalse then
- xCell.BackColor = cCoRed
- else
- xCell.BackColor = cCoGrey
- end If
- end If
-
+ cName = tableCursor.getRangeName()
+ xCell = table.getCellByName(cName)
+
+ xCell.BackTransparent = False
+
+ If gErrorState (j%, i%) = cLogTrue Then
+ xCell.BackColor = cCoGreen
+ else
+ If gErrorState (j%, i%) = cLogFalse Then
+ xCell.BackColor = cCoRed
+ If ( gTestCaseAnnotations( j%, i% ) &lt;&gt; "" ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ annotation.Content = gTestCaseAnnotations( j%, i% )
+ xCell.insertTextContent( xCell, annotation, false )
+ End If
+ else
+ xCell.BackColor = cCoGrey
+ end If
+ end If
next i%
next j%
end Sub
Sub CreateSecondState
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
table = aDoc.TextTables.GetByIndex (0)
- &apos;table = aDoc.TextTables.GetByName (&quot;StTab2&quot;)
-
- for j% = 0 to cMaxErrorStates-9
- for i% = 0 to 5
- sRangeName = GetRangeName(j%, i%+1)
-
- tableCursor = table.createCursorByCellName(sRangeName)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
-
- xCell.BackTransparent = False
-
- if gErrorState (j%+9, i%) = cLogTrue then
- xCell.BackColor = cCoGreen
- else if gErrorState (j%+9, i%) = cLogFalse then
- xCell.BackColor = cCoRed
- else
- xCell.BackColor = cCoGrey
- end If
+ Dim stateIndex(2) as Integer
+ stateIndex(0) = cStDataBase
+ stateIndex(1) = cStExtension
+ stateIndex(2) = cStTestGlue
+
+ Dim j as Integer
+ For j = LBound( stateIndex ) To UBound( stateIndex )
+ for i% = 1 to 6
+ tableCell = table.getCellByPosition( 2 * j + 1, i% )
+ tableCell.BackTransparent = False
+
+ if gErrorState( stateIndex(j), i% - 1 ) = cLogTrue then
+ tableCell.BackColor = cCoGreen
+ else
+ if gErrorState ( stateIndex(j), i% - 1 ) = cLogFalse then
+ tableCell.BackColor = cCoRed
+ If ( gTestCaseAnnotations( stateIndex(j), i% - 1 ) &lt;&gt; &quot;&quot; ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ annotation.Content = gTestCaseAnnotations( stateIndex(j), i% - 1 )
+ tableCell.insertTextContent( tableCell, annotation, false )
+ End If
+ else
+ tableCell.BackColor = cCoGrey
+ end If
end If
-
next i%
next j%
end Sub
@@ -368,11 +405,33 @@ Function GetRangeName (nColumn as integer, nRow as integer) as string
GetRangeName = chr (nColumn+66) + Trim(Str(nRow+1))
end Function
-Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean)
+Sub LogTestResult( sTestCaseDescription as String, bSuccess as Boolean )
+ If ( gCurrentTestCase = cLogfileFailed ) Then
+ Dim sAnnotation as String
+ sAnnotation = &quot;creating logfile &apos;&quot; + GetLogFileName( gCurrentDocTest ) + &quot;&apos; failed&quot;
+ LogState( FALSE, sAnnotation, GlobalTestLog )
+ RecordTestCaseStatus( 0, FALSE, sAnnotation )
+ Else
+ bSuccess = RecordTestCaseStatus( gCurrentTestCase, bSuccess, sTestCaseDescription )
+ If ( LocalTestLog &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, LocalTestLog )
+ EndIf
+ if ( GlobalTestLog &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, GlobalTestLog )
+ EndIf
+ End If
+End Sub
+
+Function RecordTestCaseStatus( nAction as Integer, bState as Boolean, sFailureAnnotation as String ) as Boolean
Dim nStatusType as Integer
Dim nState as integer
- nStatusType = GetStatusType (nDocType)
- If nStatusType = cStNone then Exit Sub
+ nStatusType = GetStatusType( gCurrentDocTest )
+ If nStatusType = cStNone then Exit Function
+
+ If ( gErrorState( nStatusType, nAction ) = cLogFalse ) Then
+ &apos; don't overwrite a previous &quot;failed&quot; state for this test
+ bState = FALSE
+ End If
if bState then
nState = cLogTrue
@@ -381,30 +440,34 @@ Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean)
end If
gErrorState (nStatusType, nAction) = nState
-end Sub
+
+ If ( nState = cLogFalse ) And ( sFailureAnnotation &lt;&gt; &quot;&quot; ) Then
+ gTestCaseAnnotations( nStatusType, nAction ) = gTestCaseAnnotations( nStatusType, nAction ) + sFailureAnnotation + chr(13)
+ End If
+
+ RecordTestCaseStatus = bState
+End Function
Function GetStatusType (nDocType as Integer) as Integer
Select Case ( nDocType )
case frmWriter
- GetStatusType = cStWriter &apos; Textdokument
+ GetStatusType = cStWriter &apos; text document
case frmCalc
- GetStatusType = cStCalc &apos;Tabellendokument
- case frmMessage
- GetStatusType = cStMessage &apos;Nachricht
+ GetStatusType = cStCalc &apos; spreadsheet document
case frmImpress
- GetStatusType = cStPraesentation &apos;Präsentation
+ GetStatusType = cStPraesentation &apos; presentation
case frmDraw
- GetStatusType = cStZeichnen &apos;Zeichnen
+ GetStatusType = cStZeichnen &apos; drawing
case frmMath
- GetStatusType = cStMath &apos;Formel
- case frmImage
- GetStatusType = cStBild &apos;Bild
+ GetStatusType = cStMath &apos; formula
case frmHyperText
- GetStatusType = cStHTML &apos;Hypertext-Dokument
+ GetStatusType = cStHTML &apos; HTML document
case frmChart
- GetStatusType = cStChart &apos;Diagramm
+ GetStatusType = cStChart &apos; chart
case frmJava
GetStatusType = cStJava &apos;Java
+ case frmTestClosure
+ GetStatusType = cStTestGlue &apos; test framework
case frmDataBase
GetStatusType = cStDataBase &apos;DataBase
case frmExtension
@@ -494,56 +557,53 @@ end Sub
Sub SetOptions
call SetGlobalDoc
- SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl(&quot;cbWriterTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutPutDoc)
- 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 (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutPutDoc)
+ SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl(&quot;cbWriterTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutputDoc)
+ 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 (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutputDoc)
end Sub
Sub GetOptions
call SetGlobalDoc
- gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutPutDoc)))
- 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;cbSaveOpen50Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)))
+ gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutputDoc)))
+ 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;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)))
End Sub
Sub ReadOptions
call SetGlobalDoc
- bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutPutDoc)
- bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutPutDoc)
- bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutPutDoc)
- bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutPutDoc)
- bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutPutDoc)
- bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutPutDoc)
- bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutPutDoc)
- bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutPutDoc)
- bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc)
- bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutPutDoc)
- bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)
- bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc)
- bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)
- bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)
+ bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutputDoc)
+ bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutputDoc)
+ bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutputDoc)
+ bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutputDoc)
+ bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutputDoc)
+ bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutputDoc)
+ bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutputDoc)
+ bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutputDoc)
+ bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)
+ bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc)
+ bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)
+ bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)
+ bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)
end Sub
Sub SetDefaultOptions
@@ -565,11 +625,6 @@ 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
- bMakeSaveOpen50Test = false
- else
- bMakeSaveOpen50Test = true
- End If
bMakeSaveOpen8Test = true
bMakeTerminateAfterTest = false
end Sub
@@ -579,8 +634,8 @@ Sub StartTestByOptions
call ReadOptions
call Main
if bMakeTerminateAfterTest then
- ClearDocFull (gOutPutDoc)
- gOutPutDoc.dispose
+ ClearDocFull (gOutputDoc)
+ gOutputDoc.dispose
&apos;StarDesktop.Terminate
&apos;EnableReschedule( false )
@@ -608,7 +663,7 @@ Function StartTestWithDefaultOptions
action(cDocNew) = &quot;new&quot;
action(cDocSaveOpen8) = &quot;V8.0&quot;
action(cDocSaveOpenXML) = &quot;XML&quot;
- action(cDocSaveOpen50) = &quot;V5.0&quot;
+ action(cDocClose) = &quot;close&quot;
dim baseAction(5) as string
baseAction(cDBService) = &quot;services&quot;
baseAction(cDBOpen) = &quot;open&quot;
diff --git a/smoketestoo_native/data/OptionsDlg.xml b/smoketestdoc/data/OptionsDlg.xml
index 213c880d4d51..c03026185886 100644
--- a/smoketestoo_native/data/OptionsDlg.xml
+++ b/smoketestdoc/data/OptionsDlg.xml
@@ -28,35 +28,37 @@
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="OptionsDlg" dlg:left="173" dlg:top="100" dlg:width="223" dlg:height="214" dlg:closeable="true" dlg:moveable="true" dlg:title="Options for smoketest">
<dlg:bulletinboard>
- <dlg:titledbox dlg:id="fmTests" dlg:tab-index="0" dlg:left="114" dlg:top="7" dlg:width="101" dlg:height="157">
+ <dlg:titledbox dlg:id="fmTests" dlg:tab-index="0" dlg:left="114" dlg:top="7" dlg:width="100" dlg:height="157">
<dlg:title dlg:value="Tests"/>
</dlg:titledbox>
- <dlg:titledbox dlg:id="fmInstalls" dlg:tab-index="1" dlg:left="7" dlg:top="7" dlg:width="100" dlg:height="157">
+ <dlg:checkbox dlg:id="cbWriterTest" dlg:tab-index="1" dlg:left="19" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Writer" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbCalcTest" dlg:tab-index="2" dlg:left="19" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Calc" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbImpressTest" dlg:tab-index="3" dlg:left="19" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Impress" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbDrawTest" dlg:tab-index="4" dlg:left="19" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Draw" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbHTMLTest" dlg:tab-index="5" dlg:left="19" dlg:top="77" dlg:width="80" dlg:height="8" dlg:value="HTML" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbMathTest" dlg:tab-index="6" dlg:left="19" dlg:top="91" dlg:width="80" dlg:height="8" dlg:value="Math" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbChartTest" dlg:tab-index="7" dlg:left="19" dlg:top="105" dlg:width="80" dlg:height="8" dlg:value="Chart" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbJavaTest" dlg:tab-index="8" dlg:left="19" dlg:top="119" dlg:width="80" dlg:height="8" dlg:value="Java" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbDatabaseTest" dlg:tab-index="9" dlg:left="19" dlg:top="133" dlg:width="80" dlg:height="8" dlg:value="Database" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbExtensionTest" dlg:tab-index="10" dlg:left="19" dlg:top="147" dlg:width="80" dlg:height="8" dlg:value="Extension" dlg:checked="false"/>
+
+ <dlg:titledbox dlg:id="fmInstalls" dlg:tab-index="11" dlg:left="7" dlg:top="7" dlg:width="100" dlg:height="157">
<dlg:title dlg:value="Functions"/>
</dlg:titledbox>
- <dlg:checkbox dlg:id="cbWriterTest" dlg:tab-index="2" dlg:left="126" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Writer" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbCalcTest" dlg:tab-index="3" dlg:left="126" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Calc" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbImpressTest" dlg:tab-index="4" dlg:left="126" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Impress" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbDrawTest" dlg:tab-index="5" dlg:left="126" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Draw" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbHTMLTest" dlg:tab-index="6" dlg:left="126" dlg:top="77" dlg:width="80" dlg:height="8" dlg:value="HTML" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbMathTest" dlg:tab-index="7" dlg:left="126" dlg:top="91" dlg:width="80" dlg:height="8" dlg:value="Math" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbChartTest" dlg:tab-index="8" dlg:left="126" dlg:top="105" dlg:width="80" dlg:height="8" dlg:value="Chart" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbSaveOpenXMLTest" dlg:tab-index="9" dlg:left="19" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Save / Open XML" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbSaveOpen50Test" dlg:tab-index="10" dlg:left="19" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Save / Open V5.0" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="11" dlg:disabled="true" dlg:left="19" dlg:top="174" dlg:width="190" dlg:height="8" dlg:value="Terminate Office after test" dlg:checked="false"/>
- <dlg:titledbox dlg:id="fmBroker" dlg:tab-index="12" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
- <dlg:button dlg:id="btOk" dlg:tab-index="13" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok">
+ <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: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"/>
+
+ <dlg:button dlg:id="btOk" dlg:tab-index="17" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok" dlg:default="true">
<script:event script:event-name="on-performaction" script:location="document" script:macro-name="Standard.Events.PressOk" script:language="StarBasic"/>
</dlg:button>
- <dlg:button dlg:id="btCancel" dlg:tab-index="14" dlg:left="80" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Cancel" dlg:button-type="ok">
+ <dlg:button dlg:id="btCancel" dlg:tab-index="18" dlg:left="80" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Cancel" dlg:button-type="ok">
<script:event script:event-name="on-performaction" script:location="document" script:macro-name="Standard.Events.PressCancel" script:language="StarBasic"/>
</dlg:button>
- <dlg:button dlg:id="btStart" dlg:tab-index="15" dlg:left="152" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Smoketest">
+ <dlg:button dlg:id="btStart" dlg:tab-index="19" dlg:left="152" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Smoketest">
<script:event script:event-name="on-performaction" script:location="vnd.sun.star.script" script:macro-name="Standard.Events.PressTest?language=Basic&amp;location=document" script:language="Script"/>
</dlg:button>
- <dlg:checkbox dlg:id="cbJavaTest" dlg:tab-index="16" dlg:left="126" dlg:top="119" dlg:width="80" dlg:height="8" dlg:value="Java" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbSaveOpen8Test" dlg:tab-index="17" dlg:left="19" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Save / Open V8.0" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbDatabaseTest" dlg:tab-index="18" dlg:left="126" dlg:top="133" dlg:width="80" dlg:height="8" dlg:value="Database" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbExtensionTest" dlg:tab-index="19" dlg:left="126" dlg:top="147" dlg:width="80" dlg:height="8" dlg:value="Extension" dlg:checked="false"/>
</dlg:bulletinboard>
</dlg:window>
diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestdoc/data/Test_10er.xml
index 56a8d130fc13..b929caccb1b8 100644
--- a/smoketestoo_native/data/Test_10er.xml
+++ b/smoketestdoc/data/Test_10er.xml
@@ -30,12 +30,13 @@
const sSWLogFileName = &quot;swlog.dat&quot;, sSCLogFileName = &quot;sclog.dat&quot;
const sSDLogFileName = &quot;sdlog.dat&quot;, sSMathLogFileName = &quot;smalog.dat&quot;
-const sSImDLogFileName = &quot;simlog.dat&quot;, sSChartLogFileName = &quot;schlog.dat&quot;
-const sSHptLogFileName = &quot;shptlog.dat&quot;, sSMessageLogFileName = &quot;smeslog.dat&quot;
+const sSChartLogFileName = &quot;schlog.dat&quot;
+const sSHptLogFileName = &quot;shptlog.dat&quot;
const sSDrawLogFileName = &quot;sdrwlog.dat&quot;, sJavaLogFileName = &quot;javalog.dat&quot;
const sSDBLogFileName = &quot;dblog.dat&quot;, sExtLogFileName = &quot;extlog.dat&quot;
-const sLogFileName = &quot;log.dat&quot;
-const cTempFileName = &quot;ttt&quot;
+const sTestGlueLogFileName = &quot;testclosure.log&quot;
+const sLogFileName = &quot;smoketest.log&quot;
+const cTempFileName = &quot;smoketest_file&quot;
const cMessageSaveOpen8Doc = &quot;Save/Open open Documents (8.0)&quot;
const cMessageSaveOpenXMLDoc = &quot;Save/Open Document XML (6/7)&quot;
@@ -44,8 +45,8 @@ const cMessageCloseDoc = &quot;Close Document&quot;
Global sWorkPath$
Global sWorkPathURL$
-Global FileChannel%
-Global MainFileChannel%
+Global LocalTestLog%
+Global GlobalTestLog%
Sub Main
call TestAllDocs()
@@ -107,24 +108,21 @@ Sub DeleteAllLogFiles()
If FileExists (sWorkPath+sSMathLogFileName) then
Kill (sWorkPath+sSMathLogFileName)
End If
- If FileExists (sWorkPath+sSImDLogFileName) then
- Kill (sWorkPath+sSImDLogFileName)
- End If
If FileExists (sWorkPath+sSChartLogFileName) then
Kill (sWorkPath+sSChartLogFileName)
End If
If FileExists (sWorkPath+sSHptLogFileName) then
Kill (sWorkPath+sSHptLogFileName)
End If
- If FileExists (sWorkPath+sSMessageLogFileName) then
- Kill (sWorkPath+sSMessageLogFileName)
- End If
If FileExists (sWorkPath+sSDrawLogFileName) then
Kill (sWorkPath+sSDrawLogFileName)
End If
If FileExists (sWorkPath+sJavaLogFileName) then
Kill (sWorkPath+sJavaLogFileName)
End If
+ If FileExists (sWorkPath+sTestGlueLogFileName) then
+ Kill (sWorkPath+sTestGlueLogFileName)
+ End If
If FileExists (sWorkPath+sSDBLogFileName) then
Kill (sWorkPath+sSDBLogFileName)
End If
@@ -143,15 +141,13 @@ Function OpenLogDat (sFileName as String) as Integer
OpenLogDat = LocaleFileChannel%
end Function
-Function GetWorkPath as string
- sTemp = &quot;$(userpath)/temp/&quot;
- GetWorkPath = CreateUnoService(&quot;com.sun.star.config.SpecialConfigManager&quot;).SubstituteVariables(sTemp)
-End Function
+Sub SetupWorkPath
+ Dim configManager as Object
+ configManager = CreateUnoService( &quot;com.sun.star.config.SpecialConfigManager&quot; )
-Function GetWorkURL as string
- sTemp = &quot;$(userurl)/temp/&quot;
- GetWorkURL = CreateUnoService(&quot;com.sun.star.config.SpecialConfigManager&quot;).SubstituteVariables(sTemp)
-End Function
+ sWorkPath = configManager.SubstituteVariables( &quot;$(userpath)/temp/&quot; )
+ sWorkPathURL = configManager.SubstituteVariables( &quot;$(userurl)/temp/&quot; )
+End Sub
Function GetSystem (sTmpWorkPath as string) as string
GetSystem = &quot;&quot;
@@ -180,100 +176,104 @@ Sub TestAllDocs()
DIM sDocURL as String, sDocPath as String
DIM nStrPos as Long
- sWorkPath = GetWorkPath
- sWorkPathURL = GetWorkURL
-
- if GetSystem (sWorkPath) = &quot;windows&quot; then
- sWorkPath = ConvertPathToWin (sWorkPath)
- end if
-
&apos;search ExtensionURL
- sDocURL = gOutPutDoc.URL
+ sDocURL = gOutputDoc.URL
CompatibilityMode(true)
nStrPos = InStrRev (sDocURL, &quot;/&quot; )
CompatibilityMode(false)
sExtensionURL = Left (sDocURL, nStrPos)
- call DeleteAllSavedFiles()
- call DeleteAllLogFiles()
- MainFileChannel = OpenLogDat (sLogFileName)
- call WriteTestSequence (MainFileChannel)
+ GlobalTestLog = OpenLogDat (sLogFileName)
+ call WriteTestSequence
if bMakeWriterTest then
- call MakeDocTest (frmWriter)
+ gCurrentDocTest = frmWriter
+ call MakeDocTest
end if
if bMakeCalcTest then
- call MakeDocTest (frmCalc)
+ gCurrentDocTest = frmCalc
+ call MakeDocTest
end if
if bMakeImpressTest then
- call MakeDocTest (frmImpress)
+ gCurrentDocTest = frmImpress
+ call MakeDocTest
end if
if bMakeDrawTest then
- call MakeDocTest (frmDraw)
+ gCurrentDocTest = frmDraw
+ call MakeDocTest
end if
if bMakeHTMLTest then
- call MakeDocTest (frmHyperText)
+ gCurrentDocTest = frmHyperText
+ call MakeDocTest
end if
if bMakeChartTest then
- call MakeChartTest (frmChart)
+ gCurrentDocTest = frmChart
+ call MakeChartTest
end if
if bMakeMathTest then
- call MakeNewDoc (frmMath)
+ gCurrentDocTest = frmMath
+ call MakeNewDoc
end if
if bMakeJavaTest then
- call TestJava (frmJava)
+ gCurrentDocTest = frmJava
+ call TestJava
end if
if bMakeDBTest then
- call Test_DB.TestDB (frmDataBase)
+ gCurrentDocTest = frmDataBase
+ call Test_DB.TestDB
end if
if bMakeExtensionTest then
- call Test_Ext.TestExtensions (frmExtension)
+ gCurrentDocTest = frmExtension
+ call Test_Ext.TestExtensions
end if
- Close #MainFileChannel
+ Close #GlobalTestLog
+ GlobalTestLog = 0
end Sub
-Sub WriteTestSequence (FileChannel as integer)
- Print #FileChannel, &quot;Sequence of testing&quot;
+Sub WriteTestSequence
+ Print #GlobalTestLog, &quot;Sequence of testing&quot;
if bMakeWriterTest then
- WriteTests (&quot;writer : &quot;, true, FileChannel)
+ WriteTests (&quot;writer : &quot;, true, GlobalTestLog)
end if
if bMakeCalcTest then
- WriteTests (&quot;calc : &quot;, true, FileChannel)
+ WriteTests (&quot;calc : &quot;, true, GlobalTestLog)
end if
if bMakeImpressTest then
- WriteTests (&quot;impress : &quot;, true, FileChannel)
+ WriteTests (&quot;impress : &quot;, true, GlobalTestLog)
end if
if bMakeDrawTest then
- WriteTests (&quot;draw : &quot;, true, FileChannel)
+ WriteTests (&quot;draw : &quot;, true, GlobalTestLog)
end if
if bMakeHTMLTest then
- WriteTests (&quot;HTML : &quot;, true, FileChannel)
+ WriteTests (&quot;HTML : &quot;, true, GlobalTestLog)
end if
if bMakeChartTest then
- WriteTests (&quot;chart : &quot;, false, FileChannel)
+ WriteTests (&quot;chart : &quot;, false, GlobalTestLog)
end if
if bMakeMathTest then
- WriteTests (&quot;math : &quot;, false, FileChannel)
+ WriteTests (&quot;math : &quot;, false, GlobalTestLog)
end if
if bMakeJavaTest then
- WriteTests (&quot;Java : &quot;, false, FileChannel)
+ WriteTests (&quot;Java : &quot;, false, GlobalTestLog)
end if
if bMakeDBTest then
- WriteDBTests (&quot;Database : &quot;, FileChannel)
+ WriteDBTests (&quot;Database : &quot;, GlobalTestLog)
end if
if bMakeExtensionTest then
- WriteExtensionTests (&quot;Extension : &quot;, FileChannel)
- end if
+ WriteExtensionTests (&quot;Extension : &quot;, GlobalTestLog)
+ end if
- Print #FileChannel
-end Sub
+ Print #GlobalTestLog, &quot;testclosure : setup, write_status&quot;
-Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
- Dim sWriteStr as string
+ Print #GlobalTestLog
+ end Sub
- sWriteStr = sText
- sWriteStr = sWriteStr + &quot;new&quot;
+ Sub WriteTests (sText as string, bTestAll as boolean)
+ Dim sWriteStr as string
+
+ sWriteStr = sText
+ sWriteStr = sWriteStr + &quot;new&quot;
if bTestAll then
if bMakeSaveOpen8Test then
sWriteStr = sWriteStr + &quot;, save 8.0&quot;
@@ -291,7 +291,7 @@ Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
sWriteStr = sWriteStr + &quot;, close&quot;
- Print #nFileChannel, sWriteStr
+ Print #GlobalTestLog, sWriteStr
end Sub
Sub WriteDBTests (sText as string, nFileChannel as integer)
@@ -318,168 +318,142 @@ Sub WriteExtensionTests (sText as string, nFileChannel as integer)
Print #nFileChannel, sWriteStr
end Sub
-Sub MakeDocTest (FilterType as Integer)
+Sub MakeDocTest
Dim oDoc as Object
Dim sFileNameXML$, sFileName8$
- Dim bError as Boolean
- Dim nCurrentAction as Integer
+ Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oDoc))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ 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
- nCurrentAction = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
- sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt8)
- SaveDoc (sFileName8, oDoc, GetDocFilter(FilterType 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
- nCurrentAction = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
- sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFltXML)
- SaveDoc (sFileNameXML, oDoc, GetDocFilter(FilterType or cFltXML))
+ gCurrentTestCase = cDocSaveOpenXML
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
+ sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFltXML)
+ SaveDoc (sFileNameXML, oDoc, GetDocFilter(gCurrentDocTest or cFltXML))
end if
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
- oDoc.close (true)
-&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
-&apos; SetStatus (FilterType, cDocClose, bError)
- nCurrentAction = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
+ gCurrentTestCase = cDocClose
+ bSuccess = CloseDoc( oDoc )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
oDoc = LoadDoc (sFileName8)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, MainFileChannel)
- SetStatus (FilterType, cDocSaveOpen8, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
if not IsNull (oDoc) then
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
+ gCurrentTestCase = cDocClose
oDoc.close (true)
end If
end if
- nCurrentAction = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
+ gCurrentTestCase = cDocSaveOpenXML
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
oDoc = LoadDoc (sFileNameXML)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, MainFileChannel)
- SetStatus (FilterType, cDocSaveOpenXML, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, 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 #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
DOCTESTERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
-Sub MakeNewDoc (FilterType as Integer)
+Sub MakeNewDoc
DIM oDoc as Object
- Dim bError as Boolean
- Dim nCurrentAction as Integer
+ Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR2
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
-&apos; oDoc = Documents.Add(GetDocFilter(FilterType))
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oDoc))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+&apos; oDoc = Documents.Add(GetDocFilter(gCurrentDocTest))
+ 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
- nCurrentAction = cDocClose
-&apos; oDoc.dispose
- oDoc.close (true)
-&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
-&apos; SetStatus (FilterType, cDocClose, bError)
+ gCurrentTestCase = cDocClose
+ bSuccess = CloseDoc( oDoc )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
end If
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
DOCTESTERROR2:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
-Sub MakeChartTest (FilterType as Integer)
+Sub MakeChartTest
Dim oCharts as Object
Dim oDoc as Object
Dim oRange(0) as New com.sun.star.table.CellRangeAddress
Dim oRect as New com.sun.star.awt.Rectangle
const cChartName=&quot;TestChart&quot;
- Dim bError as Boolean
- Dim nCurrentAction as Integer
- On Local Error GoTo CHARTTESTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(frmCalc or cFltNewDoc))
+ Dim bSuccess as Boolean
+ On Local Error GoTo CHARTTESTERROR
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(frmCalc or cFltNewDoc))
if not IsNull (oDoc) then
oCharts = oDoc.sheets(0).Charts
oCharts.AddNewByName (cChartName, oRect, oRange(), true, true)
- bError=oCharts.HasByName(cChartName)
- LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, bError)
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
+ bSuccess=oCharts.HasByName(cChartName)
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, bSuccess )
+ gCurrentTestCase = cDocClose
oDoc.close (true)
else
- LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (frmCalc, cDocNew, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FALSE )
End if
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
CHARTTESTERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
@@ -520,48 +494,44 @@ end Function
Function GetDocFilter (DocType as Integer) as String
Select Case ( DocType )
case frmWriter or cFlt8
- GetDocFilter = &quot;writer8&quot; &apos; Textdokument
+ GetDocFilter = &quot;writer8&quot; &apos; text document
case frmCalc or cFlt8
- GetDocFilter = &quot;calc8&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;calc8&quot; &apos; spreadsheet document
case frmImpress or cFlt8
- GetDocFilter = &quot;impress8&quot; &apos;Präsentation
+ GetDocFilter = &quot;impress8&quot; &apos; presentation
case frmDraw or cFlt8
- GetDocFilter = &quot;draw8&quot; &apos;Zeichen
+ GetDocFilter = &quot;draw8&quot; &apos; drawing
case frmMath or cFlt8
- GetDocFilter = &quot;math8&quot; &apos;Formel
+ GetDocFilter = &quot;math8&quot; &apos; formula
case frmWriter or cFltXML
- GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; Textdokument
+ GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; text document
case frmCalc or cFltXML
- GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos; spreadsheet document
case frmImpress or cFltXML
- GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos;Präsentation
+ GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos; presentation
case frmDraw or cFltXML
- GetDocFilter = &quot;StarOffice XML (Draw)&quot; &apos;Zeichen
+ GetDocFilter = &quot;StarOffice XML (Draw)&quot; &apos; drawing
case frmMath or cFltXML
- GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos;Formel
+ GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos; formula
case frmHyperText, frmHyperText or cFltXML
- GetDocFilter = &quot;HTML&quot; &apos;Hypertext-Dokument
+ GetDocFilter = &quot;HTML&quot; &apos; HTML document
case frmWriter or cFltNewDoc
- GetDocFilter = &quot;swriter&quot; &apos; Textdokument
+ GetDocFilter = &quot;swriter&quot; &apos; text document
case frmCalc or cFltNewDoc
- GetDocFilter = &quot;scalc&quot; &apos;Tabellendokument
- case frmMessage or cFltNewDoc
- GetDocFilter = &quot;Message&quot; &apos;Nachricht
+ GetDocFilter = &quot;scalc&quot; &apos; spreadsheet document
case frmImpress or cFltNewDoc
- GetDocFilter = &quot;simpress&quot; &apos;Präsentation
+ GetDocFilter = &quot;simpress&quot; &apos; presentation
case frmDraw or cFltNewDoc
- GetDocFilter = &quot;sdraw&quot; &apos;Zeichen
+ GetDocFilter = &quot;sdraw&quot; &apos; drawing
case frmMath or cFltNewDoc
- GetDocFilter = &quot;smath&quot; &apos;Formel
- case frmImage or cFltNewDoc
- GetDocFilter = &quot;simage&quot; &apos;Bild
+ GetDocFilter = &quot;smath&quot; &apos; formula
case frmHyperText or cFltNewDoc
- GetDocFilter = &quot;swriter/web&quot; &apos;Hypertext-Dokument
+ GetDocFilter = &quot;swriter/web&quot; &apos; HTML document
case frmChart or cFltNewDoc
- GetDocFilter = &quot;schart&quot; &apos;Diagramm
+ GetDocFilter = &quot;schart&quot; &apos; chart
case else
GetDocFilter = &quot;&quot;
end Select
@@ -570,25 +540,23 @@ end Function
Function GetLogFileName (DocType as Integer) as String
Select Case ( DocType )
case frmWriter
- GetLogFileName = sSWLogFileName &apos; Textdokument
+ GetLogFileName = sSWLogFileName &apos; text document
case frmCalc
- GetLogFileName = sSCLogFileName &apos;Tabellendokument
- case frmMessage
- GetLogFileName = sSMessageLogFileName &apos;Nachricht
+ GetLogFileName = sSCLogFileName &apos; spreadsheet document
case frmImpress
- GetLogFileName = sSDLogFileName &apos;PrÕsentation
+ GetLogFileName = sSDLogFileName &apos; presentation
case frmDraw
- GetLogFileName = sSDrawLogFileName &apos;Zeichnen
+ GetLogFileName = sSDrawLogFileName &apos; drawing
case frmMath
- GetLogFileName = sSMathLogFileName &apos;Formel
- case frmImage
- GetLogFileName = sSImDLogFileName &apos;Bild
+ GetLogFileName = sSMathLogFileName &apos; formula
case frmHyperText
- GetLogFileName = sSHptLogFileName &apos;Hypertext-Dokument
+ GetLogFileName = sSHptLogFileName &apos; HTML document
case frmChart
- GetLogFileName = sSChartLogFileName &apos;Diagramm
+ GetLogFileName = sSChartLogFileName &apos; chart
case frmJava
GetLogFileName = sJavaLogFileName &apos;Java
+ case frmTestClosure
+ GetLogFileName = sTestGlueLogFileName &apos; test framework
case frmDataBase
GetLogFileName = sSDBLogFileName &apos;Database
case frmExtension
@@ -620,16 +588,17 @@ Function IsFilterAvailable (FilterType as Integer) as boolean
end if
End Function
-Function TestJava (FilterType as Integer) as boolean
+Function TestJava
Dim oObj as Object
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- oObj = createUnoService(cUnoJavaLoader)
- LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oObj))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oObj = createUnoService( cUnoJavaLoader )
+ LogTestResult( &quot;Java &quot;+ cMessageNewDoc, not IsNull (oObj) )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
TestJava = not IsNull (oObj)
End Function
@@ -694,4 +663,19 @@ Sub SaveDoc (DocName as String, oDoc as Object, sFilterName as string )
MessageBox &quot;Filtername is unknown!&quot;
end if
end Sub
+
+Function CloseDoc( oDoc as Object )
+ Dim oListener as Object
+ oListener = CreateUnoListener( "Events.closeListener_", "com.sun.star.util.XCloseListener" )
+ oDoc.addCloseListener( oListener )
+
+ Events.ResetCloseListenerFlag()
+ oDoc.close( true )
+ closeDoc = Events.HasCloseListenerBeenCalled()
+
+ if ( Not Events.HasCloseListenerBeenCalled() ) Then
+ &apos; do this only if closing was not successful - otherwise, we'd get a DisposedException
+ oDoc.removeCloseListener( oListener )
+ End If
+End Function
</script:module>
diff --git a/smoketestoo_native/data/Test_DB.xml b/smoketestdoc/data/Test_DB.xml
index 34ade11f75fb..1f5667cae5a5 100644
--- a/smoketestoo_native/data/Test_DB.xml
+++ b/smoketestdoc/data/Test_DB.xml
@@ -35,59 +35,53 @@ const cMessageDatabaseDelete = &quot;Delete record from Database&quot;
const cMessageDatabaseSeek = &quot;Read other record from Database&quot;
const cMessageDatabaseClose = &quot;Close Database&quot;
-Sub TestDB (FilterType as Integer)
-
-Dim oDBConnection as Object, oDataSource as Object, oDBContext as Object
-Dim sDBName as String, sTable as String, sCurrentMessage as String
-Dim nRowCount as Integer, nCurrentAction as Integer
-Dim bResult as Boolean
-Const sTestString = &quot;Automatical Test&quot;
+Sub TestDB
+ Dim oDBConnection as Object, oDataSource as Object, oDBContext as Object
+ Dim sDBName as String, sTable as String, sCurrentMessage as String
+ Dim nRowCount as Integer
+ Dim bResult as Boolean
+ Const sTestString = &quot;Automatical Test&quot;
On Local Error GoTo DBERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
- nCurrentAction = cDBService
+ gCurrentTestCase = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoDatabaseContext
oDBContext = CreateUnoService(cUnoDatabaseContext)
sDBName=oDBContext.ElementNames(0) &apos;Names of Databases
- nCurrentAction = cDBOpen
+ gCurrentTestCase = cDBOpen
sCurrentMessage = cMessageDatabaseOpen
oDataSource = oDBContext.GetByName(sDBName)
sTable=oDataSource.Tables.ElementNames(0)
oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
- LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, FileChannel)
- LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, MainFileChannel)
- SetStatus (FilterType, cDBOpen, not IsNull (oDBConnection))
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseOpen, not IsNull (oDBConnection) )
if (IsNull(oDBConnection)) then
- Close #FileChannel%
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub
End If
&apos; Database is open now
- nCurrentAction = cDBService
+ gCurrentTestCase = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoRowSet
oRowSet = createUnoService(cUnoRowSet)
if (IsNull(oRowSet)) then
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, FileChannel)
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, MainFileChannel)
- SetStatus (FilterType, cDBService, not IsNull (oRowSet))
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, not IsNull (oRowSet) )
Exit Sub
else
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, FileChannel)
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, MainFileChannel)
- SetStatus (FilterType, cDBService, not IsNull (oRowSet))
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService, TRUE )
End If
- nCurrentAction = cDBInsert
+ gCurrentTestCase = cDBInsert
sCurrentMessage = cMessageDatabaseInsert
oRowSet.ActiveConnection = oDBConnection
@@ -105,14 +99,12 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.moveToCurrentRow()
bResult = (oRowSet.getString(5) = sTestString)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, MainFileChannel)
- SetStatus (FilterType, cDBInsert, bResult)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseInsert, bResult )
&apos;delete only if insert passed
if (bResult) Then
- nCurrentAction = cDBDelete
+ gCurrentTestCase = cDBDelete
sCurrentMessage = cMessageDatabaseDelete
oRowSet.deleteRow()
bResult = (nRowCount - oRowSet.RowCount = 0)
@@ -120,41 +112,35 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.next()
bResult = (nRowCount - oRowSet.RowCount = 1)
End If
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, MainFileChannel)
- SetStatus (FilterType, cDBDelete, bResult)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseDelete, bResult )
End If
&apos; read other record
- nCurrentAction = cDBSeek
+ gCurrentTestCase = cDBSeek
sCurrentMessage = cMessageDatabaseSeek
oRowSet.first()
bResult = not (oRowSet.getString(5) = sTestString)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, MainFileChannel)
- SetStatus (FilterType, cDBSeek, bResult)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseSeek, bResult )
- nCurrentAction = cDBClose
+ gCurrentTestCase = cDBClose
sCurrentMessage = cMessageDatabaseClose
oDBConnection.Dispose()
- LogState (True, &quot;Database &quot;+ cMessageDatabaseClose, FileChannel)
- LogState (True, &quot;Database &quot;+ cMessageDatabaseClose, MainFileChannel)
- SetStatus (FilterType, cDBClose, True)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseClose, True )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
DBERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDBOpen, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, &quot;Database &quot;+ sCurrentMessage, FileChannel)
- LogState (False, &quot;Database &quot;+ sCurrentMessage, MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( &quot;Database &quot;+ sCurrentMessage, FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestdoc/data/Test_Ext.xml
index 31d27dc7a4a7..ac39f4816d7b 100644
--- a/smoketestoo_native/data/Test_Ext.xml
+++ b/smoketestdoc/data/Test_Ext.xml
@@ -32,21 +32,20 @@ const cMessageExtensionService = &quot;Extension Service&quot;
const cMessageExtensionInstall = &quot;Install Extension&quot;
const cMessageExtensionUninstall = &quot;Uninstall Extension&quot;
-Sub TestExtensions (FilterType as Integer)
-Dim oTestExtension as Object, obj_null as Object
-Dim sCurrentMessage as String
-Dim nCurrentAction as Integer
-Dim bResult as Boolean
-Dim sImplementationNameString as String
-sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
+Sub TestExtensions
+ Dim oTestExtension as Object, obj_null as Object
+ Dim sCurrentMessage as String
+ Dim bResult as Boolean
+ Dim sImplementationNameString as String
+ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
On Local Error GoTo EXTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
sCurrentMessage = cMessageExtensionService
- nCurrentAction = cEXTService
+ gCurrentTestCase = cEXTService
&apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
&apos;adding the extension. The implementation is in
@@ -58,16 +57,15 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
ctx = getDefaultContext
ext_mgr = ctx.getValueByName(&quot;/singletons/&quot; + cExtensionManager)
- LogState (not IsNull (ext_mgr), &quot;Extension &quot;+ cMessageExtensionService, FileChannel)
- LogState (not IsNull (ext_mgr), &quot;Extension &quot;+ cMessageExtensionService, MainFileChannel)
- SetStatus (FilterType, cEXTService, not IsNull (ext_mgr))
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
if (IsNull(ext_mgr)) then
- Close #FileChannel%
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub
End If
sCurrentMessage = cMessageExtensionInstall
- nCurrentAction = cEXTInstall
+ gCurrentTestCase = cEXTInstall
&apos;Add the extension. We must provide a file URL here.
&apos;By passing &quot;user&quot; we determine that the actions we perform on
@@ -79,16 +77,15 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
&apos;Check if the extension has been added by creating a service which is contained in the extension.
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
bResult = (oTestExtension.getImplementationName = sImplementationNameString)
- LogState (bResult, &quot;Extension &quot;+ cMessageExtensionInstall, FileChannel)
- LogState (bResult, &quot;Extension &quot;+ cMessageExtensionInstall, MainFileChannel)
- SetStatus (FilterType, cEXTInstall, bResult)
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
if (not bResult) then
- Close #FileChannel%
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub
End If
sCurrentMessage = cMessageExtensionUninstall
- nCurrentAction = cEXTUninstall
+ gCurrentTestCase = cEXTUninstall
&apos;Remove the package
ext_mgr.removeExtension(&quot;org.openoffice.legacy.&quot; + cExtensionFileName, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
@@ -97,23 +94,21 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
&apos;The service must not be available anymore. Therefor isNull must return true.
- LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, FileChannel)
- LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, MainFileChannel)
- SetStatus (FilterType, cEXTUninstall, IsNull (oTestExtension))
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
EXTERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cEXTService, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, &quot;Extension &quot;+ sCurrentMessage, FileChannel)
- LogState (False, &quot;Extension &quot;+ sCurrentMessage, MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( &quot;Extension &quot;+ sCurrentMessage, False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
diff --git a/smoketestdoc/data/content.xml b/smoketestdoc/data/content.xml
new file mode 100644
index 000000000000..3c81bbfbad5e
--- /dev/null
+++ b/smoketestdoc/data/content.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:class="text">
+ <office:script/>
+ <office:font-decls>
+ <style:font-decl style:name="Arial Unicode MS" fo:font-family="&apos;Arial Unicode MS&apos;" style:font-pitch="variable"/>
+ <style:font-decl style:name="HG Mincho Light J" fo:font-family="&apos;HG Mincho Light J&apos;, &apos;MS Mincho&apos;, &apos;HG Mincho J&apos;, &apos;HG Mincho L&apos;, &apos;HG Mincho&apos;, Mincho, &apos;MS PMincho&apos;, &apos;MS Gothic&apos;, &apos;HG Gothic J&apos;, &apos;HG Gothic B&apos;, &apos;HG Gothic&apos;, Gothic, &apos;MS PGothic&apos;, &apos;Andale Sans UI&apos;, &apos;Arial Unicode MS&apos;, &apos;Lucida Sans Unicode&apos;, Tahoma" style:font-pitch="variable"/>
+ <style:font-decl style:name="Thorndale" fo:font-family="Thorndale, &apos;Times New Roman&apos;, Times, &apos;Lucida Serif&apos;, &apos;Lucida Bright&apos;, Timmons, &apos;New York&apos;, Serif" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-decls>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:properties fo:text-align="center"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphics">
+ <style:properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:forms form:automatic-focus="true" form:apply-design-mode="false">
+ <form:form form:name="Standard" form:apply-filter="true" form:command-type="table" form:service-name="com.sun.star.form.component.Form" office:target-frame="" xlink:href="">
+ <form:control form:name="start" form:service-name="com.sun.star.form.component.CommandButton" form:id="control1">
+ <form:button form:label="start smoketest" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.StartTestByOptions" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ <form:control form:name="options" form:service-name="com.sun.star.form.component.CommandButton" form:id="control2">
+ <form:button form:label="options" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ShowOptionsDlg" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ <form:control form:name="table" form:service-name="com.sun.star.form.component.CommandButton" form:id="control3">
+ <form:button form:label="delete table" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ClearAllText" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ </text:sequence-decls>
+ <text:user-field-decls>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Writer"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Calc"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Impress"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Draw"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="HTML"/>
+ <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="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"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Database"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Extension"/>
+ </text:user-field-decls>
+ <text:p text:style-name="Standard">
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="2cm" svg:y="2cm" draw:z-index="1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control1"/>
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="5cm" svg:y="2cm" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control2"/>
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="8cm" svg:y="2cm" draw:z-index="2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control3"/>
+ </text:p>
+ </office:body>
+</office:document-content>
diff --git a/smoketestoo_native/data/dialog-lb.xml b/smoketestdoc/data/dialog-lb.xml
index 973dfe688828..973dfe688828 100644
--- a/smoketestoo_native/data/dialog-lb.xml
+++ b/smoketestdoc/data/dialog-lb.xml
diff --git a/smoketestoo_native/data/dialog-lc.xml b/smoketestdoc/data/dialog-lc.xml
index e3a5a0e326e4..e3a5a0e326e4 100644
--- a/smoketestoo_native/data/dialog-lc.xml
+++ b/smoketestdoc/data/dialog-lc.xml
diff --git a/smoketestoo_native/data/makefile.mk b/smoketestdoc/data/makefile.mk
index 2096d07de90e..6cf2706b52b2 100644
--- a/smoketestoo_native/data/makefile.mk
+++ b/smoketestdoc/data/makefile.mk
@@ -26,7 +26,7 @@
#***********************************************************************/
PRJ = ..
-PRJNAME = smoketestoo_native
+PRJNAME = smoketestdoc
TARGET = data
.INCLUDE: settings.mk
@@ -50,21 +50,21 @@ $(MISC)/zip/smoketestdoc.sxw: \
script-lc.xml \
settings.xml \
styles.xml
- $(RM) -r $(MISC)/zip
- $(MKDIR) $(MISC)/zip
- $(COPY) content.xml meta.xml settings.xml styles.xml $(MISC)/zip/
- printf application/vnd.sun.xml.writer > $(MISC)/zip/mimetype
- $(MKDIR) $(MISC)/zip/META-INF
- $(COPY) manifest.xml $(MISC)/zip/META-INF/
- $(MKDIR) $(MISC)/zip/Basic
- $(COPY) script-lc.xml $(MISC)/zip/Basic/
- $(MKDIR) $(MISC)/zip/Basic/Standard
- $(COPY) script-lb.xml Events.xml Global.xml Test_10er.xml Test_DB.xml \
+ $(COMMAND_ECHO)$(RM) -r $(MISC)/zip
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip
+ $(COMMAND_ECHO)$(COPY) content.xml meta.xml settings.xml styles.xml $(MISC)/zip/
+ $(COMMAND_ECHO)printf application/vnd.sun.xml.writer > $(MISC)/zip/mimetype
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/META-INF
+ $(COMMAND_ECHO)$(COPY) manifest.xml $(MISC)/zip/META-INF/
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Basic
+ $(COMMAND_ECHO)$(COPY) script-lc.xml $(MISC)/zip/Basic/
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Basic/Standard
+ $(COMMAND_ECHO)$(COPY) script-lb.xml Events.xml Global.xml Test_10er.xml Test_DB.xml \
Test_Ext.xml $(MISC)/zip/Basic/Standard/
- $(MKDIR) $(MISC)/zip/Dialogs
- $(COPY) dialog-lc.xml $(MISC)/zip/Dialogs/
- $(MKDIR) $(MISC)/zip/Dialogs/Standard
- $(COPY) dialog-lb.xml OptionsDlg.xml $(MISC)/zip/Dialogs/Standard/
- cd $(MISC)/zip && zip -rD $(@:f) .
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Dialogs
+ $(COMMAND_ECHO)$(COPY) dialog-lc.xml $(MISC)/zip/Dialogs/
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Dialogs/Standard
+ $(COMMAND_ECHO)$(COPY) dialog-lb.xml OptionsDlg.xml $(MISC)/zip/Dialogs/Standard/
+ $(COMMAND_ECHO)cd $(MISC)/zip && zip -rD $(@:f) .
.INCLUDE: target.mk
diff --git a/smoketestoo_native/data/manifest.xml b/smoketestdoc/data/manifest.xml
index 48fc9ce900a0..48fc9ce900a0 100644
--- a/smoketestoo_native/data/manifest.xml
+++ b/smoketestdoc/data/manifest.xml
diff --git a/smoketestoo_native/data/meta.xml b/smoketestdoc/data/meta.xml
index 43f14295e2b3..43f14295e2b3 100644
--- a/smoketestoo_native/data/meta.xml
+++ b/smoketestdoc/data/meta.xml
diff --git a/smoketestoo_native/data/script-lb.xml b/smoketestdoc/data/script-lb.xml
index fc4f6c6370ba..fc4f6c6370ba 100644
--- a/smoketestoo_native/data/script-lb.xml
+++ b/smoketestdoc/data/script-lb.xml
diff --git a/smoketestoo_native/data/script-lc.xml b/smoketestdoc/data/script-lc.xml
index e3a5a0e326e4..e3a5a0e326e4 100644
--- a/smoketestoo_native/data/script-lc.xml
+++ b/smoketestdoc/data/script-lc.xml
diff --git a/smoketestoo_native/data/settings.xml b/smoketestdoc/data/settings.xml
index cd4524b741ff..cd4524b741ff 100644
--- a/smoketestoo_native/data/settings.xml
+++ b/smoketestdoc/data/settings.xml
diff --git a/smoketestoo_native/data/styles.xml b/smoketestdoc/data/styles.xml
index 3f8d75fa6db3..3f8d75fa6db3 100644
--- a/smoketestoo_native/data/styles.xml
+++ b/smoketestdoc/data/styles.xml
diff --git a/smoketestdoc/prj/build.lst b/smoketestdoc/prj/build.lst
new file mode 100755
index 000000000000..ec825ab48049
--- /dev/null
+++ b/smoketestdoc/prj/build.lst
@@ -0,0 +1,4 @@
+smdoc smoketestdoc :: soltools codemaker unoil javaunohelper NULL
+smdoc smoketestdoc usr1 - all smdoc_mkout NULL
+smdoc smoketestdoc\data nmake - all smdoc_data NULL
+smdoc smoketestdoc\com\sun\star\comp\smoketest nmake - all smdoc_ext NULL
diff --git a/smoketestdoc/prj/d.lst b/smoketestdoc/prj/d.lst
new file mode 100755
index 000000000000..618cd83a145b
--- /dev/null
+++ b/smoketestdoc/prj/d.lst
@@ -0,0 +1,4 @@
+mkdir: %_DEST%\bin%_EXT%
+
+..\%__SRC%\bin\smoketestdoc.sxw %_DEST%\bin%_EXT%\smoketestdoc.sxw
+..\%__SRC%\bin\TestExtension.oxt %_DEST%\bin%_EXT%\TestExtension.oxt
diff --git a/smoketestoo_native/data/content.xml b/smoketestoo_native/data/content.xml
deleted file mode 100644
index dcd31b1759e4..000000000000
--- a/smoketestoo_native/data/content.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--**********************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-**********************************************************************-->
-<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:class="text"><office:script/><office:font-decls><style:font-decl style:name="Arial Unicode MS" fo:font-family="&apos;Arial Unicode MS&apos;" style:font-pitch="variable"/><style:font-decl style:name="HG Mincho Light J" fo:font-family="&apos;HG Mincho Light J&apos;, &apos;MS Mincho&apos;, &apos;HG Mincho J&apos;, &apos;HG Mincho L&apos;, &apos;HG Mincho&apos;, Mincho, &apos;MS PMincho&apos;, &apos;MS Gothic&apos;, &apos;HG Gothic J&apos;, &apos;HG Gothic B&apos;, &apos;HG Gothic&apos;, Gothic, &apos;MS PGothic&apos;, &apos;Andale Sans UI&apos;, &apos;Arial Unicode MS&apos;, &apos;Lucida Sans Unicode&apos;, Tahoma" style:font-pitch="variable"/><style:font-decl style:name="Thorndale" fo:font-family="Thorndale, &apos;Times New Roman&apos;, Times, &apos;Lucida Serif&apos;, &apos;Lucida Bright&apos;, Timmons, &apos;New York&apos;, Serif" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/></office:font-decls><office:automatic-styles><style:style style:name="P1" style:family="paragraph"><style:properties fo:text-align="center"/></style:style><style:style style:name="gr1" style:family="graphics"><style:properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/></style:style></office:automatic-styles><office:body><office:forms form:automatic-focus="false" form:apply-design-mode="false"><form:form form:name="Standard" form:apply-filter="true" form:command-type="table" form:service-name="com.sun.star.form.component.Form" office:target-frame="" xlink:href=""><form:control form:name="options" form:service-name="com.sun.star.form.component.CommandButton" form:id="control1"><form:button form:label="options" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center"><form:properties><form:property form:property-name="DefaultControl" form:property-type="string"><form:property-value>stardiv.one.form.control.CommandButton</form:property-value></form:property></form:properties><office:events><script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ShowOptionsDlg" script:location="document" script:library="document"/></office:events></form:button></form:control><form:control form:name="start" form:service-name="com.sun.star.form.component.CommandButton" form:id="control2"><form:button form:label="start smoketest" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center"><form:properties><form:property form:property-name="DefaultControl" form:property-type="string"><form:property-value>stardiv.one.form.control.CommandButton</form:property-value></form:property></form:properties><office:events><script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.StartTestByOptions" script:location="document" script:library="document"/></office:events></form:button></form:control><form:control form:name="table" form:service-name="com.sun.star.form.component.CommandButton" form:id="control3"><form:button form:label="delete table" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center"><form:properties><form:property form:property-name="DefaultControl" form:property-type="string"><form:property-value>stardiv.one.form.control.CommandButton</form:property-value></form:property></form:properties><office:events><script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ClearAllText" script:location="document" script:library="document"/></office:events></form:button></form:control></form:form></office:forms><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><text:user-field-decls><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Writer"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Calc"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Impress"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Draw"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="HTML"/><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="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"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Database"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Extension"/></text:user-field-decls><text:p text:style-name="Standard"><draw:control text:anchor-type="as-char" svg:y="0cm" draw:z-index="1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control2"/><draw:control text:anchor-type="as-char" svg:y="0cm" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control1"/><draw:control text:anchor-type="as-char" svg:y="0cm" draw:z-index="2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control3"/></text:p><text:p text:style-name="Standard"/></office:body></office:document-content>
diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk
index 18f3a42b789f..aab245371a72 100644..100755
--- a/smoketestoo_native/makefile.mk
+++ b/smoketestoo_native/makefile.mk
@@ -29,6 +29,8 @@ TARGET = smoketest
ENABLE_EXCEPTIONS = TRUE
+ABORT_ON_ASSERTION = TRUE
+
.INCLUDE: settings.mk
CFLAGSCXX += $(CPPUNIT_CFLAGS)
@@ -56,18 +58,18 @@ ALLTAR : cpptest
cpptest : $(SHL1TARGETN)
-TEST_ARGUMENTS = smoketest.doc=$(BIN)/smoketestdoc.sxw
+TEST_ARGUMENTS = smoketest.doc=$(OUTDIR)/bin$(UPDMINOREXT)/smoketestdoc.sxw
CPPTEST_LIBRARY = $(SHL1TARGETN)
.IF "$(OS)" != "WNT"
$(installationtest_instpath).flag : $(shell ls \
$(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).tar.gz)
- $(RM) -r $(installationtest_instpath)
- $(MKDIRHIER) $(installationtest_instpath)
- cd $(installationtest_instpath) && $(GNUTAR) xfz \
+ $(COMMAND_ECHO)$(RM) -r $(installationtest_instpath)
+ $(COMMAND_ECHO)$(MKDIRHIER) $(installationtest_instpath)
+ $(COMMAND_ECHO)cd $(installationtest_instpath) && $(GNUTAR) xfz \
$(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).tar.gz
- $(MV) $(installationtest_instpath)/OOo_*_install-arc_$(defaultlangiso) \
+ $(COMMAND_ECHO)$(MV) $(installationtest_instpath)/OOo_*_install-arc_$(defaultlangiso) \
$(installationtest_instpath)/opt
- $(TOUCH) $@
+ $(COMMAND_ECHO)$(TOUCH) $@
cpptest : $(installationtest_instpath).flag
.END
diff --git a/smoketestoo_native/prj/build.lst b/smoketestoo_native/prj/build.lst
index 147a363d3da5..9527079f56d2 100644..100755
--- a/smoketestoo_native/prj/build.lst
+++ b/smoketestoo_native/prj/build.lst
@@ -1,5 +1,3 @@
-smtoon smoketestoo_native :: instsetoo_native test NULL
+smtoon smoketestoo_native :: instsetoo_native test smoketestdoc NULL
smtoon smoketestoo_native usr1 - all smoketestoonative_mkout NULL
-smtoon smoketestoo_native\com\sun\star\comp\smoketest nmake - all smoketestoonative_csscs NULL
-smtoon smoketestoo_native\data nmake - all smoketestoonative_data NULL
-smtoon smoketestoo_native nmake - all,test10 smoketestoonative_mk smoketestoonative_csscs smoketestoonative_data NULL
+smtoon smoketestoo_native nmake - all,test10 smoketestoonative_mk NULL
diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx
index a4e532123456..5fd16914b0d7 100644..100755
--- a/smoketestoo_native/smoketest.cxx
+++ b/smoketestoo_native/smoketest.cxx
@@ -151,13 +151,18 @@ void Test::test() {
CPPUNIT_ASSERT(
test::getTestArgument(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smoketest.doc")), &doc));
- css::uno::Sequence< css::beans::PropertyValue > args(1);
+ css::uno::Sequence< css::beans::PropertyValue > args(2);
args[0].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode"));
args[0].Handle = -1;
args[0].Value <<=
com::sun::star::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
args[0].State = css::beans::PropertyState_DIRECT_VALUE;
+ args[1].Name = rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
+ args[1].Handle = -1;
+ args[1].Value <<= sal_True;
+ args[1].State = css::beans::PropertyState_DIRECT_VALUE;
css::util::URL url;
url.Complete = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
diff --git a/test/prj/build.lst b/test/prj/build.lst
index 7adea0c0727b..e22199a5c437 100644
--- a/test/prj/build.lst
+++ b/test/prj/build.lst
@@ -1,5 +1,6 @@
-te test : BOOST:boost cppu cppuhelper CPPUNIT:cppunit javaunohelper offuh ridljar sal solenv unoil NULL
+te test : BOOST:boost cppu cppuhelper CPPUNIT:cppunit javaunohelper offuh ridljar sal solenv stlport unoil NULL
te test\inc nmake - all inc NULL
te test\source\cpp nmake - all source_cpp inc NULL
+te test\source\cpp\unoexceptionprotector nmake - all source_cpp_unoexceptionprotector inc NULL
te test\source\java\org\openoffice\test nmake - all source_java NULL
te test\source\java\org\openoffice\test\tools nmake - all source_java_tools NULL
diff --git a/test/prj/d.lst b/test/prj/d.lst
index 54da2062a511..18a599fd5849 100644
--- a/test/prj/d.lst
+++ b/test/prj/d.lst
@@ -1,9 +1,12 @@
mkdir: %_DEST%\inc%_EXT%\test
mkdir: %_DEST%\inc%_EXT%\test\detail
..\%__SRC%\bin\test.dll %_DEST%\bin%_EXT%\test.dll
+..\%__SRC%\bin\unoexceptionprotector.dll %_DEST%\bin%_EXT%\unoexceptionprotector.dll
..\%__SRC%\lib\itest.lib %_DEST%\lib%_EXT%\itest.lib
..\%__SRC%\lib\libtest.dylib %_DEST%\lib%_EXT%\libtest.dylib
..\%__SRC%\lib\libtest.so %_DEST%\lib%_EXT%\libtest.so
+..\%__SRC%\lib\unoexceptionprotector.dylib %_DEST%\lib%_EXT%\unoexceptionprotector.dylib
+..\%__SRC%\lib\unoexceptionprotector.so %_DEST%\lib%_EXT%\unoexceptionprotector.so
..\inc\test\detail\testdllapi.hxx %_DEST%\inc%_EXT%\test\detail\testdllapi.hxx
..\inc\test\gettestargument.hxx %_DEST%\inc%_EXT%\test\gettestargument.hxx
..\inc\test\officeconnection.hxx %_DEST%\inc%_EXT%\test\officeconnection.hxx
diff --git a/test/source/cpp/makefile.mk b/test/source/cpp/makefile.mk
index 4c90dc678959..2073f1500c07 100644
--- a/test/source/cpp/makefile.mk
+++ b/test/source/cpp/makefile.mk
@@ -33,14 +33,11 @@ VISIBILITY_HIDDEN = TRUE
.INCLUDE: settings.mk
CDEFS += -DOOO_DLLIMPLEMENTATION_TEST
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+.IF "$(USE_SYSTEM_STL)" != "YES" && "$(SYSTEM_CPPUNIT)" == "YES"
+CFLAGSCXX += -DADAPT_EXT_STL
+.END
SLOFILES = \
$(SLO)/getargument.obj \
diff --git a/test/source/cpp/unoexceptionprotector/makefile.mk b/test/source/cpp/unoexceptionprotector/makefile.mk
new file mode 100644
index 000000000000..7f62199f46dc
--- /dev/null
+++ b/test/source/cpp/unoexceptionprotector/makefile.mk
@@ -0,0 +1,56 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+PRJ = ../../..
+PRJNAME = test
+TARGET = unoexceptionprotector
+
+ENABLE_EXCEPTIONS = TRUE
+VISIBILITY_HIDDEN = TRUE
+
+.INCLUDE: settings.mk
+
+DLLPRE =
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+.IF "$(USE_SYSTEM_STL)" != "YES" && "$(SYSTEM_CPPUNIT)" == "YES"
+CFLAGSCXX += -DADAPT_EXT_STL
+.END
+
+SLOFILES = $(SLO)/unoexceptionprotector.obj
+
+SHL1IMPLIB = i$(SHL1TARGET)
+SHL1OBJS = $(SLOFILES)
+SHL1RPATH = NONE
+SHL1STDLIBS = \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(CPPUNITLIB) \
+ $(SALLIB)
+SHL1TARGET = unoexceptionprotector
+SHL1USE_EXPORTS = name
+DEF1NAME = $(SHL1TARGET)
+
+.INCLUDE: target.mk
diff --git a/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
new file mode 100644
index 000000000000..4f9ee9b198e2
--- /dev/null
+++ b/test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2011 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+#include "precompiled_test.hxx"
+#include "sal/config.h"
+
+#include <limits>
+#include <string>
+
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "cppuhelper/exc_hlp.hxx"
+#include "osl/thread.h"
+#include "rtl/string.hxx"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/types.h"
+
+#include "preextstl.h"
+#include "cppunit/Message.h"
+#include "cppunit/Protector.h"
+#include "postextstl.h"
+
+namespace {
+
+namespace css = com::sun::star;
+
+// Best effort conversion:
+std::string convert(rtl::OUString const & s16) {
+ rtl::OString s8(rtl::OUStringToOString(s16, osl_getThreadTextEncoding()));
+ return std::string(
+ s8.getStr(),
+ ((static_cast< sal_uInt32 >(s8.getLength())
+ > std::numeric_limits< std::string::size_type >::max())
+ ? std::numeric_limits< std::string::size_type >::max()
+ : static_cast< std::string::size_type >(s8.getLength())));
+}
+
+class Prot: public CppUnit::Protector, private boost::noncopyable {
+public:
+ Prot() {}
+
+ virtual ~Prot() {}
+
+ virtual bool protect(
+ CppUnit::Functor const & functor,
+ CppUnit::ProtectorContext const & context);
+};
+
+bool Prot::protect(
+ CppUnit::Functor const & functor, CppUnit::ProtectorContext const & context)
+{
+ try {
+ return functor();
+ } catch (css::uno::Exception & e) {
+ css::uno::Any a(cppu::getCaughtException());
+ reportError(
+ context,
+ CppUnit::Message(
+ convert(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "uncaught exception of type "))
+ + a.getValueTypeName()),
+ convert(e.Message)));
+ }
+ return false;
+}
+
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT CppUnit::Protector * SAL_CALL
+unoexceptionprotector() {
+ return new Prot;
+}
diff --git a/testautomation/graphics/required/includes/global/id_004.inc b/testautomation/graphics/required/includes/global/id_004.inc
index f04a3ba5ec8f..fbcfde707710 100644
--- a/testautomation/graphics/required/includes/global/id_004.inc
+++ b/testautomation/graphics/required/includes/global/id_004.inc
@@ -242,8 +242,10 @@ testcase tiInsertGraphic
DialogTest (GrafikEinfuegenDlg)
printlog " use file: global\input\graf_inp\stabler.tif) "
Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif")
+ wait(1000)
printlog "click 'open' "
Oeffnen.click
+ wait(1000)
catch
Warnlog "Insert graphic doesn't work :-("
endcatch