[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source
Michael Stahl
mstahl at redhat.com
Wed Apr 16 05:14:37 PDT 2014
xmloff/source/meta/xmlmetai.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit e290cc1ceb31315905288e29945c9843b6588342
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 16 00:26:33 2014 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 6db2452..9ff8e75 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;
}
More information about the Libreoffice-commits
mailing list