summaryrefslogtreecommitdiff
path: root/xmloff/source/core
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-03-18 17:39:01 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-03-25 09:53:50 +0100
commite9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (patch)
tree9cfece98c8b202cdddb77406ff29b8db5223bd57 /xmloff/source/core
parent56d8007a197b095b09423c691a51515567648e80 (diff)
tdf#134734 xmloff: ODF import compatibility for BackgroundFullSize
This is annoyingly complex because LO 6.3 changed the way backgrounds are painted in an inconsistent way. Use the generator version to guess what the document should look like, which of course will give the wrong result if it was created before LO 6.3 and then round-tripped with LO 6.3. Since LO 7.0 at least a hard-coded draw:background-size was written. Change-Id: If9c5d2b32bfa50cbe4fb166132f7223763af850f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112770 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'xmloff/source/core')
-rw-r--r--xmloff/source/core/xmlimp.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 6d7b0805ddfb..7e904af3e7dc 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -195,7 +195,16 @@ public:
}
else if ('6' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::LO_6x;
+ if (loVersion.getLength() > 1
+ && (loVersion[1] == '0' || loVersion[1] == '1'
+ || loVersion[1] == '2'))
+ {
+ mnGeneratorVersion = SvXMLImport::LO_6x; // 6.0/6.1/6.2
+ }
+ else
+ {
+ mnGeneratorVersion = SvXMLImport::LO_63x; // 6.3/6.4
+ }
}
else if ('7' == loVersion[0])
{