summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-22 10:59:01 +0100
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:21:36 +0200
commit398909b2c8e2efe1d42b6da1be0727b654e4b51c (patch)
tree3149897d11cae6a469365fdbaccaefc1163bfcd4 /xmloff
parenta6777f457a8ff291eded813dbb77ae70d753dd96 (diff)
add field namespace to styles.xml when saving fdo85232-1.docx to .odt
when >= SvtSaveOptions::ODFVER_012 Change-Id: I0414bc4a83ae4787e10cd8a215555f249da7e65a (cherry picked from commit 9bc314e38b6bcc268fe519b6d771a60087a1af9e)
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index fe100a0dec22..d34e1fbe69c7 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -336,6 +336,7 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
}
+ bool bAddFieldNM = false;
// namespaces for documents
if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{
@@ -363,6 +364,7 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add(
GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
XML_NAMESPACE_LO_EXT);
+ bAddFieldNM = true;
}
}
if( getExportFlags() & (SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
@@ -380,9 +382,13 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add( GetXMLToken(XML_NP_XFORMS_1_0), GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
mpNamespaceMap->Add( GetXMLToken(XML_NP_XSD), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
mpNamespaceMap->Add( GetXMLToken(XML_NP_XSI), GetXMLToken(XML_N_XSI), XML_NAMESPACE_XSI );
- mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
mpNamespaceMap->Add( GetXMLToken(XML_NP_FORMX), GetXMLToken(XML_N_FORMX), XML_NAMESPACE_FORMX );
+ bAddFieldNM = true;
}
+
+ if (bAddFieldNM)
+ mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
+
// RDFa: needed for content and header/footer styles
if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{