diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-03-11 11:35:29 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-03-11 11:35:29 +0000 |
commit | b9e3d95ced6699ce683c13821db17f231a7992ad (patch) | |
tree | c6917789f6eeb230c09ff94911e108e347eb9943 /smoketestoo_native | |
parent | f9b660ee2cf617ad63483f73af4a522b437b9d94 (diff) | |
parent | 49e5cb3dd026bc9a164c7d0b606be86314dbe392 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101integration/dev300_m101
Conflicts:
smoketestoo_native/data/Global.xml
smoketestoo_native/data/OptionsDlg.xml
smoketestoo_native/data/Test_10er.xml
smoketestoo_native/data/content.xml
smoketestoo_native/smoketest.cxx
test/source/cpp/getargument.cxx
test/source/cpp/officeconnection.cxx
testautomation/framework/optional/includes/basic_vba-compat_security_check.inc
testautomation/framework/optional/includes/filedlg_cjk_folders.inc
testautomation/global/sid/all.sid
testautomation/global/sid/bars.sid
testautomation/global/sid/e_all.sid
testautomation/global/win/bars.win
testautomation/graphics/optional/includes/impress/i_slideshow2.inc
testautomation/graphics/optional/includes/impress/i_slideshow3.inc
testtools/source/bridgetest/bridgetest.cxx
testtools/source/bridgetest/constructors.cxx
testtools/source/bridgetest/makefile.mk
testtools/source/bridgetest/testComponent.component
Diffstat (limited to 'smoketestoo_native')
-rw-r--r-- | smoketestoo_native/data/Events.xml | 22 | ||||
-rw-r--r-- | smoketestoo_native/data/Global.xml | 36 | ||||
-rw-r--r-- | smoketestoo_native/data/OptionsDlg.xml | 19 | ||||
-rw-r--r-- | smoketestoo_native/data/Test_10er.xml | 203 | ||||
-rw-r--r-- | smoketestoo_native/data/content.xml | 2 | ||||
-rw-r--r-- | smoketestoo_native/makefile.mk | 10 | ||||
-rw-r--r-- | smoketestoo_native/smoketest.cxx | 25 |
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 = "TestExtension.oxt" -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 = "Writer", cUserFieldTestCalc = &qu Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "Math", cUserFieldTestChart = "Chart" Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database" Global const cUserFieldTestExtension = "Extension" -Global const cUserFieldTestOpenSaveXML = "SaveOpenXML", cUserFieldTestOpen50 = "Open50", cUserFieldTestCut = "Cut" -Global const cUserFieldTestPaste = "Paste", cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8" +Global const cUserFieldTestOpenSaveXML = "SaveOpenXML", cUserFieldTestOpen50 = "Open50" +Global const cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8" Global const cOptionsDialogName = "OptionsDlg", cTest10Modul = "Standard" @@ -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) = "HTML" tableHeaders(cStJava) = "Java" - dim tableColums(5) as string + dim tableColums(3) as string tableColums(cDocNew) = "new" - tableColums(cDocCut) = "cut" - tableColums(cDocPaste) = "paste" tableColums(cDocSaveOpen8) = "V8.0" tableColums(cDocSaveOpenXML) = "XML" tableColums(cDocOpen50) = "V5.0" @@ -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("cbSaveOpenXMLTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpen50, -(gOptionsDialog.getControl("cbOpen50Test").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestCut, -(gOptionsDialog.getControl("cbCutTest").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestPaste, -(gOptionsDialog.getControl("cbPasteTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl("cbTerminateAfterTest").getState), gOutPutDoc) end Sub @@ -529,8 +525,6 @@ Sub GetOptions gOptionsDialog.getControl("cbSaveOpenXMLTest").setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc))) gOptionsDialog.getControl("cbOpen50Test").setState( -( GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc))) gOptionsDialog.getControl("cbSaveOpen8Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc))) - gOptionsDialog.getControl("cbCutTest").setState( -( GetUserFieldState (cUserFieldTestCut, gOutPutDoc))) - gOptionsDialog.getControl("cbPasteTest").setState( -( GetUserFieldState (cUserFieldTestPaste, gOutPutDoc))) gOptionsDialog.getControl("cbTerminateAfterTest").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) = "Java" component(cStDataBase) = "Base" component(cStExtension) = "Extensions" - dim action(5) as string + dim action(3) as string action(cDocNew) = "new" - action(cDocCut) = "cut" - action(cDocPaste) = "paste" action(cDocSaveOpen8) = "V8.0" action(cDocSaveOpenXML) = "XML" action(cDocOpen50) = "V5.0" @@ -700,14 +688,6 @@ Sub ExecuteSlot( SlotNr As String, oDoc as Object ) End Sub -Sub CutText (oDoc as Object) - ExecuteSlot ("5710", oDoc) -End Sub - -Sub PasteText (oDoc as Object) - ExecuteSlot ("5712", 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&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 = "Save/Open Document XML (6/7)" const cMessageOpen50Doc = "Open Document 5.0" const cMessageNewDoc = "New Document" const cMessageCloseDoc = "Close Document" -const cMessageCutObj = "Cut Object" -const cMessagePasteObj = "Paste Object" Global sWorkPath$ Global sWorkPathURL$ @@ -92,22 +90,6 @@ Sub DeleteAllSavedFiles() If FileExists (sFileName) then Kill (sFileName) End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If - sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress or cFlt50) - If FileExists (sFileName) then - Kill (sFileName) - End If - sFileName = sWorkPath+cTempFileName+"."+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 + "new" if bTestAll then - if bMakeCutTest then - sWriteStr = sWriteStr + ", cut" - end if - if bMakePasteTest then - sWriteStr = sWriteStr + ", paste" - end if if bMakeSaveOpen8Test then sWriteStr = sWriteStr + ", save 8.0" 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)+" "+ cMessageNewDoc, MainFileChannel) SetStatus (FilterType, cDocNew, not IsNull (oDoc)) if not IsNull (oDoc) then - nCurrentAction = cDocCut - call CutAndPaste(FilterType, oDoc) -' bError = oDoc.CurrentController.frame.close nCurrentAction = cDocSaveOpen8 if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then sFileName8 = sWorkPathURL+cTempFileName+"."+GetDocEndings(FilterType or cFlt8) @@ -551,16 +524,8 @@ Function GetDocEndings (DocType as Integer) as String GetDocEndings = "odp" 'PrÕsentation case frmDraw or cFlt8 GetDocEndings = "odg" 'Zeichen - case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML + case frmHyperText, frmHyperText or cFltXML GetDocEndings = "html" 'Hypertext-Dokument - case frmWriter or cFlt50 - GetDocEndings = "sdw" ' Textdokument 5.0 - case frmCalc or cFlt50 - GetDocEndings = "sdc" 'Tabellendokument 5.0 - case frmImpress or cFlt50 - GetDocEndings = "sdd" 'PrÕsentation 5.0 - case frmDraw or cFlt50 - GetDocEndings = "sda" 'Zeichen 5.0 case frmWriter or cFltXML GetDocEndings = "sxw" ' Textdokument case frmCalc or cFltXML @@ -598,18 +563,8 @@ Function GetDocFilter (DocType as Integer) as String case frmMath or cFltXML GetDocFilter = "StarOffice XML (Math)" 'Formel - case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML + case frmHyperText, frmHyperText or cFltXML GetDocFilter = "HTML" 'Hypertext-Dokument - case frmWriter or cFlt50 - GetDocFilter = "StarWriter 5.0" ' Textdokument 5.0 - case frmCalc or cFlt50 - GetDocFilter = "StarCalc 5.0" 'Tabellendokument 5.0 - case frmImpress or cFlt50 - GetDocFilter = "StarImpress 5.0" 'Präsentation 5.0 - case frmDraw or cFlt50 - GetDocFilter = "StarDraw 5.0" 'Zeichen 5.0 - case frmMath or cFlt50 - GetDocFilter = "StarMath 5.0" 'Formel 5.0 case frmWriter or cFltNewDoc GetDocFilter = "swriter" ' 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 = "AutomaticText" - oText = oDoc.GetText - oCursor = oText.CreateTextCursor - oText.InsertString(oCursor, sText, true) ' Cursor selektiert den Text - oView = oDoc.getCurrentController - oView.Select(oCursor) - - if bMakeCutTest then - call CutText (oDoc) - - if oText.GetString = "" Then - bCutState = True - else - bCutState = False - end If - SetStatus (DocType, cDocCut, bCutState) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, FileChannel) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ 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)+" "+ cMessagePasteObj, FileChannel) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessagePasteObj, MainFileChannel) - end if - - case frmCalc - DIM oCell as Object - - sText = "AutomaticText" - 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 = "" Then - bCutState = True - else - bCutState = False - end If - SetStatus (DocType, cDocCut, bCutState) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, FileChannel) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ 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)+" "+ cMessagePasteObj, FileChannel) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ 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 ("com.sun.star.awt.Size") - xPoint = CreateUnoStruct ("com.sun.star.awt.Point") - xSize.Width = 2000 - xSize.Height = 2000 - xPoint.x = 10000 - xPoint.y = 10000 - oPage = oDoc.DrawPages(0) - - if DocType = frmImpress Then - oPage.Layout = 20 ' set page layot to none - end If - - oRect = oDoc.CreateInstance("com.sun.star.drawing.RectangleShape") - oRect.Size = xSize - oRect.Position = xPoint - oPage.add(oRect) - - oView = oDoc.getCurrentController - oView.Select(oRect) - - ' 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)+" "+ cMessageCutObj, FileChannel) - LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+" "+ cMessageCutObj, MainFileChannel) - end if - - wait (1000) '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)+" "+ cMessagePasteObj, FileChannel) - LogState (bPasteState, GetDocFilter(DocType or cFltNewDoc)+" "+ 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="'Arial Unicode MS'" style:font-pitch="variable"/><style:font-decl style:name="HG Mincho Light J" fo:font-family="'HG Mincho Light J', 'MS Mincho', 'HG Mincho J', 'HG Mincho L', 'HG Mincho', Mincho, 'MS PMincho', 'MS Gothic', 'HG Gothic J', 'HG Gothic B', 'HG Gothic', Gothic, 'MS PGothic', 'Andale Sans UI', 'Arial Unicode MS', 'Lucida Sans Unicode', Tahoma" style:font-pitch="variable"/><style:font-decl style:name="Thorndale" fo:font-family="Thorndale, 'Times New Roman', Times, 'Lucida Serif', 'Lucida Bright', Timmons, 'New York', 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="'Arial Unicode MS'" style:font-pitch="variable"/><style:font-decl style:name="HG Mincho Light J" fo:font-family="'HG Mincho Light J', 'MS Mincho', 'HG Mincho J', 'HG Mincho L', 'HG Mincho', Mincho, 'MS PMincho', 'MS Gothic', 'HG Gothic J', 'HG Gothic B', 'HG Gothic', Gothic, 'MS PGothic', 'Andale Sans UI', 'Arial Unicode MS', 'Lucida Sans Unicode', Tahoma" style:font-pitch="variable"/><style:font-decl style:name="Thorndale" fo:font-family="Thorndale, 'Times New Roman', Times, 'Lucida Serif', 'Lucida Bright', Timmons, 'New York', 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)), |