summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-24 13:02:17 +0200
committerJan Holesovsky <kendy@collabora.com>2021-01-07 16:32:52 +0100
commit551204ac0fd9170fa9b096094c76faf705b75cd7 (patch)
tree149130093df787df05a10dc4dd6315ed369382f8 /sc
parent684418cb58e785773148f760191459bea1200bf4 (diff)
xmloff: ODF export: rework version checks in SvXMLExportPropertyMapper
There's some issues with the version checks here: * The requirement is to retain support for ODF 1.2 extended, but some attributes are in ODF 1.3, while others require ODF 1.3 extended, so a single version number can't be used to compare * A recurring problem is that new extension attributes are erroneously exported to standard namespaces; there is the pre-existing buggy case of style:hyperlink to consider... * Currently it's possible to distinguish multiple extended version but the only minimum version that's actually used is the minimum one ODFSVER_012_EXT_COMPAT Rework this to use a different check, by: * distinguishing extension attributes from standard attributes via their namespace, to avoid such bugs by construction * interpreting the version number always as a standard ODF version number: if the attribute is in extension namespace: if the minimum standard version is met, ignore else: if the minimum standard version is met, export * adapting all XMLPropertyMapEntry to use ODFSVER_FUTURE_EXTENDED for extension attributes (TODO: check which of these should be ODFSVER_013) This should have an effect on the drawext:fontwork* attributes, which need ODFSVER_FUTURE_EXTENDED to be exported now. Change-Id: I986c8064e578a61d69ed5fdb261f23e7582a7d75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92856 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index d445b078a6f2..45ee2a70028d 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -52,9 +52,9 @@ using namespace ::formula;
#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_010, false }
// extensions import/export
-#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_012_EXT_COMPAT, false }
+#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, false }
// extensions import only
-#define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_012_EXT_COMPAT, true }
+#define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, true }
#define MAP_END() { nullptr, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFSVER_010, false }
const XMLPropertyMapEntry aXMLScCellStylesProperties[] =