[Libreoffice-commits] .: Branch 'libreoffice-4-0' - xmloff/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 21 05:36:00 PST 2013
xmloff/source/meta/xmlmetai.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit ca4aa39e66ea728f5d6b004ddd678e076d1ffa60
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 18 17:47:20 2013 +0100
fdo#59517: fix detection of ancient OOo ODF generator strings:
SvXMLMetaDocumentContext::setBuildId: check only the prefix of the
generator string, not all of it.
(regression from 17ff7b41d15ab9928e2e2706faa26234a09802cd)
Change-Id: I0cdd958d67cd13fd2368cc6958893ce3528a9e94
(cherry picked from commit 0669d78ea76ab9bfeff27ea02d785973f3720d6b)
Reviewed-on: https://gerrit.libreoffice.org/1760
Reviewed-by: Tor Lillqvist <tml at iki.fi>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat at free.fr>
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat at free.fr>
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 651d6a5..ba9c58b 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -268,12 +268,13 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con
if ( sBuildId.isEmpty() )
{
- if ( i_rBuildId == "StarOffice 7" || i_rBuildId == "StarSuite 7" ||
- i_rBuildId == "OpenOffice.org 1" )
+ if ( i_rBuildId.startsWith("StarOffice 7")
+ || i_rBuildId.startsWith("StarSuite 7")
+ || i_rBuildId.startsWith("OpenOffice.org 1"))
{
sBuildId = OUString("645$8687");
}
- else if ( i_rBuildId == "NeoOffice/2" )
+ else if (i_rBuildId.startsWith("NeoOffice/2"))
{
sBuildId = OUString("680$9134"); // fake NeoOffice as OpenOffice.org 2.2 release
}
@@ -282,7 +283,7 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con
#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
else
{
- if ( i_rBuildId == "LibreOffice/3" )
+ if (i_rBuildId.startsWith("LibreOffice/3"))
{
// #118558# fake LibreOffice3 as OpenOffice.org 3.3 release
sBuildId = OUString::createFromAscii( "330$9567" );
More information about the Libreoffice-commits
mailing list