summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-05-10 16:41:54 +0200
committerAndras Timar <andras.timar@collabora.com>2021-05-21 13:31:47 +0200
commit80061a6f8265ae39fcf1d2e393fdbababb5456a4 (patch)
tree986c1cce889657fc5b91efd699784f87ebd650c0 /sw
parentc7404a537a0e59b7114095e2901c950f6f78f072 (diff)
tdf#138209 ODF export: work around forms problem in LO < 7.0
LO without commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6 makes a mess when storing form documents it has loaded from ODF 1.3 documents: the XML parts are stored as ODF 1.2, but the storage (and therefore manifest entry) keeps version 1.3. To avoid this, store form documents as ODF 1.2 extended by default. Unfortunately a bunch of ODF export code accesses the global SvtSaveOptions variable; with this version override, only SvXMLExport::getSaneDefaultVersion() must be used. Change-Id: I5fa8e286f5103c578ed0d93da07a8a6cbe2f0ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115357 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 16de54a5c47fbc4691ee099c1f7bb559a8fe11ac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115390 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/xml/xmliteme.cxx3
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index ca590f6ddef6..eb5f74ced41d 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -196,7 +196,8 @@ inline void SwXMLTableItemMapper_Impl::SetAbsWidth( sal_uInt32 nAbs )
void SwXMLExport::InitItemExport()
{
m_pTwipUnitConverter.reset(new SvXMLUnitConverter(getComponentContext(),
- util::MeasureUnit::TWIP, GetMM100UnitConverter().GetXMLMeasureUnit()));
+ util::MeasureUnit::TWIP, GetMM100UnitConverter().GetXMLMeasureUnit(),
+ getSaneDefaultVersion()));
m_xTableItemMap = new SvXMLItemMapEntries( aXMLTableItemMap );
m_xTableRowItemMap = new SvXMLItemMapEntries( aXMLTableRowItemMap );
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 54eed769a945..f58407655681 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -227,7 +227,8 @@ void SwXMLImportTableItemMapper_Impl::finished(
void SwXMLImport::InitItemImport()
{
m_pTwipUnitConv.reset( new SvXMLUnitConverter( GetComponentContext(),
- util::MeasureUnit::TWIP, util::MeasureUnit::TWIP ) );
+ util::MeasureUnit::TWIP, util::MeasureUnit::TWIP,
+ SvtSaveOptions::ODFSVER_LATEST_EXTENDED) );
m_xTableItemMap = new SvXMLItemMapEntries( aXMLTableItemMap );
m_xTableColItemMap = new SvXMLItemMapEntries( aXMLTableColItemMap );