Kaydet (Commit) 0669d78e authored tarafından Michael Stahl's avatar Michael Stahl

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 17ff7b41)

Change-Id: I0cdd958d67cd13fd2368cc6958893ce3528a9e94
üst 3fd16d48
......@@ -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" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment