summaryrefslogtreecommitdiff
path: root/xmloff/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-01-18 23:40:13 +0100
committerMichael Stahl <mstahl@redhat.com>2013-01-18 23:46:33 +0100
commitbea63709d05514555d5283279cd66439f4ceed73 (patch)
treec78a2134e3f49b842f4b24acd68d8d1736cda682 /xmloff/inc
parent0669d78ea76ab9bfeff27ea02d785973f3720d6b (diff)
xmloff: refactor Generator version handling:
Since there are now 2 forks of OpenOffice.org, we cannot rely on a simple total ordering of versions any more; add a new function SvXMLImport::isGeneratorVersionOlderThan(), taking 2 reference versions. Also extract the LibreOffice version number from the generator string, and extend the BuildId property to store this as a third number. This also allows removal of the "fake LibreOffice3 as OpenOffice.org 3.3 release" hack, which is not future-proof. Change-Id: I44d8105eb537ac43fb9529a8b1b661ae0f2bba30
Diffstat (limited to 'xmloff/inc')
-rw-r--r--xmloff/inc/xmloff/xmlimp.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx
index 4fac73753165..d97fe847ceda 100644
--- a/xmloff/inc/xmloff/xmlimp.hxx
+++ b/xmloff/inc/xmloff/xmlimp.hxx
@@ -423,8 +423,16 @@ public:
static const sal_uInt16 OOo_32x = 32;
static const sal_uInt16 OOo_33x = 33;
static const sal_uInt16 OOo_34x = 34;
+ static const sal_uInt16 LO_flag = 0x100;
+ static const sal_uInt16 LO_3x = 30 | LO_flag;
+ static const sal_uInt16 LO_4x = 40 | LO_flag;
static const sal_uInt16 ProductVersionUnknown = SAL_MAX_UINT16;
+ /** depending on whether the generator version indicates LO, compare
+ against either the given LO or given OOo version */
+ bool isGeneratorVersionOlderThan(
+ sal_uInt16 const nOOoVersion, sal_uInt16 const nLOVersion);
+
/** this checks the build ID and returns
* OOo_1x for files created with OpenOffice.org 1.x or StarOffice 7 (this also includes binary import over binfilter)