diff options
Diffstat (limited to 'smoketestoo_native')
20 files changed, 2492 insertions, 6 deletions
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk b/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk index 3e90c68a13af..da9b302791f0 100755 --- a/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk +++ b/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk @@ -34,6 +34,8 @@ no_common_build_zip:=TRUE # --- Settings ----------------------------------------------------- +.IF "$(SOLAR_JAVA)" != "" + .INCLUDE : settings.mk JARFILES = ridl.jar jurt.jar unoil.jar juh.jar @@ -62,11 +64,15 @@ ZIP1DEPS=$(MISC)$/$(TARGET)$/$(JARTARGET)\ .INCLUDE : target.mk +$(MISC)$/$(TARGET)$/META-INF: + @-$(MKDIRHIER) $(@) + $(MISC)$/TestExtension.urd: TestExtension.idl $(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: manifest.xml - @-$(MKDIRHIER) $(@:d) $(COPY) $< $@ $(MISC)$/$(TARGET)$/TestExtension.rdb: $(MISC)$/TestExtension.urd @@ -77,3 +83,8 @@ $(JAVACLASSFILES) .UPDATEALL: $(MISC)$/$(TARGET)$/TestExtension.rdb $(MISC)$/$(TARGET)$/$(JARTARGET) : $(JARTARGETN) $(COPY) $< $@ + +.ELSE +@all: + @echo "Java disabled. Nothing to do." +.ENDIF diff --git a/smoketestoo_native/data/Events.xml b/smoketestoo_native/data/Events.xml new file mode 100644 index 000000000000..6536c1c5eafc --- /dev/null +++ b/smoketestoo_native/data/Events.xml @@ -0,0 +1,65 @@ +<?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. +* +**********************************************************************--> +<!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 + +Sub PressOk + gDlgState = cDlgOk +end Sub + +Sub PressTest + gOptionsDialog.EndExecute() + gDlgState = cDlgStartTest +end Sub +</script:module> diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml new file mode 100644 index 000000000000..364d2e2efcfb --- /dev/null +++ b/smoketestoo_native/data/Global.xml @@ -0,0 +1,786 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Global" script:language="StarBasic">REM ***** BASIC ***** + +const cMaxErrorStates = 13 + +const cCoGreen = 4057917, cCoRed = 16711680, cCoGrey = 12632256 +const cParagraphBreak = 0 + +global const cExtensionFileName = "TestExtension.oxt" + +global const cDocNew = 0, cDocCut = 1, cDocPaste = 2, cDocSaveOpen8 = 3, cDocSaveOpenXML = 4, cDocSaveOpen50 = 5, cDocClose = 6, cDocWrite = 7 +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 + +global const cStWriter = 0, cStCalc = 1, cStPraesentation = 2, cStZeichnen = 3 +global const cStMessage = 12, cStHTML = 6, cStChart = 4, cStJava = 7 +global const cStMath = 5, cStDataBase = 9 +global const cStExtension = 11 +global const cStNone = -1 + +global const cFlt8 = 0, cFlt50 = 32, cFltNewDoc = 64, cFltXML = 128 + +global const frmWriter = 1, frmCalc = 2, frmMessage = 3, frmImpress = 4 +global const frmMath = 5, frmImage = 6, frmChart = 7, frmHyperText = 8, frmDraw = 9 +global const frmDataBase = 10, frmJava = 13 +global const frmExtension = 14 + +global const cLogUnknown = 0, cLogFalse = 1, cLogTrue = 2 + +'UserFieldKennungen +Global const cYes = "y", cNo = "n" +Global const cStateNo = 0, cStateYes = 1 + +'Feldtypen +Global const cFtExtUser = 21, cFtPageNum = 5, cFtStatistic = 8, cFtDateTime = 27, cFtDatabase = 31 + +'UnoStrings +Global const cUnoSeparator = "." +Global const cUnoPrefix = "com.sun.star." +Global const cUnoUserField = cUnoPrefix + "text.FieldMaster.User" +Global const cUnoExtUserField = cUnoPrefix + "text.TextField.ExtendedUser" +Global const cUnoMasterDataBase = cUnoPrefix + "text.FieldMaster.Database" +Global const cUnoDataBase = cUnoPrefix + "text.TextField.Database" +Global const cUnoDateTime = cUnoPrefix + "text.TextField.DateTime" +Global const cUnoTextGraphi2 = cUnoPrefix + "text.Graphic" +Global const cUnoJavaLoader = cUnoPrefix + "loader.Java" +Global const cUnoDatabaseContext = cUnoPrefix + "sdb.DatabaseContext" +Global const cUnoRowSet = cUnoPrefix + "sdb.RowSet" +Global const cUnoSmoketestTestExtension = cUnoPrefix + "comp.smoketest.TestExtension" +Global const cUnoSmoketestCommandEnvironment = cUnoPrefix + "deployment.test.SmoketestCommandEnvironment" +Global const cExtensionManager = cUnoPrefix + "deployment.ExtensionManager" + +'UserFieldNames +Global const cUserFieldTestWriter = "Writer", cUserFieldTestCalc = "Calc", cUserFieldTestImpress = "Impress" +Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "Math", cUserFieldTestChart = "Chart" +Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database" +Global const cUserFieldTestExtension = "Extension" +Global const cUserFieldTestOpenSaveXML = "SaveOpenXML", cUserFieldTestOpenSave50 = "SaveOpen50", cUserFieldTestCut = "Cut" +Global const cUserFieldTestPaste = "Paste", cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8" + +Global const cOptionsDialogName = "OptionsDlg", cTest10Modul = "Standard" + +Global const cDlgCancel = 1, cDlgOk = 0, cDlgStartTest = 2 + +global gErrorState (cMaxErrorStates, 5) as integer + +global gOutputDoc as Object +global gOutputDocNotUno as Object +global gOptionsDialog as Object + +Global bMakeWriterTest as boolean, bMakeCalcTest as boolean, bMakeImpressTest as boolean +Global bMakeDrawTest as Boolean, bMakeMathTest as boolean, bMakeChartTest as boolean +Global bMakeHTMLTest as boolean, bMakeJavaTest as boolean, bMakeDBTest as boolean +Global bMakeExtensionTest as boolean +Global bMakeSaveOpenXMLTest as boolean, bMakeSaveOpen50Test as boolean, bMakeCutTest as boolean +Global bMakePasteTest as boolean, bMakeTerminateAfterTest as boolean, bShowTable as boolean +Global bMakeSaveOpen8Test as boolean + +global sExtensionURL as string + +Dim gDlgState as Integer + +Sub SetGlobalDoc + gOutPutDoc = ThisComponent +end Sub + +Sub ClearStatus + for j% = 0 to cMaxErrorStates + for i% = 0 to 5 + gErrorState (j%, i%) = cLogUnknown + next i% + next j% +end Sub + +Sub ClearAllText + call SetGlobalDoc + call ClearDoc (gOutPutDoc) + call ClearStatus +end Sub + +Sub Main + call SetGlobalDoc + if bShowTable then + call ClearDoc (gOutPutDoc) + end If + + call ClearStatus + + Call Test_10er.Main + + if bShowTable then + call CreateStatusTable2 + call CreateStatusTable + call CreateDocState + call CreateSecondState + gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage + end if +End Sub + +Sub CreateStatusTable + dim tableHeaders(7) as string + tableHeaders(cStWriter) = "Writer" + tableHeaders(cStCalc) = "Calc" + tableHeaders(cStPraesentation) = "Präsen- tation" + tableHeaders(cStZeichnen) = "Zeichn." + tableHeaders(cStChart) = "Diagr." + tableHeaders(cStMath) = "Math" + tableHeaders(cStHTML) = "HTML" + tableHeaders(cStJava) = "Java" + + dim tableColums(5) as string + tableColums(cDocNew) = "new" + tableColums(cDocCut) = "cut" + tableColums(cDocPaste) = "paste" + tableColums(cDocSaveOpen8) = "V8.0" + tableColums(cDocSaveOpenXML) = "XML" + tableColums(cDocSaveOpen50) = "V5.0" +' tableColums(cDocClose) = "close" + + aDoc = gOutPutDoc + + xText = aDoc.Text + xCursor = xText.createTextCursor() + +' xCursor.gotoStart(FALSE) +' xCursor.GoRight (2, False) +' SetParagraphBreak (xCursor) +' SetParagraphBreak (xCursor) + xCursor.gotoStart(FALSE) + xCursor.GoRight (4, False) + SetParagraphBreak (xCursor) + xCursor.GoRight (1, False) + SetParagraphBreak (xCursor) + xCursor.GoRight (1, False) + + table = aDoc.createInstance("com.sun.star.text.TextTable") + table.initialize(7,9) + table.Name = "StTab1" + xText.insertTextContent(xCursor, table, FALSE) + + tableCursor = table.createCursorByCellName(table.CellNames(0)) + tableCursor.gotoStart(FALSE) + tableCursor.goRight(1,FALSE) + + for i% = 0 to 7 + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.String=tableHeaders(i%) + + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + + tableCursor.goRight(1,FALSE) + next i% + + xCursor.gotoStart(FALSE) +' SetParagraphBreak (xCursor) +' SetParagraphBreak (xCursor) + + tableCursor.gotoStart(FALSE) + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + + for i% = 0 to 5 + tableCursor.goDown(1,FALSE) + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.String=tableColums(i%) + + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + next i% +end Sub + +Sub CreateStatusTable2 + dim tableHeaders(5) as string + tableHeaders(cStDataBase-9) = "Database" + tableHeaders(1) = "" + tableHeaders(cStExtension-9) = "Extension" + tableHeaders(3) = "" + tableHeaders(4) = "" + + dim tableColums(5) as string + tableColums(cDBService ) = "services" + tableColums(cDBOpen ) = "open" + tableColums(cDBInsert ) = "insert" + tableColums(cDBDelete ) = "delete" + tableColums(cDBSeek ) = "seek" + tableColums(cDBClose ) = "close" + + dim tableColums2(3) as string + tableColums2(cEXTService ) = "services" + tableColums2(cEXTInstall ) = "install" + tableColums2(cEXTUninstall ) = "uninstall" + + aDoc = gOutPutDoc + + xText = aDoc.Text + xCursor = xText.createTextCursor() + + xCursor.gotoStart(FALSE) + xCursor.GoRight (4, False) + SetParagraphBreak (xCursor) + SetParagraphBreak (xCursor) + xCursor.gotoEnd(FALSE) + + table = aDoc.createInstance("com.sun.star.text.TextTable") + table.initialize(7,6) + table.Name = "StTab2" + 'table.RelativeWidth =500 + + xText.insertTextContent(xCursor, table, FALSE) + + tableCursor = table.createCursorByCellName(table.CellNames(0)) + tableCursor.gotoStart(FALSE) + tableCursor.goRight(1,FALSE) + + for i% = 0 to 5 + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.String=tableHeaders(i%) + + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + + tableCursor.goRight(1,FALSE) + next i% + + tableCursor.gotoStart(FALSE) + + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + + for i% = 0 to 5 + tableCursor.goDown(1,FALSE) + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.String=tableColums(i%) + + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + next i% + + tableCursor.gotoStart(FALSE) + tableCursor.goRight(2,FALSE) + + for i% = 0 to 3 + tableCursor.goDown(1,FALSE) + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + xCell.String=tableColums2(i%) + + xCell.BackTransparent = False + xCell.BackColor = cCoGrey + next i% +end Sub + + +Sub CreateDocState + aDoc = gOutPutDoc + table = aDoc.TextTables.GetByIndex (1) + 'table = aDoc.TextTables.GetByName ("StTab1") + + for j% = 0 to 7 + for i% = 0 to 5 + sRangeName = GetRangeName(j%, i%+1) + + tableCursor = table.createCursorByCellName(sRangeName) + + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + + xCell.BackTransparent = False + + if gErrorState (j%, i%) = cLogTrue then + xCell.BackColor = cCoGreen + else if gErrorState (j%, i%) = cLogFalse then + xCell.BackColor = cCoRed + else + xCell.BackColor = cCoGrey + end If + end If + + next i% + next j% +end Sub + +Sub CreateSecondState + aDoc = gOutPutDoc + table = aDoc.TextTables.GetByIndex (0) + 'table = aDoc.TextTables.GetByName ("StTab2") + + for j% = 0 to cMaxErrorStates-9 + for i% = 0 to 5 + sRangeName = GetRangeName(j%, i%+1) + + tableCursor = table.createCursorByCellName(sRangeName) + + cName = tableCursor.getRangeName() + xCell = table.getCellByName(cName) + + xCell.BackTransparent = False + + if gErrorState (j%+9, i%) = cLogTrue then + xCell.BackColor = cCoGreen + else if gErrorState (j%+9, i%) = cLogFalse then + xCell.BackColor = cCoRed + else + xCell.BackColor = cCoGrey + end If + end If + + next i% + next j% +end Sub + +Function GetRangeName (nColumn as integer, nRow as integer) as string + GetRangeName = chr (nColumn+66) + Trim(Str(nRow+1)) +end Function + +Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean) + Dim nStatusType as Integer + Dim nState as integer + nStatusType = GetStatusType (nDocType) + If nStatusType = cStNone then Exit Sub + + if bState then + nState = cLogTrue + else + nState = cLogFalse + end If + + gErrorState (nStatusType, nAction) = nState +end Sub + +Function GetStatusType (nDocType as Integer) as Integer + Select Case ( nDocType ) + case frmWriter + GetStatusType = cStWriter ' Textdokument + case frmCalc + GetStatusType = cStCalc 'Tabellendokument + case frmMessage + GetStatusType = cStMessage 'Nachricht + case frmImpress + GetStatusType = cStPraesentation 'Präsentation + case frmDraw + GetStatusType = cStZeichnen 'Zeichnen + case frmMath + GetStatusType = cStMath 'Formel + case frmImage + GetStatusType = cStBild 'Bild + case frmHyperText + GetStatusType = cStHTML 'Hypertext-Dokument + case frmChart + GetStatusType = cStChart 'Diagramm + case frmJava + GetStatusType = cStJava 'Java + case frmDataBase + GetStatusType = cStDataBase 'DataBase + case frmExtension + GetStatusType = cStExtension 'Extension + case else + GetStatusType = cStNone + end Select +end Function + +Sub SetParagraphBreak (aCursor as Object) + aCursor.Text.InsertControlCharacter (aCursor, cParagraphBreak, True) +end Sub + +Sub ClearDoc (aDoc as Object) + Dim aText as Object + Dim i% + for i%=1 to aDoc.TextTables.count + aDoc.TextTables.GetByIndex(0).dispose + next + + aText = aDoc.Text.CreateTextCursor + aText.GotoStart (False) + aText.GoRight (3, False) + SetParagraphBreak (aText) + aText.GotoEnd (True) + aText.String="" +end Sub + +Sub ClearDocFull (aDoc as Object) + Dim aText as Object + Dim i% + for i%=1 to aDoc.TextTables.count + aDoc.TextTables.GetByIndex(0).dispose + next + + aText = aDoc.Text.CreateTextCursor + aText.GotoStart (False) + aText.GotoEnd (True) + aText.String="" +end Sub + +Sub SetGlobalOptionsDialog () + + Dim oLibContainer As Object, oLib As Object + Dim oInputStreamProvider As Object + Dim oDialog As Object + + Const sLibName = cTest10Modul + Const sDialogName = cOptionsDialogName + + REM get library and input stream provider + oLibContainer = DialogLibraries + + REM load the library + oLibContainer.loadLibrary( sLibName ) + + oLib = oLibContainer.getByName( sLibName ) + oInputStreamProvider = oLib.getByName( sDialogName ) + + REM create dialog control + gOptionsDialog = CreateUnoDialog( oInputStreamProvider ) + +end Sub + +Sub ShowOptionsDlg + + call SetGlobalDoc + call SetGlobalOptionsDialog + call GetOptions + + REM show the dialog + gOptionsDialog.execute() + + ' jetzt läuft der Dialog, bis ein Button gedrückt wird + + Select Case (gDlgState) + case cDlgOk + call SetOptions () + case cDlgStartTest + call SetOptions () + call StartTestByOptions () + end Select + + gOptionsDialog.dispose() + +end Sub + +Sub SetOptions + call SetGlobalDoc + SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl("cbWriterTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl("cbCalcTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl("cbImpressTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl("cbDrawTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl("cbHTMLTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl("cbMathTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl("cbChartTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl("cbJavaTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl("cbDatabaseTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl("cbExtensionTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl("cbSaveOpenXMLTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl("cbSaveOpen50Test").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestCut, -(gOptionsDialog.getControl("cbCutTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestPaste, -(gOptionsDialog.getControl("cbPasteTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl("cbTerminateAfterTest").getState), gOutPutDoc) +end Sub + +Sub GetOptions + call SetGlobalDoc + gOptionsDialog.getControl("cbWriterTest").setState( -( GetUserFieldState (cUserFieldTestWriter, gOutPutDoc))) + gOptionsDialog.getControl("cbCalcTest").setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutPutDoc))) + gOptionsDialog.getControl("cbImpressTest").setState( -( GetUserFieldState (cUserFieldTestImpress, gOutPutDoc))) + gOptionsDialog.getControl("cbDrawTest").setState( -( GetUserFieldState (cUserFieldTestDraw, gOutPutDoc))) + gOptionsDialog.getControl("cbHTMLTest").setState( -( GetUserFieldState (cUserFieldTestHTML, gOutPutDoc))) + gOptionsDialog.getControl("cbMathTest").setState( -( GetUserFieldState (cUserFieldTestMath, gOutPutDoc))) + gOptionsDialog.getControl("cbChartTest").setState( -( GetUserFieldState (cUserFieldTestChart, gOutPutDoc))) + gOptionsDialog.getControl("cbJavaTest").setState( -( GetUserFieldState (cUserFieldTestJava, gOutPutDoc))) + gOptionsDialog.getControl("cbDatabaseTest").setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc))) + gOptionsDialog.getControl("cbExtensionTest").setState( -( GetUserFieldState (cUserFieldTestExtension, gOutPutDoc))) + gOptionsDialog.getControl("cbSaveOpenXMLTest").setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc))) + gOptionsDialog.getControl("cbSaveOpen50Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc))) + gOptionsDialog.getControl("cbSaveOpen8Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc))) + gOptionsDialog.getControl("cbCutTest").setState( -( GetUserFieldState (cUserFieldTestCut, gOutPutDoc))) + gOptionsDialog.getControl("cbPasteTest").setState( -( GetUserFieldState (cUserFieldTestPaste, gOutPutDoc))) + gOptionsDialog.getControl("cbTerminateAfterTest").setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc))) +End Sub + +Sub ReadOptions + call SetGlobalDoc + bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutPutDoc) + bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutPutDoc) + bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutPutDoc) + bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutPutDoc) + bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutPutDoc) + bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutPutDoc) + bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutPutDoc) + bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutPutDoc) + bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc) + bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutPutDoc) + bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc) + bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc) + bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc) + bMakeCutTest = GetUserFieldState (cUserFieldTestCut, gOutPutDoc) + bMakePasteTest = GetUserFieldState (cUserFieldTestPaste, gOutPutDoc) + bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc) +end Sub + +Sub SetDefaultOptions + bMakeWriterTest = true + bMakeCalcTest = true + bMakeImpressTest = true + bMakeDrawTest = true + bMakeHTMLTest = true + bMakeMathTest = true + bMakeChartTest = true + if Environ("SOLAR_JAVA") = "" then + bMakeJavaTest = false + bMakeDBTest = false + bMakeExtensionTest = false + else + bMakeJavaTest = true + bMakeDBTest = true + bMakeExtensionTest = true + End If + bMakeSaveOpenXMLTest = true + REM Disable StarOffice 5.0 tests in case binfilter has not been included + if Environ("WITH_BINFILTER") = "NO" then + bMakeSaveOpen50Test = false + else + bMakeSaveOpen50Test = true + End If + bMakeSaveOpen8Test = true + bMakeCutTest = true + bMakePasteTest = true + bMakeTerminateAfterTest = false +end Sub + +Sub StartTestByOptions + bShowTable = true + call ReadOptions + call Main + if bMakeTerminateAfterTest then + ClearDocFull (gOutPutDoc) + gOutPutDoc.dispose + 'StarDesktop.Terminate + + 'EnableReschedule( false ) + 'DispatchSlot( 5300 ) + stop + End If +end Sub + +Function StartTestWithDefaultOptions + bShowTable = false + call SetDefaultOptions + call Main + dim component(cMaxErrorStates) as string + component(cStWriter) = "Writer" + component(cStCalc) = "Calc" + component(cStPraesentation) = "Impress" + component(cStZeichnen) = "Draw" + component(cStChart) = "Chart" + component(cStMath) = "Math" + component(cStHTML) = "HTML" + component(cStJava) = "Java" + component(cStDataBase) = "Base" + component(cStExtension) = "Extensions" + dim action(5) as string + action(cDocNew) = "new" + action(cDocCut) = "cut" + action(cDocPaste) = "paste" + action(cDocSaveOpen8) = "V8.0" + action(cDocSaveOpenXML) = "XML" + action(cDocSaveOpen50) = "V5.0" + dim baseAction(5) as string + baseAction(cDBService) = "services" + baseAction(cDBOpen) = "open" + baseAction(cDBInsert) = "insert" + baseAction(cDBDelete) = "delete" + baseAction(cDBSeek) = "seek" + baseAction(cDBClose) = "close" + dim extAction(2) as string + extAction(cEXTService) = "services" + extAction(cEXTInstall) = "install" + extAction(cEXTUninstall) = "uninstall" + dim result as string + for i = 0 to cMaxErrorStates + for j = 0 to 5 + if gErrorState(i, j) = cLogFalse then + result = result & " " & component(i) & ":" + if i = cStDataBase then + result = result & baseAction(j) + else if i = cStExtension then + result = result & extAction(j) + else + result = result & action(j) + end if + end if + end if + next j + next i + StartTestWithDefaultOptions = result +end Function + +Sub DispatchSlot(SlotID as Integer) + Dim oArg() as new com.sun.star.beans.PropertyValue + Dim oUrl as new com.sun.star.util.URL + Dim oTrans as Object + Dim oDisp as Object + + oTrans = createUNOService("com.sun.star.util.URLTransformer") + oUrl.Complete = "slot:" & CStr(SlotID) + oTrans.parsestrict(oUrl) + + oDisp = StarDesktop.queryDispatch(oUrl, "_self", 0) + oDisp.dispatch(oUrl, oArg()) +End Sub + +Sub LoadLibrary( LibName As String ) + + dim args(1) + dim arg as new com.sun.star.beans.PropertyValue + arg.Name = "LibraryName" + arg.Value = LibName + args(0) = arg + + dim url as new com.sun.star.util.URL + dim trans as object + trans = createUnoService("com.sun.star.util.URLTransformer" ) + url.Complete = "slot:6517" + trans.parsestrict( url ) + + dim disp as object + disp = StarDesktop.currentFrame.queryDispatch( url, "", 0 ) + disp.dispatch( url, args() ) + +End Sub + +Sub ExecuteSlot( SlotNr As String, oDoc as Object ) + dim args() + dim url as new com.sun.star.util.URL + dim trans as object + dim disp as object + + trans = createUnoService("com.sun.star.util.URLTransformer" ) + url.Complete = "slot:" + SlotNr + trans.parsestrict( url ) + + disp = oDoc.CurrentController.Frame.queryDispatch( url, "", 0 ) + disp.dispatch( url, args() ) + +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 + Dim i% + Dim aFieldMasters, aFieldMaster as Object + Dim sElement$ + aFieldMasters = aDoc.TextFieldMasters + aElements = aFieldMasters.ElementNames + for i = 0 to UBound(aElements) + sElement$ = aElements(i) + if 0 <> instr(sElement$, cUnoUserField ) then + aFieldMaster = aFieldMasters.GetByName(sElement$) + aFieldMaster.Dispose + endif + next +end Sub + +Function GetUserFieldState (sName as String, aDoc as Object) as boolean + Dim sFieldText as String + Dim bState as boolean + sFieldText = ReadUserField (sName, aDoc) + + if LCase(sFieldText) = cYes then + bState = true + else + bState = false + end IF + + GetUserFieldState = bState +end Function + +Sub SetUserFieldState (sName as String, nState as boolean, aDoc as Object) + Dim sFieldText as String + + sFieldText = cNo 'default + + Select case nState + case true + sFieldText = cYes + case false + sFieldText = cNo + end Select + + WriteUserField (sFieldText, sName, aDoc) +end Sub + +Function ReadUserField(sFieldName as String, aDoc as Object) as String + Dim aMasters as Object + aMasters = aDoc.TextFieldMasters + if aMasters.HasByName (cUnoUserField+cUnoSeparator+sFieldName) then + ReadUserField = aMasters.GetByName (cUnoUserField+cUnoSeparator+sFieldName).Content + else + ReadUserField = "" + end If +End Function + +Sub WriteUserField(sValue as String, sFieldName as String, aDoc as Object, optional aCursor as Object) + Dim aMasters, aUserField, aTxtCursor as Object + aMasters = aDoc.TextFieldMasters + if aMasters.HasByName (cUnoUserField+cUnoSeparator+sFieldName) then + aUserField = aMasters.GetByName (cUnoUserField+cUnoSeparator+sFieldName) + else + aUserField = aDoc.CreateInstance (cUnoUserField) + aUserField.Name = sFieldName + end if + aUserField.Content = sValue +End Sub + +Sub WriteExtUserField(nIndex as Integer, aCursor as Object, aDoc as Object) + Dim aUserField as Object + aUserField = aDoc.CreateInstance (cUnoExtUserField) + aUserField.UserDataType = nIndex + aCursor.Text.InsertTextContent (aCursor, aUserField, True) + aUserField.Fix = True +End Sub +</script:module> diff --git a/smoketestoo_native/data/OptionsDlg.xml b/smoketestoo_native/data/OptionsDlg.xml new file mode 100644 index 000000000000..b993a31c9a27 --- /dev/null +++ b/smoketestoo_native/data/OptionsDlg.xml @@ -0,0 +1,64 @@ +<?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. +* +**********************************************************************--> +<!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: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: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="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"> + <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"> + <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"> + <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:bulletinboard> +</dlg:window> diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestoo_native/data/Test_10er.xml new file mode 100644 index 000000000000..636dc2129120 --- /dev/null +++ b/smoketestoo_native/data/Test_10er.xml @@ -0,0 +1,921 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_10er" script:language="StarBasic">REM 10er Test + +const sSWLogFileName = "swlog.dat", sSCLogFileName = "sclog.dat" +const sSDLogFileName = "sdlog.dat", sSMathLogFileName = "smalog.dat" +const sSImDLogFileName = "simlog.dat", sSChartLogFileName = "schlog.dat" +const sSHptLogFileName = "shptlog.dat", sSMessageLogFileName = "smeslog.dat" +const sSDrawLogFileName = "sdrwlog.dat", sJavaLogFileName = "javalog.dat" +const sSDBLogFileName = "dblog.dat", sExtLogFileName = "extlog.dat" +const sLogFileName = "log.dat" +const cTempFileName = "ttt" + +const cMessageSaveOpen8Doc = "Save/Open open Documents (8.0)" +const cMessageSaveOpenXMLDoc = "Save/Open Document XML (6/7)" +const cMessageSaveOpen50Doc = "Save/Open Document 5.0" +const cMessageNewDoc = "New Document" +const cMessageCloseDoc = "Close Document" +const cMessageCutObj = "Cut Object" +const cMessagePasteObj = "Paste Object" + +Global sWorkPath$ +Global sWorkPathURL$ +Global FileChannel% +Global MainFileChannel% + +Sub Main + call TestAllDocs() +end Sub + +Sub DeleteAllSavedFiles() + Dim sFileName as String + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmDraw) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmHyperText) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter or cFltXML) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc or cFltXML) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress or cFltXML) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmDraw or cFltXML) + 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() + If FileExists (sWorkPath+sLogFileName) then + Kill (sWorkPath+sLogFileName) + End If + If FileExists (sWorkPath+sSWLogFileName) then + Kill (sWorkPath+sSWLogFileName) + End If + If FileExists (sWorkPath+sSCLogFileName) then + Kill (sWorkPath+sSCLogFileName) + End If + If FileExists (sWorkPath+sSDLogFileName) then + Kill (sWorkPath+sSDLogFileName) + End If + If FileExists (sWorkPath+sSMathLogFileName) then + Kill (sWorkPath+sSMathLogFileName) + End If + If FileExists (sWorkPath+sSImDLogFileName) then + Kill (sWorkPath+sSImDLogFileName) + End If + If FileExists (sWorkPath+sSChartLogFileName) then + Kill (sWorkPath+sSChartLogFileName) + End If + If FileExists (sWorkPath+sSHptLogFileName) then + Kill (sWorkPath+sSHptLogFileName) + End If + If FileExists (sWorkPath+sSMessageLogFileName) then + Kill (sWorkPath+sSMessageLogFileName) + End If + If FileExists (sWorkPath+sSDrawLogFileName) then + Kill (sWorkPath+sSDrawLogFileName) + End If + If FileExists (sWorkPath+sJavaLogFileName) then + Kill (sWorkPath+sJavaLogFileName) + End If + If FileExists (sWorkPath+sSDBLogFileName) then + Kill (sWorkPath+sSDBLogFileName) + End If + If FileExists (sWorkPath+sExtLogFileName) then + Kill (sWorkPath+sExtLogFileName) + End If +end Sub + +Function OpenLogDat (sFileName as String) as Integer + Dim LocaleFileChannel% + If FileExists (sWorkPath+sFileName) then + Kill (sWorkPath+sFileName) + End If + LocaleFileChannel% = Freefile + Open sWorkPath+sFileName For Output As LocaleFileChannel% + OpenLogDat = LocaleFileChannel% +end Function + +Function GetWorkPath as string + sTemp = "$(userpath)/temp/" + GetWorkPath = CreateUnoService("com.sun.star.config.SpecialConfigManager").SubstituteVariables(sTemp) +End Function + +Function GetWorkURL as string + sTemp = "$(userurl)/temp/" + GetWorkURL = CreateUnoService("com.sun.star.config.SpecialConfigManager").SubstituteVariables(sTemp) +End Function + +Function GetSystem (sTmpWorkPath as string) as string + GetSystem = "" + if InStr (sTmpWorkPath, ":") then + GetSystem = "windows" + else + GetSystem = "unix" + End If +end Function + +Function ConvertPathToWin (sTmpWorkPath as string) as string + for i%=1 to Len(sTmpWorkPath) + sTemp = Mid (sTmpWorkPath, i%, 1) + if sTemp = "/" then + sTmpWorkPath = Left (sTmpWorkPath, i%-1) + "\" + Right (sTmpWorkPath, Len(sTmpWorkPath)-i%) + else + if sTemp = "|" then + sTmpWorkPath = Left (sTmpWorkPath, i%-1) + ":" + Right (sTmpWorkPath, Len(sTmpWorkPath)-i%) + end If + end If + next i% + ConvertPathToWin = sTmpWorkPath +end Function + +Sub TestAllDocs() +DIM sDocURL as String, sDocPath as String +DIM nStrPos as Long + + sWorkPath = GetWorkPath + sWorkPathURL = GetWorkURL + + if GetSystem (sWorkPath) = "windows" then + sWorkPath = ConvertPathToWin (sWorkPath) + end if + + 'search ExtensionURL + sDocURL = gOutPutDoc.URL + CompatibilityMode(true) + nStrPos = InStrRev (sDocURL, "/" ) + CompatibilityMode(false) + sExtensionURL = Left (sDocURL, nStrPos) + + call DeleteAllSavedFiles() + call DeleteAllLogFiles() + MainFileChannel = OpenLogDat (sLogFileName) + call WriteTestSequence (MainFileChannel) + if bMakeWriterTest then + call MakeDocTest (frmWriter) + end if + if bMakeCalcTest then + call MakeDocTest (frmCalc) + end if + if bMakeImpressTest then + call MakeDocTest (frmImpress) + end if + if bMakeDrawTest then + call MakeDocTest (frmDraw) + end if + if bMakeHTMLTest then + call MakeDocTest (frmHyperText) + end if + if bMakeChartTest then + call MakeChartTest (frmChart) + end if + if bMakeMathTest then + call MakeNewDoc (frmMath) + end if + if bMakeJavaTest then + call TestJava (frmJava) + end if + if bMakeDBTest then + call Test_DB.TestDB (frmDataBase) + end if + if bMakeExtensionTest then + call Test_Ext.TestExtensions (frmExtension) + end if + + Close #MainFileChannel +end Sub + +Sub WriteTestSequence (FileChannel as integer) + Print #FileChannel, "Sequence of testing" + + if bMakeWriterTest then + WriteTests ("writer : ", true, FileChannel) + end if + if bMakeCalcTest then + WriteTests ("calc : ", true, FileChannel) + end if + if bMakeImpressTest then + WriteTests ("impress : ", true, FileChannel) + end if + if bMakeDrawTest then + WriteTests ("draw : ", true, FileChannel) + end if + if bMakeHTMLTest then + WriteTests ("HTML : ", true, FileChannel) + end if + if bMakeChartTest then + WriteTests ("chart : ", false, FileChannel) + end if + if bMakeMathTest then + WriteTests ("math : ", false, FileChannel) + end if + if bMakeJavaTest then + WriteTests ("Java : ", false, FileChannel) + end if + if bMakeDBTest then + WriteDBTests ("Database : ", FileChannel) + end if + if bMakeExtensionTest then + WriteExtensionTests ("Extension : ", FileChannel) + end if + + Print #FileChannel +end Sub + +Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer) + Dim sWriteStr as string + + 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 + if bMakeSaveOpenXMLTest then + sWriteStr = sWriteStr + ", save XML" + end if + if bMakeSaveOpen50Test then + sWriteStr = sWriteStr + ", save 5.0" + end if + if bMakeSaveOpen8Test then + sWriteStr = sWriteStr + ", open 8.0" + end if + if bMakeSaveOpenXMLTest then + sWriteStr = sWriteStr + ", open XML" + end if + if bMakeSaveOpen50Test then + sWriteStr = sWriteStr + ", open 5.0" + end if + end if + + sWriteStr = sWriteStr + ", close" + + Print #nFileChannel, sWriteStr +end Sub + +Sub WriteDBTests (sText as string, nFileChannel as integer) + Dim sWriteStr as string + + sWriteStr = sText + sWriteStr = sWriteStr + "open / services" + sWriteStr = sWriteStr + ", insert" + sWriteStr = sWriteStr + ", delete" + sWriteStr = sWriteStr + ", seek" + sWriteStr = sWriteStr + ", close" + + Print #nFileChannel, sWriteStr +end Sub + +Sub WriteExtensionTests (sText as string, nFileChannel as integer) + Dim sWriteStr as string + + sWriteStr = sText + sWriteStr = sWriteStr + "services" + sWriteStr = sWriteStr + ", install" + sWriteStr = sWriteStr + ", uninstall" + + Print #nFileChannel, sWriteStr +end Sub + +Sub MakeDocTest (FilterType as Integer) + Dim oDoc as Object + Dim sFileNameXML$, sFileName50$, sFileName8$ + Dim bError as Boolean + Dim nCurrentAction as Integer + + On Local Error GoTo DOCTESTERROR + nCurrentAction = cLogfileFailed + FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + nCurrentAction = cDocNew + oDoc = LoadDoc ("private:factory/" + GetDocFilter(FilterType or cFltNewDoc)) + LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) + 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) + SaveDoc (sFileName8, oDoc, GetDocFilter(FilterType or cFlt8)) + end if + nCurrentAction = cDocSaveOpenXML + if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then + sFileNameXML = sWorkPathURL+cTempFileName+"."+GetDocEndings(FilterType or cFltXML) + SaveDoc (sFileNameXML, oDoc, GetDocFilter(FilterType or cFltXML)) + end if + nCurrentAction = cDocSaveOpen50 + if bMakeSaveOpen50Test and IsFilterAvailable (FilterType or cFlt50) then + sFileName50 = sWorkPathURL+cTempFileName+"."+GetDocEndings(FilterType or cFlt50) + SaveDoc (sFileName50, oDoc, GetDocFilter(FilterType or cFlt50)) + end if +' oDoc.dispose + nCurrentAction = cDocClose + oDoc.close (true) +' bError = true ' nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht +' LogState (bError, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, FileChannel) +' LogState (bError, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, MainFileChannel) +' SetStatus (FilterType, cDocClose, bError) + nCurrentAction = cDocSaveOpen8 + if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then + oDoc = LoadDoc (sFileName8) + +' oDoc = Documents.open(sFileName) + LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen8Doc, FileChannel) + LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen8Doc, MainFileChannel) + SetStatus (FilterType, cDocSaveOpen8, not IsNull (oDoc)) + + if not IsNull (oDoc) then +' oDoc.dispose + nCurrentAction = cDocClose + oDoc.close (true) + end If + end if + + nCurrentAction = cDocSaveOpenXML + if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then + oDoc = LoadDoc (sFileNameXML) + +' oDoc = Documents.open(sFileName) + LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpenXMLDoc, FileChannel) + LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpenXMLDoc, MainFileChannel) + SetStatus (FilterType, cDocSaveOpenXML, not IsNull (oDoc)) + + if not IsNull (oDoc) then +' oDoc.dispose + nCurrentAction = cDocClose + oDoc.close (true) + end If + end if + + nCurrentAction = cDocSaveOpen50 + if bMakeSaveOpen50Test and IsFilterAvailable (FilterType or cFlt50) then + oDoc = LoadDoc (sFileName50) + +' oDoc = Documents.open(sFileName) + LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen50Doc, FileChannel) + LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen50Doc, MainFileChannel) + SetStatus (FilterType, cDocSaveOpen50, not IsNull (oDoc)) + + if not IsNull (oDoc) then +' oDoc.dispose + nCurrentAction = cDocClose + oDoc.close (true) + end If + end if + end If + Print #FileChannel, "---" + Close #FileChannel% + Exit Sub ' Without error + + DOCTESTERROR: + If (nCurrentAction = cLogfileFailed) then + SetStatus (FilterType, cDocNew, False) + Exit Sub + else + LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), FileChannel) + LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), MainFileChannel) + SetStatus (FilterType, nCurrentAction, False) + Close #FileChannel% + End If + Exit Sub ' With error +End Sub + +Sub MakeNewDoc (FilterType as Integer) + DIM oDoc as Object + Dim bError as Boolean + Dim nCurrentAction as Integer + On Local Error GoTo DOCTESTERROR2 + nCurrentAction = cLogfileFailed + FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + nCurrentAction = cDocNew +' oDoc = Documents.Add(GetDocFilter(FilterType)) + oDoc = LoadDoc ("private:factory/" + GetDocFilter(FilterType or cFltNewDoc)) + LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) + LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) + SetStatus (FilterType, cDocNew, not IsNull (oDoc)) + if not IsNull (oDoc) then + nCurrentAction = cDocClose +' oDoc.dispose + oDoc.close (true) +' bError = true ' nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht +' LogState (bError, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, FileChannel) +' LogState (bError, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, MainFileChannel) +' SetStatus (FilterType, cDocClose, bError) + end If + Print #FileChannel, "---" + Close #FileChannel% + Exit Sub ' Without error + + DOCTESTERROR2: + If (nCurrentAction = cLogfileFailed) then + SetStatus (FilterType, cDocNew, False) + Exit Sub + else + LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), FileChannel) + LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), MainFileChannel) + SetStatus (FilterType, nCurrentAction, False) + Close #FileChannel% + End If + Exit Sub ' With error +End Sub + +Sub MakeChartTest (FilterType as Integer) + Dim oCharts as Object + Dim oDoc as Object + Dim oRange(0) as New com.sun.star.table.CellRangeAddress + Dim oRect as New com.sun.star.awt.Rectangle + const cChartName="TestChart" + Dim bError as Boolean + Dim nCurrentAction as Integer + On Local Error GoTo CHARTTESTERROR + nCurrentAction = cLogfileFailed + FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + nCurrentAction = cDocNew + oDoc = LoadDoc ("private:factory/" + GetDocFilter(frmCalc or cFltNewDoc)) + if not IsNull (oDoc) then + oCharts = oDoc.sheets(0).Charts + oCharts.AddNewByName (cChartName, oRect, oRange(), true, true) + bError=oCharts.HasByName(cChartName) + LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) + LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) + SetStatus (FilterType, cDocNew, bError) +' oDoc.dispose + nCurrentAction = cDocClose + oDoc.close (true) + else + LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) + LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) + SetStatus (frmCalc, cDocNew, not IsNull (oDoc)) + End if + Print #FileChannel, "---" + Close #FileChannel% + Exit Sub ' Without error + + CHARTTESTERROR: + If (nCurrentAction = cLogfileFailed) then + SetStatus (FilterType, cDocNew, False) + Exit Sub + else + LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), FileChannel) + LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), MainFileChannel) + SetStatus (FilterType, nCurrentAction, False) + Close #FileChannel% + End If + Exit Sub ' With error +End Sub + +Sub LogState (bState as Boolean, sText as String, nLocaleFileChannel as integer) + if bState then + Print #nLocaleFileChannel, sText+" -> ok" + else + Print #nLocaleFileChannel, sText+" -> error" + end If +end Sub + +Function GetDocEndings (DocType as Integer) as String + Select Case ( DocType ) + case frmWriter or cFlt8 + GetDocEndings = "odt" ' Textdokument + case frmCalc or cFlt8 + GetDocEndings = "ods" 'Tabellendokument + case frmImpress or cFlt8 + GetDocEndings = "odp" 'PrÕsentation + case frmDraw or cFlt8 + GetDocEndings = "odg" 'Zeichen + case frmHyperText, frmHyperText or cFlt50, 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 + GetDocEndings = "sxc" 'Tabellendokument + case frmImpress or cFltXML + GetDocEndings = "sxi" 'PrÕsentation + case frmDraw or cFltXML + GetDocEndings = "sxd" 'Zeichen + case else + GetDocEndings = "" + end Select +end Function + +Function GetDocFilter (DocType as Integer) as String + Select Case ( DocType ) + case frmWriter or cFlt8 + GetDocFilter = "writer8" ' Textdokument + case frmCalc or cFlt8 + GetDocFilter = "calc8" 'Tabellendokument + case frmImpress or cFlt8 + GetDocFilter = "impress8" 'Präsentation + case frmDraw or cFlt8 + GetDocFilter = "draw8" 'Zeichen + case frmMath or cFlt8 + GetDocFilter = "math8" 'Formel + + case frmWriter or cFltXML + GetDocFilter = "StarOffice XML (Writer)" ' Textdokument + case frmCalc or cFltXML + GetDocFilter = "StarOffice XML (Calc)" 'Tabellendokument + case frmImpress or cFltXML + GetDocFilter = "StarOffice XML (Impress)" 'Präsentation + case frmDraw or cFltXML + GetDocFilter = "StarOffice XML (Draw)" 'Zeichen + case frmMath or cFltXML + GetDocFilter = "StarOffice XML (Math)" 'Formel + + case frmHyperText, frmHyperText or cFlt50, 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 + case frmCalc or cFltNewDoc + GetDocFilter = "scalc" 'Tabellendokument + case frmMessage or cFltNewDoc + GetDocFilter = "Message" 'Nachricht + case frmImpress or cFltNewDoc + GetDocFilter = "simpress" 'Präsentation + case frmDraw or cFltNewDoc + GetDocFilter = "sdraw" 'Zeichen + case frmMath or cFltNewDoc + GetDocFilter = "smath" 'Formel + case frmImage or cFltNewDoc + GetDocFilter = "simage" 'Bild + case frmHyperText or cFltNewDoc + GetDocFilter = "swriter/web" 'Hypertext-Dokument + case frmChart or cFltNewDoc + GetDocFilter = "schart" 'Diagramm + case else + GetDocFilter = "" + end Select +end Function + +Function GetLogFileName (DocType as Integer) as String + Select Case ( DocType ) + case frmWriter + GetLogFileName = sSWLogFileName ' Textdokument + case frmCalc + GetLogFileName = sSCLogFileName 'Tabellendokument + case frmMessage + GetLogFileName = sSMessageLogFileName 'Nachricht + case frmImpress + GetLogFileName = sSDLogFileName 'PrÕsentation + case frmDraw + GetLogFileName = sSDrawLogFileName 'Zeichnen + case frmMath + GetLogFileName = sSMathLogFileName 'Formel + case frmImage + GetLogFileName = sSImDLogFileName 'Bild + case frmHyperText + GetLogFileName = sSHptLogFileName 'Hypertext-Dokument + case frmChart + GetLogFileName = sSChartLogFileName 'Diagramm + case frmJava + GetLogFileName = sJavaLogFileName 'Java + case frmDataBase + GetLogFileName = sSDBLogFileName 'Database + case frmExtension + GetLogFileName = sExtLogFileName 'Extension + case else + GetLogFileName = "" + end Select +end Function + +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 + GetErrorMessageOnAction = cMessageSaveOpenXMLDoc + case cDocSaveOpen50 + GetErrorMessageOnAction = cMessageSaveOpen50Doc + case cDocClose + GetErrorMessageOnAction = cMessageCloseDoc + case else + GetErrorMessageOnAction = "" + end Select +end Function + +Function IsFilterAvailable (FilterType as Integer) as boolean + IsFilterAvailable = true + if ((FilterType = (frmHyperText or cFlt50)) or (FilterType = (frmHyperText or cFltXML))) then + IsFilterAvailable = false + end if +End Function + +Function TestJava (FilterType as Integer) as boolean + Dim oObj as Object + FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + oObj = createUnoService(cUnoJavaLoader) + LogState (not IsNull (oObj), "Java "+ cMessageNewDoc, FileChannel) + LogState (not IsNull (oObj), "Java "+ cMessageNewDoc, MainFileChannel) + SetStatus (FilterType, cDocNew, not IsNull (oObj)) + + Print #FileChannel, "---" + Close #FileChannel% + + 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) + dim arg as new com.sun.star.beans.PropertyValue + arg.Name = "LibraryName" + arg.Value = LibName + args(0) = arg + + dim url as new com.sun.star.util.URL + dim trans as object + trans = createUnoService("com.sun.star.util.URLTransformer" ) + url.Complete = "slot:6517" + trans.parsestrict( url ) + + dim disp as object + disp = StarDesktop.currentFrame.queryDispatch( url, "", 0 ) + disp.dispatch( url, args() ) + +End Sub + +Sub LoadDoc (DocName as String) as Object + dim trans as object + trans = createUnoService("com.sun.star.util.URLTransformer" ) + url = createUnoStruct("com.sun.star.util.URL" ) + url.Complete = DocName + if Left(DocName, 5 ) <> "file:" then + trans.parsestrict( url ) + endif + + Dim aPropArray(0) as Object + aPropArray(0) = CreateUnoStruct("com.sun.star.beans.PropertyValue") + aPropArray(0).Name = "OpenFlags" + aPropArray(0).Value = "S" + + dim doc as object + dim noargs() + doc = StarDesktop.loadComponentFromURL( url.Complete, "_blank", 0, aPropArray() ) ' XModel + LoadDoc = doc +End Sub + +Sub SaveDoc (DocName as String, oDoc as Object, sFilterName as string ) + dim trans as object + trans = createUnoService("com.sun.star.util.URLTransformer" ) + url = createUnoStruct("com.sun.star.util.URL" ) + url.Complete = DocName + if Left(DocName, 5 ) <> "file:" then + trans.parsestrict( url ) + endif + + if not (sFilterName = "") then + Dim aPropArray(0) as Object + aPropArray(0) = CreateUnoStruct("com.sun.star.beans.PropertyValue") + aPropArray(0).Name = "FilterName" + aPropArray(0).Value = sFilterName + + oDoc.storeAsURL( url.Complete, aPropArray() ) + else + MessageBox "Filtername is unknown!" + end if +end Sub +</script:module> diff --git a/smoketestoo_native/data/Test_DB.xml b/smoketestoo_native/data/Test_DB.xml new file mode 100644 index 000000000000..34ade11f75fb --- /dev/null +++ b/smoketestoo_native/data/Test_DB.xml @@ -0,0 +1,161 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_DB" script:language="StarBasic">REM ***** Database Test ***** + +const cMessageDatabaseService = "Database Service" +const cMessageDatabaseOpen = "Open Database" +const cMessageDatabaseInsert = "Insert record into Database" +const cMessageDatabaseDelete = "Delete record from Database" +const cMessageDatabaseSeek = "Read other record from Database" +const cMessageDatabaseClose = "Close Database" + +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 = "Automatical Test" + + + On Local Error GoTo DBERROR + + nCurrentAction = cLogfileFailed + FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + + nCurrentAction = cDBService + sCurrentMessage = cMessageDatabaseService + " " + cUnoDatabaseContext + + oDBContext = CreateUnoService(cUnoDatabaseContext) + sDBName=oDBContext.ElementNames(0) 'Names of Databases + + nCurrentAction = cDBOpen + sCurrentMessage = cMessageDatabaseOpen + + oDataSource = oDBContext.GetByName(sDBName) + sTable=oDataSource.Tables.ElementNames(0) + oDBConnection = oDBContext.GetByName(sDBName).GetConnection("","") + + LogState (not IsNull (oDBConnection), "Database "+ cMessageDatabaseOpen, FileChannel) + LogState (not IsNull (oDBConnection), "Database "+ cMessageDatabaseOpen, MainFileChannel) + SetStatus (FilterType, cDBOpen, not IsNull (oDBConnection)) + if (IsNull(oDBConnection)) then + Close #FileChannel% + Exit Sub + End If + + ' Database is open now + + nCurrentAction = cDBService + sCurrentMessage = cMessageDatabaseService + " " + cUnoRowSet + oRowSet = createUnoService(cUnoRowSet) + + if (IsNull(oRowSet)) then + LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService + " " + cUnoRowSet, FileChannel) + LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService + " " + cUnoRowSet, MainFileChannel) + SetStatus (FilterType, cDBService, not IsNull (oRowSet)) + Exit Sub + else + LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService, FileChannel) + LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService, MainFileChannel) + SetStatus (FilterType, cDBService, not IsNull (oRowSet)) + End If + + nCurrentAction = cDBInsert + sCurrentMessage = cMessageDatabaseInsert + + oRowSet.ActiveConnection = oDBConnection + + oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND + oRowSet.Command = "SELECT * FROM " + sTable + oRowSet.execute() + + oRowSet.moveToInsertRow + oRowSet.updateString(5, sTestString) + + oRowSet.insertRow() + nRowCount=oRowSet.RowCount + + oRowSet.moveToCurrentRow() + + bResult = (oRowSet.getString(5) = sTestString) + LogState (bResult, "Database "+ cMessageDatabaseInsert, FileChannel) + LogState (bResult, "Database "+ cMessageDatabaseInsert, MainFileChannel) + SetStatus (FilterType, cDBInsert, bResult) + + 'delete only if insert passed + + if (bResult) Then + nCurrentAction = cDBDelete + sCurrentMessage = cMessageDatabaseDelete + oRowSet.deleteRow() + bResult = (nRowCount - oRowSet.RowCount = 0) + if ( bResult ) Then + oRowSet.next() + bResult = (nRowCount - oRowSet.RowCount = 1) + End If + LogState (bResult, "Database "+ cMessageDatabaseDelete, FileChannel) + LogState (bResult, "Database "+ cMessageDatabaseDelete, MainFileChannel) + SetStatus (FilterType, cDBDelete, bResult) + End If + + ' read other record + + nCurrentAction = cDBSeek + sCurrentMessage = cMessageDatabaseSeek + oRowSet.first() + bResult = not (oRowSet.getString(5) = sTestString) + LogState (bResult, "Database "+ cMessageDatabaseSeek, FileChannel) + LogState (bResult, "Database "+ cMessageDatabaseSeek, MainFileChannel) + SetStatus (FilterType, cDBSeek, bResult) + + nCurrentAction = cDBClose + sCurrentMessage = cMessageDatabaseClose + oDBConnection.Dispose() + LogState (True, "Database "+ cMessageDatabaseClose, FileChannel) + LogState (True, "Database "+ cMessageDatabaseClose, MainFileChannel) + SetStatus (FilterType, cDBClose, True) + + Print #FileChannel, "---" + Close #FileChannel% + Exit Sub ' Without error + + DBERROR: + If (nCurrentAction = cLogfileFailed) then + SetStatus (FilterType, cDBOpen, False) + Exit Sub + else + LogState (False, "Database "+ sCurrentMessage, FileChannel) + LogState (False, "Database "+ sCurrentMessage, MainFileChannel) + SetStatus (FilterType, nCurrentAction, False) + Close #FileChannel% + End If + Exit Sub ' With error +End Sub +</script:module> diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestoo_native/data/Test_Ext.xml new file mode 100644 index 000000000000..31d27dc7a4a7 --- /dev/null +++ b/smoketestoo_native/data/Test_Ext.xml @@ -0,0 +1,121 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_Ext" script:language="StarBasic">REM ***** BASIC ***** + +const cMessageExtensionService = "Extension Service" +const cMessageExtensionInstall = "Install Extension" +const cMessageExtensionUninstall = "Uninstall Extension" + +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 + "$_TestExtension" + + On Local Error GoTo EXTERROR + + nCurrentAction = cLogfileFailed + FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + + sCurrentMessage = cMessageExtensionService + nCurrentAction = cEXTService + + 'Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for + 'adding the extension. The implementation is in + 'javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java and the code is in juh.jar + cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment) + + 'Create the component context and then get the singleton ExtensionManager + 'A singleton cannot be created with createUnoService + ctx = getDefaultContext + ext_mgr = ctx.getValueByName("/singletons/" + cExtensionManager) + + LogState (not IsNull (ext_mgr), "Extension "+ cMessageExtensionService, FileChannel) + LogState (not IsNull (ext_mgr), "Extension "+ cMessageExtensionService, MainFileChannel) + SetStatus (FilterType, cEXTService, not IsNull (ext_mgr)) + if (IsNull(ext_mgr)) then + Close #FileChannel% + Exit Sub + End If + + sCurrentMessage = cMessageExtensionInstall + nCurrentAction = cEXTInstall + + 'Add the extension. We must provide a file URL here. + 'By passing "user" we determine that the actions we perform on + 'XExtensionManager only affect the user installation. To modify the share installation one would pass "share". + + Dim props() as Object + ext_mgr.addExtension(sExtensionURL + cExtensionFileName, props, "user", obj_null, cmdEnv) + + '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, "Extension "+ cMessageExtensionInstall, FileChannel) + LogState (bResult, "Extension "+ cMessageExtensionInstall, MainFileChannel) + SetStatus (FilterType, cEXTInstall, bResult) + if (not bResult) then + Close #FileChannel% + Exit Sub + End If + + sCurrentMessage = cMessageExtensionUninstall + nCurrentAction = cEXTUninstall + + 'Remove the package + ext_mgr.removeExtension("org.openoffice.legacy." + cExtensionFileName, cExtensionFileName, "user",obj_null, cmdEnv) + + 'Try to create the service which is contained in the now removed extension. + oTestExtension = createUnoService(cUnoSmoketestTestExtension) + + 'The service must not be available anymore. Therefor isNull must return true. + LogState (IsNull (oTestExtension), "Extension "+ cMessageExtensionUninstall, FileChannel) + LogState (IsNull (oTestExtension), "Extension "+ cMessageExtensionUninstall, MainFileChannel) + SetStatus (FilterType, cEXTUninstall, IsNull (oTestExtension)) + + Print #FileChannel, "---" + Close #FileChannel% + Exit Sub ' Without error + + EXTERROR: + If (nCurrentAction = cLogfileFailed) then + SetStatus (FilterType, cEXTService, False) + Exit Sub + else + LogState (False, "Extension "+ sCurrentMessage, FileChannel) + LogState (False, "Extension "+ sCurrentMessage, MainFileChannel) + SetStatus (FilterType, nCurrentAction, False) + Close #FileChannel% + End If + Exit Sub ' With error + +End Sub +</script:module> diff --git a/smoketestoo_native/data/content.xml b/smoketestoo_native/data/content.xml new file mode 100644 index 000000000000..bc63d1d2c551 --- /dev/null +++ b/smoketestoo_native/data/content.xml @@ -0,0 +1,28 @@ +<?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="'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="SaveOpen50"/><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> diff --git a/smoketestoo_native/data/dialog-lb.xml b/smoketestoo_native/data/dialog-lb.xml new file mode 100644 index 000000000000..973dfe688828 --- /dev/null +++ b/smoketestoo_native/data/dialog-lb.xml @@ -0,0 +1,31 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="OptionsDlg"/> +</library:library> diff --git a/smoketestoo_native/data/dialog-lc.xml b/smoketestoo_native/data/dialog-lc.xml new file mode 100644 index 000000000000..e3a5a0e326e4 --- /dev/null +++ b/smoketestoo_native/data/dialog-lc.xml @@ -0,0 +1,31 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd"> +<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink"> + <library:library library:name="Standard" library:link="false"/> +</library:libraries> diff --git a/smoketestoo_native/data/makefile.mk b/smoketestoo_native/data/makefile.mk new file mode 100644 index 000000000000..2096d07de90e --- /dev/null +++ b/smoketestoo_native/data/makefile.mk @@ -0,0 +1,70 @@ +#************************************************************************* +# +# 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 = smoketestoo_native +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 + $(RM) -r $(MISC)/zip + $(MKDIR) $(MISC)/zip + $(COPY) content.xml meta.xml settings.xml styles.xml $(MISC)/zip/ + printf application/vnd.sun.xml.writer > $(MISC)/zip/mimetype + $(MKDIR) $(MISC)/zip/META-INF + $(COPY) manifest.xml $(MISC)/zip/META-INF/ + $(MKDIR) $(MISC)/zip/Basic + $(COPY) script-lc.xml $(MISC)/zip/Basic/ + $(MKDIR) $(MISC)/zip/Basic/Standard + $(COPY) script-lb.xml Events.xml Global.xml Test_10er.xml Test_DB.xml \ + Test_Ext.xml $(MISC)/zip/Basic/Standard/ + $(MKDIR) $(MISC)/zip/Dialogs + $(COPY) dialog-lc.xml $(MISC)/zip/Dialogs/ + $(MKDIR) $(MISC)/zip/Dialogs/Standard + $(COPY) dialog-lb.xml OptionsDlg.xml $(MISC)/zip/Dialogs/Standard/ + cd $(MISC)/zip && zip -rD $(@:f) . + +.INCLUDE: target.mk diff --git a/smoketestoo_native/data/manifest.xml b/smoketestoo_native/data/manifest.xml new file mode 100644 index 000000000000..48fc9ce900a0 --- /dev/null +++ b/smoketestoo_native/data/manifest.xml @@ -0,0 +1,49 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"> +<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> + <manifest:file-entry manifest:media-type="application/vnd.sun.xml.writer" manifest:full-path="/"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Dialogs/dialog-lc.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Dialogs/Standard/dialog-lb.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Dialogs/Standard/OptionsDlg.xml"/> + <manifest:file-entry manifest:media-type="" manifest:full-path="Dialogs/Standard/"/> + <manifest:file-entry manifest:media-type="" manifest:full-path="Dialogs/"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Global.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Events.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Test_DB.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/script-lb.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Test_10er.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/Standard/Test_Ext.xml"/> + <manifest:file-entry manifest:media-type="" manifest:full-path="Basic/Standard/"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="Basic/script-lc.xml"/> + <manifest:file-entry manifest:media-type="" manifest:full-path="Basic/"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="styles.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="meta.xml"/> + <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="settings.xml"/> +</manifest:manifest> diff --git a/smoketestoo_native/data/meta.xml b/smoketestoo_native/data/meta.xml new file mode 100644 index 000000000000..43f14295e2b3 --- /dev/null +++ b/smoketestoo_native/data/meta.xml @@ -0,0 +1,28 @@ +<?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-meta xmlns:office="http://openoffice.org/2000/office" 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:ooo="http://openoffice.org/2004/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"><office:meta><meta:generator>Oracle_Open_Office/3.2$Win32 OpenOffice.org_project/300m77$Build-9496$CWS-renaissance2</meta:generator><meta:creation-date>2001-06-08T15:59:03</meta:creation-date><dc:date>2007-01-18T12:45:22</dc:date><dc:language>de-DE</dc:language><meta:editing-cycles>0</meta:editing-cycles><meta:editing-duration>PT0S</meta:editing-duration><meta:user-defined meta:name="Info 0"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="0" meta:character-count="3"/></office:meta></office:document-meta> diff --git a/smoketestoo_native/data/script-lb.xml b/smoketestoo_native/data/script-lb.xml new file mode 100644 index 000000000000..fc4f6c6370ba --- /dev/null +++ b/smoketestoo_native/data/script-lb.xml @@ -0,0 +1,35 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false"> + <library:element library:name="Global"/> + <library:element library:name="Test_10er"/> + <library:element library:name="Test_DB"/> + <library:element library:name="Events"/> + <library:element library:name="Test_Ext"/> +</library:library> diff --git a/smoketestoo_native/data/script-lc.xml b/smoketestoo_native/data/script-lc.xml new file mode 100644 index 000000000000..e3a5a0e326e4 --- /dev/null +++ b/smoketestoo_native/data/script-lc.xml @@ -0,0 +1,31 @@ +<?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. +* +**********************************************************************--> +<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd"> +<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink"> + <library:library library:name="Standard" library:link="false"/> +</library:libraries> diff --git a/smoketestoo_native/data/settings.xml b/smoketestoo_native/data/settings.xml new file mode 100644 index 000000000000..cd4524b741ff --- /dev/null +++ b/smoketestoo_native/data/settings.xml @@ -0,0 +1,28 @@ +<?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-settings xmlns:office="http://openoffice.org/2000/office" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="http://openoffice.org/2001/config" xmlns:ooo="http://openoffice.org/2004/office" office:version="1.2"><office:settings><config:config-item-set config:name="view-settings"><config:config-item config:name="ViewAreaTop" config:type="int">0</config:config-item><config:config-item config:name="ViewAreaLeft" config:type="int">0</config:config-item><config:config-item config:name="ViewAreaWidth" config:type="int">36382</config:config-item><config:config-item config:name="ViewAreaHeight" config:type="int">17120</config:config-item><config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item><config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item><config:config-item-map-indexed config:name="Views"><config:config-item-map-entry><config:config-item config:name="ViewId" config:type="string">view2</config:config-item><config:config-item config:name="ViewLeft" config:type="int">17120</config:config-item><config:config-item config:name="ViewTop" config:type="int">3002</config:config-item><config:config-item config:name="VisibleLeft" config:type="int">0</config:config-item><config:config-item config:name="VisibleTop" config:type="int">0</config:config-item><config:config-item config:name="VisibleRight" config:type="int">36380</config:config-item><config:config-item config:name="VisibleBottom" config:type="int">17119</config:config-item><config:config-item config:name="ZoomType" config:type="short">0</config:config-item><config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item><config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item><config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item><config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item></config:config-item-map-entry></config:config-item-map-indexed></config:config-item-set><config:config-item-set config:name="configuration-settings"><config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">false</config:config-item><config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item><config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item><config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item><config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item><config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item><config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item><config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item><config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item><config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item><config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item><config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item><config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item><config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item><config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item><config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item><config:config-item config:name="PrinterSetup" config:type="base64Binary">GgX+/01pY3Jvc29mdCBYUFMgRG9jdW1lbnQgV3JpdGVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATWljcm9zb2Z0IFhQUyBEb2N1bWVudCBXcml0ZXIAAAAWAAEAPAQAAAAAAAAFAFZUAAAkbQAAM1ROVwIACABNAGkAYwByAG8AcwBvAGYAdAAgAFgAUABTACAARABvAGMAdQBtAGUAbgB0ACAAVwByAGkAdABlAHIAAAAAAAAAAQQABtwAWAMD/wAAAQABAJoLNAhkAAEADwBYAgIAAQBYAgIAAABBADQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAACAAAAAQAAAP////8AAAAAAAAAAAAAAAAAAAAARElOVSIAEAFMAwwAytL2cgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAQAQAAU01USgAAAAAQAAABTQBpAGMAcgBvAHMAbwBmAHQAIABYAFAAUwAgAEQAbwBjAHUAbQBlAG4AdAAgAFcAcgBpAHQAZQByAAAASW5wdXRCaW4ARk9STVNPVVJDRQBSRVNETEwAVW5pcmVzRExMAEludGVybGVhdmluZwBPRkYASW1hZ2VUeXBlAEpQRUdNZWQAT3JpZW50YXRpb24AUE9SVFJBSVQAQ29sbGF0ZQBPRkYAUmVzb2x1dGlvbgBPcHRpb24xAFBhcGVyU2l6ZQBMRVRURVIAQ29sb3JNb2RlADI0YnBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAABNWERXAQEAABIAQ09NUEFUX0RVUExFWF9NT0RFDgBEVVBMRVhfVU5LTk9XTg==</config:config-item><config:config-item config:name="CurrentDatabaseDataSource" config:type="string">Adreßbuch</config:config-item><config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item><config:config-item config:name="CurrentDatabaseCommand" config:type="string">adressen</config:config-item><config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item><config:config-item config:name="ApplyUserData" config:type="boolean">false</config:config-item><config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item><config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item><config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">true</config:config-item><config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item><config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item><config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item><config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">false</config:config-item><config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">true</config:config-item><config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item><config:config-item config:name="PrinterName" config:type="string">Microsoft XPS Document Writer</config:config-item><config:config-item config:name="PrintFaxName" config:type="string"/><config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">true</config:config-item><config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item><config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">true</config:config-item><config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item><config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item><config:config-item config:name="UseFormerTextWrapping" config:type="boolean">true</config:config-item><config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item><config:config-item config:name="AlignTabStopPosition" config:type="boolean">false</config:config-item><config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item><config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">true</config:config-item><config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item><config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item><config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">true</config:config-item><config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item><config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item><config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item><config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item><config:config-item config:name="UseFormerLineSpacing" config:type="boolean">true</config:config-item><config:config-item config:name="AddExternalLeading" config:type="boolean">false</config:config-item><config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">true</config:config-item><config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/><config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item><config:config-item config:name="UseOldNumbering" config:type="boolean">true</config:config-item><config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item><config:config-item config:name="PrinterIndependentLayout" config:type="string">disabled</config:config-item><config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item><config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item><config:config-item config:name="UpdateFromTemplate" config:type="boolean">false</config:config-item></config:config-item-set></office:settings></office:document-settings> diff --git a/smoketestoo_native/data/smoketestdoc.sxw b/smoketestoo_native/data/smoketestdoc.sxw Binary files differdeleted file mode 100755 index 84f5d231b3b7..000000000000 --- a/smoketestoo_native/data/smoketestdoc.sxw +++ /dev/null diff --git a/smoketestoo_native/data/styles.xml b/smoketestoo_native/data/styles.xml new file mode 100644 index 000000000000..3f8d75fa6db3 --- /dev/null +++ b/smoketestoo_native/data/styles.xml @@ -0,0 +1,28 @@ +<?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-styles 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: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" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"><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:styles><style:default-style style:family="graphics"><style:properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false" fo:color="#000000" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"><style:tab-stops/></style:properties></style:default-style><style:default-style style:family="paragraph"><style:properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="lr-tb" fo:color="#000000" style:font-name="Thorndale" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="HG Mincho Light J" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Arial Unicode MS" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/></style:default-style><style:default-style style:family="table"><style:properties table:border-model="separating"/></style:default-style><style:default-style style:family="table-row"><style:properties fo:keep-together="always"/></style:default-style><style:style style:name="Standard" style:family="paragraph" style:class="text"/><style:style style:name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"><style:properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/></style:style><style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text body" style:class="text"><style:properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="true" style:font-name="Arial" fo:font-size="14pt"/></style:style><style:style style:name="List" style:family="paragraph" style:parent-style-name="Text body" style:class="list"/><style:style style:name="Table Contents" style:family="paragraph" style:parent-style-name="Text body" style:class="extra"/><style:style style:name="Table Heading" style:family="paragraph" style:parent-style-name="Table Contents" style:class="extra"><style:properties fo:text-align="center" style:justify-single-word="false" fo:font-style="italic" fo:font-weight="bold"/></style:style><style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"><style:properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" fo:font-size="10pt" fo:font-style="italic"/></style:style><style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"/><style:style style:name="Footnote Symbol" style:family="text"/><style:style style:name="Endnote Symbol" style:family="text"/><text:outline-style style:name="Outline"><text:outline-level-style text:level="1" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="2" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="3" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="4" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="5" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="6" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="7" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="8" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="9" style:num-format=""><style:properties/></text:outline-level-style><text:outline-level-style text:level="10" style:num-format=""><style:properties/></text:outline-level-style></text:outline-style><text:footnotes-configuration text:citation-style-name="Footnote Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/><text:endnotes-configuration text:citation-style-name="Endnote Symbol" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/><text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/></office:styles><office:automatic-styles><style:page-master style:name="Mpm1"><style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"><style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/></style:properties><style:header-style/><style:footer-style/></style:page-master><style:page-master style:name="Mpm2"><style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"><style:footnote-sep style:adjustment="left" style:rel-width="25%" style:color="#000000"/></style:properties><style:header-style/><style:footer-style/></style:page-master></office:automatic-styles><office:master-styles><style:master-page style:name="Standard" style:page-master-name="Mpm1"/><style:master-page style:name="Endnote" style:page-master-name="Mpm2"/></office:master-styles></office:document-styles> diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk index 3dccb111c24b..e954549fdca9 100644 --- a/smoketestoo_native/makefile.mk +++ b/smoketestoo_native/makefile.mk @@ -54,13 +54,10 @@ DEF1NAME = $(SHL1TARGET) ALLTAR : cpptest -cpptest : $(SHL1TARGETN) $(BIN)/smoketestdoc.sxw +cpptest : $(SHL1TARGETN) OOO_CPPTEST_ARGS = $(SHL1TARGETN) -env:arg-doc=$(BIN)/smoketestdoc.sxw -$(BIN)/smoketestdoc.sxw: data/smoketestdoc.sxw - $(COPY) $< $@ - .IF "$(OS)" != "WNT" $(installationtest_instpath).flag : $(shell ls \ $(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).tar.gz) diff --git a/smoketestoo_native/prj/build.lst b/smoketestoo_native/prj/build.lst index f4bd5368c65b..147a363d3da5 100644 --- a/smoketestoo_native/prj/build.lst +++ b/smoketestoo_native/prj/build.lst @@ -1,4 +1,5 @@ smtoon smoketestoo_native :: instsetoo_native test 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 nmake - all,test10 smoketestoonative_mk 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 |