summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-04-16 00:26:33 +0200
committerAndras Timar <andras.timar@collabora.com>2014-04-16 17:07:24 +0200
commit8027fce55265b7b936c256b78ce14d2483be6dd1 (patch)
treefdc6875a8f4e4c08ad4768a3530312a78461656e /xmloff
parentafc672a914f0e0dba8f055a15e23fa94a8b0dd7e (diff)
ODF import: detect "LibreOfficeDev" in meta:generator too
(cherry picked from commit 74d7911abf77643544c58a0d3e5fb956add76c44) xmloff: we used to call it LOdev back in 4.0 so check that too (cherry picked from commit 5d53cabb52648507086a39e06803624949e4a301) Change-Id: Icea3086975dab1afedf111364683e6a7de50ce41 Reviewed-on: https://gerrit.libreoffice.org/9063 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/meta/xmlmetai.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 6db245243dd8..9ff8e7558676 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -266,17 +266,19 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
}
}
- if (i_rBuildId.startsWith("LibreOffice/"))
+ OUString rest;
+ if (i_rBuildId.startsWith("LibreOffice/", &rest) ||
+ i_rBuildId.startsWith("LibreOfficeDev/", &rest) ||
+ i_rBuildId.startsWith("LOdev/", &rest))
{
OUStringBuffer sNumber;
- for (sal_Int32 i = sizeof("LibreOffice/") - 1;
- i < i_rBuildId.getLength(); ++i)
+ for (sal_Int32 i = 0; i < rest.getLength(); ++i)
{
- if (isdigit(i_rBuildId[i]))
+ if (isdigit(rest[i]))
{
- sNumber.append(i_rBuildId[i]);
+ sNumber.append(rest[i]);
}
- else if ('.' != i_rBuildId[i])
+ else if ('.' != rest[i])
{
break;
}