Kaydet (Commit) abe28ebe authored tarafından obo's avatar obo

CWS-TOOLING: integrate CWS debuglevels

......@@ -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:
......
......@@ -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>
......@@ -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>
......@@ -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
......
......@@ -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
......
<?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>
#*************************************************************************
#
# 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 = smoketestdoc
TARGET = data
.INCLUDE: settings.mk
$(BIN)/smoketestdoc.sxw: $(MISC)/zip/smoketestdoc.sxw
$(COPY) $< $@
$(MISC)/zip/smoketestdoc.sxw: \
Events.xml \
Global.xml \
OptionsDlg.xml \
Test_10er.xml \
Test_DB.xml \
Test_Ext.xml \
content.xml \
dialog-lb.xml \
dialog-lc.xml \
manifest.xml \
meta.xml \
script-lb.xml \
script-lc.xml \
settings.xml \
styles.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/
$(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
smdoc smoketestdoc :: soltools codemaker unoil javaunohelper NULL
smdoc smoketestdoc usr1 - all smdoc_mkout NULL
smdoc smoketestdoc\data nmake - all smdoc_data NULL
smtoon smoketestoo_native\com\sun\star\comp\smoketest nmake - all smdoc_ext NULL
mkdir: %_DEST%\bin%_EXT%
..\%__SRC%\bin\smoketestdoc.sxw %_DEST%\bin%_EXT%\smoketestdoc.sxw
..\%__SRC%\bin\TestExtension.oxt %_DEST%\bin%_EXT%\TestExtension.oxt
<?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>
......@@ -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
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
......@@ -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(
......
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
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
......
......@@ -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 \
......
#*************************************************************************
# 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
/*************************************************************************
* 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment