diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-05-10 16:41:54 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-05-10 21:07:40 +0200 |
commit | 16de54a5c47fbc4691ee099c1f7bb559a8fe11ac (patch) | |
tree | 25001b1ee47ba73a12f156e436dfa3d6e7d52e74 /include | |
parent | d9a6e0c8b74522fca7ff008a13184e479efd1ba0 (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>
Diffstat (limited to 'include')
-rw-r--r-- | include/xmloff/xmlexppr.hxx | 3 | ||||
-rw-r--r-- | include/xmloff/xmluconv.hxx | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/xmloff/xmlexppr.hxx b/include/xmloff/xmlexppr.hxx index f2f1e6adf72e..5e47201a5234 100644 --- a/include/xmloff/xmlexppr.hxx +++ b/include/xmloff/xmlexppr.hxx @@ -64,6 +64,7 @@ protected: After this process It'll called 'Contextfilter' for application-specific filter-processes. */ std::vector<XMLPropertyState> Filter_( + SvXMLExport const& rExport, const css::uno::Reference<css::beans::XPropertySet>& rPropSet, bool bDefault, bool bDisableFoFontFamily ) const; @@ -114,6 +115,7 @@ public: After this process It'll called 'Contextfilter' for application-specific filter-processes. */ std::vector<XMLPropertyState> Filter( + SvXMLExport const& rExport, const css::uno::Reference<css::beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily = false ) const; /** Like Filter(), except that: @@ -122,6 +124,7 @@ public: * - instead of the property's value, its default value is exported. */ std::vector<XMLPropertyState> FilterDefaults( + SvXMLExport const& rExport, const css::uno::Reference<css::beans::XPropertySet>& rPropSet ) const; /** Provides a partial ordering over two arrays of XMLPropertyState, diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index a501221c16bb..0a5619153917 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -30,6 +30,8 @@ #include <rtl/ustrbuf.hxx> #include <xmloff/xmltoken.hxx> +#include <unotools/saveopt.hxx> + #include <tools/fldunit.hxx> namespace com::sun::star { @@ -93,7 +95,8 @@ public: SvXMLUnitConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext, sal_Int16 eCoreMeasureUnit /*css::util::MeasureUnit*/, - sal_Int16 eXMLMeasureUnit /*css::util::MeasureUnit*/); + sal_Int16 eXMLMeasureUnit /*css::util::MeasureUnit*/, + SvtSaveOptions::ODFSaneDefaultVersion const nODFVersion); ~SvXMLUnitConverter(); @@ -108,6 +111,10 @@ public: /** gets the default unit for textual measures */ sal_Int16 GetXMLMeasureUnit() const; + /// ODF version, only when exporting + SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const; + void overrideSaneDefaultVersion(SvtSaveOptions::ODFSaneDefaultVersion const); + /** gets XNumberingTypeInfo */ const css::uno::Reference< css::text::XNumberingTypeInfo >& getNumTypeInfo() const; |