Kaydet (Commit) 22f51321 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Miklos Vajna

xmloff: add meta:generator constants LO_43x and LO_44x

Change-Id: I1d962ad637f19b02855616edebcedbad719689c5
(cherry picked from commit ee655627)
Reviewed-on: https://gerrit.libreoffice.org/20053Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst de7a50d6
...@@ -480,9 +480,11 @@ public: ...@@ -480,9 +480,11 @@ public:
static const sal_uInt16 LO_3x = 30 | LO_flag; static const sal_uInt16 LO_3x = 30 | LO_flag;
static const sal_uInt16 LO_41x = 41 | LO_flag; static const sal_uInt16 LO_41x = 41 | LO_flag;
static const sal_uInt16 LO_42x = 42 | LO_flag; static const sal_uInt16 LO_42x = 42 | LO_flag;
/// @ATTENTION: when adding a new value more specific than "4x", grep for static const sal_uInt16 LO_43x = 43 | LO_flag;
static const sal_uInt16 LO_44x = 44 | LO_flag;
/// @ATTENTION: when adding a new value more specific than "5x", grep for
/// all current uses and adapt them!!! /// all current uses and adapt them!!!
static const sal_uInt16 LO_4x = 43 | LO_flag; static const sal_uInt16 LO_5x = 50 | LO_flag;
static const sal_uInt16 ProductVersionUnknown = SAL_MAX_UINT16; static const sal_uInt16 ProductVersionUnknown = SAL_MAX_UINT16;
/** depending on whether the generator version indicates LO, compare /** depending on whether the generator version indicates LO, compare
......
...@@ -190,24 +190,31 @@ getBuildIdsProperty(uno::Reference<beans::XPropertySet> const& xImportInfo) ...@@ -190,24 +190,31 @@ getBuildIdsProperty(uno::Reference<beans::XPropertySet> const& xImportInfo)
{ {
mnGeneratorVersion = SvXMLImport::LO_3x; mnGeneratorVersion = SvXMLImport::LO_3x;
} }
else else if ('4' == loVersion[0])
{ {
SAL_INFO_IF('4' != loVersion[0], "xmloff.core", "unknown LO version: " << loVersion); if (loVersion.getLength() > 1
if ('4' == loVersion[0] && loVersion.getLength() > 1
&& (loVersion[1] == '0' || loVersion[1] == '1')) && (loVersion[1] == '0' || loVersion[1] == '1'))
{ {
mnGeneratorVersion = SvXMLImport::LO_41x; // 4.0/4.1 mnGeneratorVersion = SvXMLImport::LO_41x; // 4.0/4.1
} }
else if ('4' == loVersion[0] else if (loVersion.getLength() > 1 && '2' == loVersion[1])
&& loVersion.getLength() > 1 && loVersion[1] == '2')
{ {
mnGeneratorVersion = SvXMLImport::LO_42x; // 4.2 mnGeneratorVersion = SvXMLImport::LO_42x; // 4.2
} }
else else if (loVersion.getLength() > 1 && '3' == loVersion[1])
{
mnGeneratorVersion = SvXMLImport::LO_43x; // 4.3
}
else if (loVersion.getLength() > 1 && '4' == loVersion[1])
{ {
mnGeneratorVersion = SvXMLImport::LO_4x; mnGeneratorVersion = SvXMLImport::LO_44x; // 4.4
} }
} }
else
{
SAL_INFO_IF('5' != loVersion[0], "xmloff.core", "unknown LO version: " << loVersion);
mnGeneratorVersion = SvXMLImport::LO_5x;
}
return; // ignore buildIds return; // ignore buildIds
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment