summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-03 22:39:46 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-02-06 03:49:40 +0000
commitc29bc3305e835d6f32195b4d9528e64b64d4019e (patch)
treedf5dfe25f8c618c1807fed9db3437b8996388a15
parent7e8be547eb44b0211ab45e21c6961e2dc3995a84 (diff)
reportbuilder: tdf#92720: add loext namespace
... to allow export of paragraphs in shapes. (regression from 6acc6c011d3afd6834efeee1b2efe43652a86f2e) Change-Id: I2c23e686a2cfcd997d3393b0f9fb4cdcab7252b7 (cherry picked from commit 969a760e2bad7f65c28eba425af1751946b09d76) Reviewed-on: https://gerrit.libreoffice.org/22090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java1
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx7
3 files changed, 9 insertions, 0 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces.java b/reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces.java
index 27743593277a..6a7d144865fe 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces.java
@@ -51,6 +51,7 @@ public class OfficeNamespaces
public static final String OOREPORT_NS = "http://openoffice.org/2005/report";
public static final String GRDDL_NS = "http://www.w3.org/2003/g/data-view#";
public static final String CONFIG = "urn:oasis:names:tc:opendocument:xmlns:config:1.0";
+ public static final String LOEXT_NS = "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0";
private OfficeNamespaces()
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
index 8518bc619325..beffe3174948 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -383,6 +383,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS);
+ rootAttributes.addNamespaceDeclaration("loext", OfficeNamespaces.LOEXT_NS);
rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
ODF_VERSION);
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index bf7594e9ae53..99d41fae1869 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -251,6 +251,13 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin
if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{
_GetNamespaceMap().Add( GetXMLToken(XML_NP_XHTML),GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
+ // loext, needed for paragraphs inside shapes
+ if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ {
+ _GetNamespaceMap().Add(
+ GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
+ XML_NAMESPACE_LO_EXT);
+ }
}
// GRDDL: to convert RDFa and meta.xml to RDF
if( getExportFlags() & (SvXMLExportFlags::META|SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )