diff options
Diffstat (limited to 'qadevOOo/tests/basic/mod/xmloff/Chart')
12 files changed, 641 insertions, 0 deletions
diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/script.xlb new file mode 100644 index 000000000000..ae6a259d82c9 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="xmloff_Chart_XMLContentExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLContentExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/xmloff_Chart_XMLContentExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/xmloff_Chart_XMLContentExporter.xba new file mode 100644 index 000000000000..c8a21a08aa86 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentExporter/xmloff_Chart_XMLContentExporter.xba @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Chart_XMLContentExporter" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +' REQUIRED VARIABLES for interface/service tests: + +'Required for com.sun.star.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLContentExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim oChartTitle As Variant + Dim filter As Variant + Dim Tag1, Tag2, Tag3 As Variant + Dim printXML As Boolean + Dim expString As String + + printXML = true + expString = "a - b" + expString = "NewTitleOfDiagram" + oMSF = getProcessServiceManager() + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document-content") + Tag2 = Array("office:body") + Tag3 = Array("chart:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("CharsEnclosed", Tag3, expString) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Chart.XMLContentExporter", initArgs()) + + oChartTitle = oDoc.getTitle() + oChartTitle.setPropertyValue("String", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "schart: StarOffice XML (Chart)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/script.xlb new file mode 100644 index 000000000000..0443584ec192 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="xmloff_Chart_XMLContentImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLContentImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/xmloff_Chart_XMLContentImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/xmloff_Chart_XMLContentImporter.xba new file mode 100644 index 000000000000..4a854600f820 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLContentImporter/xmloff_Chart_XMLContentImporter.xba @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Chart_XMLContentImporter" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +' REQUIRED VARIABLES for interface/service tests: + +' Required for com.sun.star.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLContentImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = createUnoService("com.sun.star.comp.Chart.XMLContentImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sValue = "XMLContentImporter_test" + vXMLData = Array( _ + Array("start", "office:document-content", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:chart", "CDATA", "http://openoffice.org/2000/chart", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "office:class", "CDATA", "chart", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "chart:chart"), _ + Array("start", "chart:title"), _ + Array("start", "text:p"), _ + Array("chars", sValue), _ + Array("end", "text:p"), _ + Array("end", "chart:title"), _ + Array("end", "chart:chart"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oTitle As Object + Dim title As String + out.log("checking of import...") + oTitle = oDoc.getTitle() + title = oTitle.getPropertyValue("String") + res = (title = sValue) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/script.xlb new file mode 100644 index 000000000000..f45b86cbbf74 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="xmloff_Chart_XMLExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/xmloff_Chart_XMLExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/xmloff_Chart_XMLExporter.xba new file mode 100644 index 000000000000..d43b51b06c35 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLExporter/xmloff_Chart_XMLExporter.xba @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Chart_XMLExporter" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +' REQUIRED VARIABLES for interface/service tests: + +'Required for com.sun.star.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim docInfo As Variant + Dim filter As Variant + Dim Tag1, Tag2, Tag3, Tag4 As Variant + Dim printXML As Boolean + Dim expString As String + + printXML = true + expString = "NewTitleOfChartDocument" + oMSF = getProcessServiceManager() + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + Tag1 = Array("office:document") + Tag2 = Array("office:meta") + Tag3 = Array("office:body") + Tag4 = Array("dc:title") + filter = Array( _ + Array("TagExists", Tag1), _ + Array("CharsEnclosed", Tag4, expString), _ + Array("TagEnclosed", Tag2, Tag1), _ + Array("TagEnclosed", Tag3, Tag1) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Chart.XMLExporter", initArgs()) + + docInfo = oDoc.getDocumentInfo() + docInfo.setPropertyValue("Title", expString) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "schart: StarOffice XML (Chart)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() As Boolean + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/script.xlb new file mode 100644 index 000000000000..a7cc190ecb02 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="xmloff_Chart_XMLImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/xmloff_Chart_XMLImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/xmloff_Chart_XMLImporter.xba new file mode 100644 index 000000000000..4df7ddd9642b --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLImporter/xmloff_Chart_XMLImporter.xba @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Chart_XMLImporter" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +' REQUIRED VARIABLES for interface/service tests: + +' Required for com.sun.star.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for procedure CheckImport + Global sValue As String + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = createUnoService("com.sun.star.comp.Chart.XMLImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + sValue = "XMLContentImporter_test" + vXMLData = Array( _ + Array("start", "office:document", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:chart", "CDATA", "http://openoffice.org/2000/chart", _ + "xmlns:table", "CDATA", "http://openoffice.org/2000/table", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "office:class", "CDATA", "chart", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:body"), _ + Array("start", "chart:chart"), _ + Array("start", "chart:title"), _ + Array("start", "text:p"), _ + Array("chars", sValue), _ + Array("end", "text:p"), _ + Array("end", "chart:title"), _ + Array("end", "chart:chart"), _ + Array("end", "office:body"), _ + Array("end", "office:document-content")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + Dim oTitle As Object + Dim title As String + out.log("checking of import...") + oTitle = oDoc.getTitle() + title = oTitle.getPropertyValue("String") + res = (title = sValue) + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/script.xlb new file mode 100644 index 000000000000..ba88f29b9a7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="xmloff_Chart_XMLStylesExporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLStylesExporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/xmloff_Chart_XMLStylesExporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/xmloff_Chart_XMLStylesExporter.xba new file mode 100644 index 000000000000..b544f6aa2250 --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesExporter/xmloff_Chart_XMLStylesExporter.xba @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Chart_XMLStylesExporter" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +' REQUIRED VARIABLES for interface/service tests: + +'Required for com.sun.star.document.XFilter +Global oFilterDescriptor As Variant + +'Required for com.sun.star.lang.XInitialization +Global aInitArgs() As Variant + +'Required for com.sun.star.document.XExporter +Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLStylesExporter +'************************************************************************* +On error goto ErrHndl + Dim initArgs(0) As Object + Dim oMSF As Object + Dim filter As Variant + Dim printXML As Boolean + + printXML = true + oMSF = getProcessServiceManager() + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oDocHandler = oMSF.createInstanceWithArguments("basichelper.DocumentHandler", Array(printXML)) + + filter = Array( _ + Array("TagExists", Array("office:document-styles")) _ + ) + + oDocHandler.initialize(filter) + + initArgs(0) = oDocHandler + aInitArgs = initArgs() + oObj = oMSF.createInstanceWithArguments("com.sun.star.comp.Chart.XMLStylesExporter", initArgs()) + + oObj.setSourceDocument(oDoc) + + Dim aFilterDescr(0) As New com.sun.star.beans.PropertyValue + aFilterDescr(0).Name = "FilterName" + aFilterDescr(0).Value = "schart: StarOffice XML (Chart)" + oFilterDescriptor = aFilterDescr() + + oSrcDocument = oDoc +Exit Sub + +ErrHndl: + Test.Exception() +End Sub + +Global oDocHandler As Object + +Function checkFilter() + checkFilter = oDocHandler.getByName("XMLIsCorrect") + Out.Log(oDocHandler.getByName("XMLCode")) +End Function +</script:module> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/script.xlb b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/script.xlb new file mode 100644 index 000000000000..d2c3fe8f2d7e --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/script.xlb @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="xmloff_Chart_XMLStylesImporter" library:readonly="false" library:passwordprotected="false"> +"<library:element library:name="xmloff_Chart_XMLStylesImporter"/> +"</library:library> diff --git a/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/xmloff_Chart_XMLStylesImporter.xba b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/xmloff_Chart_XMLStylesImporter.xba new file mode 100644 index 000000000000..92dbd9fba8fa --- /dev/null +++ b/qadevOOo/tests/basic/mod/xmloff/Chart/XMLStylesImporter/xmloff_Chart_XMLStylesImporter.xba @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="xmloff_Chart_XMLStylesImporter" script:language="StarBasic"> + + +'************************************************************************* +' +' 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. +' +'************************************************************************* +'************************************************************************* + + + +' Be sure that all variables are dimensioned: +option explicit + + +' REQUIRED VARIABLES for interface/service tests: + +' Required for com.sun.star.xml.sax.XDocumentHandler + Global vXMLData As Variant + +' Required for com.sun.star.document.XImporter: + Global oSrcDocument As Object + + +Sub CreateObj() + +'************************************************************************* +' COMPONENT: +' xmloff.Chart.XMLStylesImporter +'************************************************************************* +On Error Goto ErrHndl + oDoc = utils.loadTestDocument("emptyChart.sds", cObjectName) + oObj = createUnoService("com.sun.star.comp.Chart.XMLStylesImporter") + + oSrcDocument = oDoc + oObj.setTargetDocument(oDoc) + + vXMLData = Array( _ + Array("start", "office:document-styles", _ + "xmlns:office", "CDATA", "http://openoffice.org/2000/office", _ + "xmlns:text", "CDATA", "http://openoffice.org/2000/text", _ + "xmlns:chart", "CDATA", "http://openoffice.org/2000/chart", _ + "xmlns:style", "CDATA", "http://openoffice.org/2000/style", _ + "xmlns:svg", "CDATA", "http://openoffice.org/2000/svg", _ + "office:class", "CDATA", "chart", _ + "office:version", "CDATA", "1.0"), _ + Array("start", "office:styles"), _ + Array("end", "office:styles"), _ + Array("end", "office:document-styles")) +Exit Sub +ErrHndl: + Test.Exception() +End Sub + +Function CheckImport() As Boolean + Dim res As Boolean + out.log("checking of import...") + out.log("No ways to check styles import were not found.") + res = True + out.log("checking result: " + res) + CheckImport() = res +End Function +</script:module> |