summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
Diffstat (limited to 'smoketestoo_native')
-rw-r--r--smoketestoo_native/data/Events.xml22
-rw-r--r--smoketestoo_native/data/Global.xml36
-rw-r--r--smoketestoo_native/data/OptionsDlg.xml19
-rw-r--r--smoketestoo_native/data/Test_10er.xml203
-rw-r--r--smoketestoo_native/data/content.xml2
-rw-r--r--smoketestoo_native/makefile.mk10
-rw-r--r--smoketestoo_native/smoketest.cxx25
7 files changed, 42 insertions, 275 deletions
diff --git a/smoketestoo_native/data/Events.xml b/smoketestoo_native/data/Events.xml
index 956a1ee40..61272293f 100644
--- a/smoketestoo_native/data/Events.xml
+++ b/smoketestoo_native/data/Events.xml
@@ -28,28 +28,6 @@
<!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 *****
-Sub InitEvents
- call ClickCutTest
-End Sub
-
-Sub ClickSaveTest
- if not OptionsDlg.cbSaveTest.Value then
- OptionsDlg.cbOpenTest.Value = false
- OptionsDlg.cbOpenTest.Enabled = false
- else
- OptionsDlg.cbOpenTest.Enabled = true
- end If
-End Sub
-
-Sub ClickCutTest
- if not OptionsDlg.cbCutTest.Value then
- OptionsDlg.cbPasteTest.Value = false
- OptionsDlg.cbPasteTest.Enabled = false
- else
- OptionsDlg.cbPasteTest.Enabled = true
- end If
-End Sub
-
Sub PressCancel
gDlgState = cDlgCancel
end Sub
diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml
index 42f4287be..c4dc7666b 100644
--- a/smoketestoo_native/data/Global.xml
+++ b/smoketestoo_native/data/Global.xml
@@ -35,7 +35,7 @@ const cParagraphBreak = 0
global const cExtensionFileName = &quot;TestExtension.oxt&quot;
-global const cDocNew = 0, cDocCut = 1, cDocPaste = 2, cDocSaveOpen8 = 3, cDocSaveOpenXML = 4, cDocOpen50 = 5, cDocClose = 6, cDocWrite = 7
+global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocOpen50 = 3, cDocClose = 4, cDocWrite = 5
global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
global const cLogfileFailed = 255
@@ -83,8 +83,8 @@ 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;, cUserFieldTestOpen50 = &quot;Open50&quot;, cUserFieldTestCut = &quot;Cut&quot;
-Global const cUserFieldTestPaste = &quot;Paste&quot;, cUserFieldTestTerminateAfterTest = &quot;Terminate&quot;, cUserFieldTestOpenSave8 = &quot;SaveOpen8&quot;
+Global const cUserFieldTestOpenSaveXML = &quot;SaveOpenXML&quot;, cUserFieldTestOpen50 = &quot;Open50&quot;
+Global const cUserFieldTestTerminateAfterTest = &quot;Terminate&quot;, cUserFieldTestOpenSave8 = &quot;SaveOpen8&quot;
Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;Standard&quot;
@@ -100,8 +100,8 @@ 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, bMakeOpen50Test as boolean, bMakeCutTest as boolean
-Global bMakePasteTest as boolean, bMakeTerminateAfterTest as boolean, bShowTable as boolean
+Global bMakeSaveOpenXMLTest as boolean, bMakeOpen50Test as boolean
+Global bMakeTerminateAfterTest as boolean, bShowTable as boolean
Global bMakeSaveOpen8Test as boolean
global sExtensionURL as string
@@ -156,10 +156,8 @@ Sub CreateStatusTable
tableHeaders(cStHTML) = &quot;HTML&quot;
tableHeaders(cStJava) = &quot;Java&quot;
- dim tableColums(5) as string
+ dim tableColums(3) as string
tableColums(cDocNew) = &quot;new&quot;
- tableColums(cDocCut) = &quot;cut&quot;
- tableColums(cDocPaste) = &quot;paste&quot;
tableColums(cDocSaveOpen8) = &quot;V8.0&quot;
tableColums(cDocSaveOpenXML) = &quot;XML&quot;
tableColums(cDocOpen50) = &quot;V5.0&quot;
@@ -211,7 +209,7 @@ Sub CreateStatusTable
xCell.BackTransparent = False
xCell.BackColor = cCoGrey
- for i% = 0 to 5
+ for i% = 0 to 3
tableCursor.goDown(1,FALSE)
cName = tableCursor.getRangeName()
xCell = table.getCellByName(cName)
@@ -509,8 +507,6 @@ Sub SetOptions
SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestOpen50, -(gOptionsDialog.getControl(&quot;cbOpen50Test&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestCut, -(gOptionsDialog.getControl(&quot;cbCutTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestPaste, -(gOptionsDialog.getControl(&quot;cbPasteTest&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutPutDoc)
end Sub
@@ -529,8 +525,6 @@ Sub GetOptions
gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)))
gOptionsDialog.getControl(&quot;cbOpen50Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc)))
gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbCutTest&quot;).setState( -( GetUserFieldState (cUserFieldTestCut, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbPasteTest&quot;).setState( -( GetUserFieldState (cUserFieldTestPaste, gOutPutDoc)))
gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)))
End Sub
@@ -549,8 +543,6 @@ Sub ReadOptions
bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)
bMakeOpen50Test = GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc)
bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)
- bMakeCutTest = GetUserFieldState (cUserFieldTestCut, gOutPutDoc)
- bMakePasteTest = GetUserFieldState (cUserFieldTestPaste, gOutPutDoc)
bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)
end Sub
@@ -579,8 +571,6 @@ Sub SetDefaultOptions
bMakeOpen50Test = true
End If
bMakeSaveOpen8Test = true
- bMakeCutTest = true
- bMakePasteTest = true
bMakeTerminateAfterTest = false
end Sub
@@ -614,10 +604,8 @@ Function StartTestWithDefaultOptions
component(cStJava) = &quot;Java&quot;
component(cStDataBase) = &quot;Base&quot;
component(cStExtension) = &quot;Extensions&quot;
- dim action(5) as string
+ dim action(3) as string
action(cDocNew) = &quot;new&quot;
- action(cDocCut) = &quot;cut&quot;
- action(cDocPaste) = &quot;paste&quot;
action(cDocSaveOpen8) = &quot;V8.0&quot;
action(cDocSaveOpenXML) = &quot;XML&quot;
action(cDocOpen50) = &quot;V5.0&quot;
@@ -700,14 +688,6 @@ Sub ExecuteSlot( SlotNr As String, oDoc as Object )
End Sub
-Sub CutText (oDoc as Object)
- ExecuteSlot (&quot;5710&quot;, oDoc)
-End Sub
-
-Sub PasteText (oDoc as Object)
- ExecuteSlot (&quot;5712&quot;, oDoc)
-End Sub
-
Sub DelAllUserFields (aDoc as Object)
Dim aFieldType as Object
Dim aElements as Variant
diff --git a/smoketestoo_native/data/OptionsDlg.xml b/smoketestoo_native/data/OptionsDlg.xml
index 716133e6f..c1afd7ba7 100644
--- a/smoketestoo_native/data/OptionsDlg.xml
+++ b/smoketestoo_native/data/OptionsDlg.xml
@@ -43,22 +43,19 @@
<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="cbOpen50Test" dlg:tab-index="10" dlg:left="19" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Open V5.0" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbCutTest" dlg:tab-index="11" dlg:left="19" dlg:top="77" dlg:width="80" dlg:height="8" dlg:value="Cut" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbPasteTest" dlg:tab-index="12" dlg:left="19" dlg:top="91" dlg:width="80" dlg:height="8" dlg:value="Paste" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="13" 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="14" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
- <dlg:button dlg:id="btOk" dlg:tab-index="15" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok">
+ <dlg:titledbox dlg:id="fmBroker" dlg:tab-index="9" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
+ <dlg:button dlg:id="btOk" dlg:tab-index="10" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok">
<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="16" 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="14" 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="17" dlg:left="152" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Smoketest">
+ <dlg:button dlg:id="btStart" dlg:tab-index="15" 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="18" 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="19" 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="20" 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="21" dlg:left="126" dlg:top="147" dlg:width="80" dlg:height="8" dlg:value="Extension" dlg:checked="false"/>
+ <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/smoketestoo_native/data/Test_10er.xml
index f92d51dac..63bf98897 100644
--- a/smoketestoo_native/data/Test_10er.xml
+++ b/smoketestoo_native/data/Test_10er.xml
@@ -42,8 +42,6 @@ const cMessageSaveOpenXMLDoc = &quot;Save/Open Document XML (6/7)&quot;
const cMessageOpen50Doc = &quot;Open Document 5.0&quot;
const cMessageNewDoc = &quot;New Document&quot;
const cMessageCloseDoc = &quot;Close Document&quot;
-const cMessageCutObj = &quot;Cut Object&quot;
-const cMessagePasteObj = &quot;Paste Object&quot;
Global sWorkPath$
Global sWorkPathURL$
@@ -92,22 +90,6 @@ Sub DeleteAllSavedFiles()
If FileExists (sFileName) then
Kill (sFileName)
End If
- sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmWriter or cFlt50)
- If FileExists (sFileName) then
- Kill (sFileName)
- End If
- sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmCalc or cFlt50)
- If FileExists (sFileName) then
- Kill (sFileName)
- End If
- sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmImpress or cFlt50)
- If FileExists (sFileName) then
- Kill (sFileName)
- End If
- sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmDraw or cFlt50)
- If FileExists (sFileName) then
- Kill (sFileName)
- End If
End Sub
Sub DeleteAllLogFiles()
@@ -294,12 +276,6 @@ Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
sWriteStr = sText
sWriteStr = sWriteStr + &quot;new&quot;
if bTestAll then
- if bMakeCutTest then
- sWriteStr = sWriteStr + &quot;, cut&quot;
- end if
- if bMakePasteTest then
- sWriteStr = sWriteStr + &quot;, paste&quot;
- end if
if bMakeSaveOpen8Test then
sWriteStr = sWriteStr + &quot;, save 8.0&quot;
end if
@@ -348,7 +324,7 @@ end Sub
Sub MakeDocTest (FilterType as Integer)
Dim oDoc as Object
- Dim sFileNameXML$, sFileName50$, sFileName8$
+ Dim sFileNameXML$, sFileName8$
Dim bError as Boolean
Dim nCurrentAction as Integer
@@ -361,9 +337,6 @@ Sub MakeDocTest (FilterType as Integer)
LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
SetStatus (FilterType, cDocNew, not IsNull (oDoc))
if not IsNull (oDoc) then
- nCurrentAction = cDocCut
- call CutAndPaste(FilterType, oDoc)
-&apos; bError = oDoc.CurrentController.frame.close
nCurrentAction = cDocSaveOpen8
if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt8)
@@ -551,16 +524,8 @@ Function GetDocEndings (DocType as Integer) as String
GetDocEndings = &quot;odp&quot; &apos;PrÕsentation
case frmDraw or cFlt8
GetDocEndings = &quot;odg&quot; &apos;Zeichen
- case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML
+ case frmHyperText, frmHyperText or cFltXML
GetDocEndings = &quot;html&quot; &apos;Hypertext-Dokument
- case frmWriter or cFlt50
- GetDocEndings = &quot;sdw&quot; &apos; Textdokument 5.0
- case frmCalc or cFlt50
- GetDocEndings = &quot;sdc&quot; &apos;Tabellendokument 5.0
- case frmImpress or cFlt50
- GetDocEndings = &quot;sdd&quot; &apos;PrÕsentation 5.0
- case frmDraw or cFlt50
- GetDocEndings = &quot;sda&quot; &apos;Zeichen 5.0
case frmWriter or cFltXML
GetDocEndings = &quot;sxw&quot; &apos; Textdokument
case frmCalc or cFltXML
@@ -598,18 +563,8 @@ Function GetDocFilter (DocType as Integer) as String
case frmMath or cFltXML
GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos;Formel
- case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML
+ case frmHyperText, frmHyperText or cFltXML
GetDocFilter = &quot;HTML&quot; &apos;Hypertext-Dokument
- case frmWriter or cFlt50
- GetDocFilter = &quot;StarWriter 5.0&quot; &apos; Textdokument 5.0
- case frmCalc or cFlt50
- GetDocFilter = &quot;StarCalc 5.0&quot; &apos;Tabellendokument 5.0
- case frmImpress or cFlt50
- GetDocFilter = &quot;StarImpress 5.0&quot; &apos;Präsentation 5.0
- case frmDraw or cFlt50
- GetDocFilter = &quot;StarDraw 5.0&quot; &apos;Zeichen 5.0
- case frmMath or cFlt50
- GetDocFilter = &quot;StarMath 5.0&quot; &apos;Formel 5.0
case frmWriter or cFltNewDoc
GetDocFilter = &quot;swriter&quot; &apos; Textdokument
@@ -669,10 +624,6 @@ Function GetErrorMessageOnAction (nAction as Integer) as String
Select Case ( nAction )
case cDocNew
GetErrorMessageOnAction = cMessageNewDoc
- case cDocCut
- GetErrorMessageOnAction = cMessageCutObj
- case cDocPaste
- GetErrorMessageOnAction = cMessagePasteObj
case cDocSaveOpen8
GetErrorMessageOnAction = cMessageSaveOpen8Doc
case cDocSaveOpenXML
@@ -688,7 +639,7 @@ end Function
Function IsFilterAvailable (FilterType as Integer) as boolean
IsFilterAvailable = true
- if ((FilterType = (frmHyperText or cFlt50)) or (FilterType = (frmHyperText or cFltXML))) then
+ if ((FilterType = (frmHyperText or cFltXML))) then
IsFilterAvailable = false
end if
End Function
@@ -707,152 +658,6 @@ Function TestJava (FilterType as Integer) as boolean
TestJava = not IsNull (oObj)
End Function
-Sub CutAndPaste (DocType as Integer, oDoc as Object)
- Dim sText as String
- Dim oWin as Object
- Dim oText as Object
- Dim oView as Object
- Dim bCutState as boolean, bPasteState as boolean
- Select Case ( DocType )
- case frmWriter
- Dim oCursor as Object
-
- sText = &quot;AutomaticText&quot;
- oText = oDoc.GetText
- oCursor = oText.CreateTextCursor
- oText.InsertString(oCursor, sText, true) &apos; Cursor selektiert den Text
- oView = oDoc.getCurrentController
- oView.Select(oCursor)
-
- if bMakeCutTest then
- call CutText (oDoc)
-
- if oText.GetString = &quot;&quot; Then
- bCutState = True
- else
- bCutState = False
- end If
- SetStatus (DocType, cDocCut, bCutState)
- LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, FileChannel)
- LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, MainFileChannel)
- end if
-
- if bMakePasteTest and bMakeCutTest then
- call PasteText (oDoc)
-
- if oText.GetString = sText Then
- bPasteState = True
- else
- bPasteState = False
- end If
- SetStatus (DocType, cDocPaste, bPasteState)
- LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessagePasteObj, FileChannel)
- LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessagePasteObj, MainFileChannel)
- end if
-
- case frmCalc
- DIM oCell as Object
-
- sText = &quot;AutomaticText&quot;
- oCell = oDoc.Sheets(0).GetCellByPosition(0, 0)
- oCell.String = sText
- oView = oDoc.getCurrentController
- oView.Select(oCell)
-
- if bMakeCutTest then
- call CutText (oDoc)
-
- if oCell.String = &quot;&quot; Then
- bCutState = True
- else
- bCutState = False
- end If
- SetStatus (DocType, cDocCut, bCutState)
- LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, FileChannel)
- LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, MainFileChannel)
- end if
-
- if bMakePasteTest and bMakeCutTest then
- call PasteText (oDoc)
-
- if oCell.String = sText Then
- bPasteState = True
- else
- bPasteState = False
- end If
- SetStatus (DocType, cDocPaste, bPasteState)
- LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessagePasteObj, FileChannel)
- LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessagePasteObj, MainFileChannel)
- end if
- case frmMessage
- case frmImpress, frmDraw
- Dim oPage as Object
- Dim oRect as Object
- Dim xSize as Object
- Dim xPoint as Object
- Dim bObjState as Boolean
-
- xSize = CreateUnoStruct (&quot;com.sun.star.awt.Size&quot;)
- xPoint = CreateUnoStruct (&quot;com.sun.star.awt.Point&quot;)
- xSize.Width = 2000
- xSize.Height = 2000
- xPoint.x = 10000
- xPoint.y = 10000
- oPage = oDoc.DrawPages(0)
-
- if DocType = frmImpress Then
- oPage.Layout = 20 &apos; set page layot to none
- end If
-
- oRect = oDoc.CreateInstance(&quot;com.sun.star.drawing.RectangleShape&quot;)
- oRect.Size = xSize
- oRect.Position = xPoint
- oPage.add(oRect)
-
- oView = oDoc.getCurrentController
- oView.Select(oRect)
-
- &apos; Prüft ob überhaupt ein Object angelegt wurde
- if oPage.count = 1 Then
- bObjState = True
- else
- bObjState = False
- end If
-
- if bMakeCutTest then
- call CutText (oDoc)
-
- if (oPage.count = 0) and bObjState Then
- bCutState = True
- else
- bCutState = False
- end If
- SetStatus (DocType, cDocCut, bCutState)
- LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, FileChannel)
- LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, MainFileChannel)
- end if
-
- wait (1000) &apos;wait after cut
-
- if bMakePasteTest and bMakeCutTest then
- call PasteText (oDoc)
-
- if (oPage.count = 1) and bObjState Then
- bPasteState = True
- else
- bPasteState = False
- end If
- SetStatus (DocType, cDocPaste, bPasteState)
- LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessagePasteObj, FileChannel)
- LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessagePasteObj, MainFileChannel)
- end if
- case frmMath
- case frmImage
- case frmHyperText
- case frmChart
- end Select
-end Sub
-
Sub LoadLibrary( LibName as String )
dim args(1)
diff --git a/smoketestoo_native/data/content.xml b/smoketestoo_native/data/content.xml
index f137efb3d..021be8971 100644
--- a/smoketestoo_native/data/content.xml
+++ b/smoketestoo_native/data/content.xml
@@ -25,4 +25,4 @@
* 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="Open50"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Cut"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Paste"/><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>
+<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="Open50"/><text:user-field-decl text:value-type="string" text:string-value="n" text:name="Terminate"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Java"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen8"/><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 fa0173047..d9c4dace7 100644
--- a/smoketestoo_native/makefile.mk
+++ b/smoketestoo_native/makefile.mk
@@ -33,6 +33,13 @@ ENABLE_EXCEPTIONS = TRUE
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
+
SLOFILES = $(SHL1OBJS)
SHL1TARGET = smoketest
@@ -49,7 +56,8 @@ ALLTAR : cpptest
cpptest : $(SHL1TARGETN)
-OOO_CPPTEST_ARGS = $(SHL1TARGETN) -env:arg-doc=$(BIN)/smoketestdoc.sxw
+TEST_ARGUMENTS = smoketest.doc=$(BIN)/smoketestdoc.sxw
+CPPTEST_LIBRARY = $(SHL1TARGETN)
.IF "$(OS)" != "WNT"
localinstall :
diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx
index f218957f8..1767fa278 100644
--- a/smoketestoo_native/smoketest.cxx
+++ b/smoketestoo_native/smoketest.cxx
@@ -29,8 +29,8 @@
#include "sal/config.h"
#include "boost/noncopyable.hpp"
+#include "com/sun/star/awt/AsyncCallback.hpp"
#include "com/sun/star/awt/XCallback.hpp"
-#include "com/sun/star/awt/XRequestCallback.hpp"
#include "com/sun/star/beans/PropertyState.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/document/MacroExecMode.hpp"
@@ -59,7 +59,7 @@
#include "osl/diagnose.h"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
-#include "test/getargument.hxx"
+#include "test/gettestargument.hxx"
#include "test/officeconnection.hxx"
#include "test/oustringostreaminserter.hxx"
#include "test/toabsolutefileurl.hxx"
@@ -150,8 +150,8 @@ void Test::tearDown() {
void Test::test() {
rtl::OUString doc;
CPPUNIT_ASSERT(
- test::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("doc")), &doc));
+ test::getTestArgument(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smoketest.doc")), &doc));
css::uno::Sequence< css::beans::PropertyValue > args(1);
args[0].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode"));
@@ -169,10 +169,12 @@ void Test::test() {
css::uno::Reference< css::frame::XController >(
css::uno::Reference< css::frame::XModel >(
css::uno::Reference< css::frame::XComponentLoader >(
- connection_.getFactory()->createInstance(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.frame.Desktop"))),
+ (connection_.getComponentContext()->
+ getServiceManager()->createInstanceWithContext(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.frame.Desktop")),
+ connection_.getComponentContext())),
css::uno::UNO_QUERY_THROW)->loadComponentFromURL(
test::toAbsoluteFileUrl(doc),
rtl::OUString(
@@ -185,11 +187,8 @@ void Test::test() {
css::uno::UNO_QUERY_THROW);
Result result;
// Shifted to main thread to work around potential deadlocks (i112867):
- css::uno::Reference< css::awt::XRequestCallback >(
- connection_.getFactory()->createInstance( //TODO: AsyncCallback ctor
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback"))),
- css::uno::UNO_QUERY_THROW)->addCallback(
+ com::sun::star::awt::AsyncCallback::create(
+ connection_.getComponentContext())->addCallback(
new Callback(
disp, url, css::uno::Sequence< css::beans::PropertyValue >(),
new Listener(&result)),