diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-04-16 00:26:33 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-16 00:33:22 +0200 |
commit | 74d7911abf77643544c58a0d3e5fb956add76c44 (patch) | |
tree | 0866f38db21b5af4250f9c729348e639b98263a1 /xmloff | |
parent | fdo#77027: ODF import: fix wrong version in check for embedded objects (diff) | |
download | core-74d7911abf77643544c58a0d3e5fb956add76c44.tar.gz core-74d7911abf77643544c58a0d3e5fb956add76c44.zip |
ODF import: detect "LibreOfficeDev" in meta:generator too
Change-Id: Icea3086975dab1afedf111364683e6a7de50ce41
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/meta/xmlmetai.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index 2ab36f6b88e1..17122cb3e585 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -266,17 +266,18 @@ 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)) { 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; } |