From b1ce8bb078904db1df542f7a1c2ed527dde1a2d3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 27 Jun 2023 14:50:02 +0200 Subject: xmloff: ODF import: adapt generator parsing to 2-digit major versions DocumentInfo currently assumes that a LO version encoded in "BuildId" property has only 1 digit major version, which is now wrong and would start to give incorrect results when major version "30" will be detected as LO_3x. Add the dots as separators into the BuildId because it's not going to work without. Change-Id: I8918afe3642cbefa8488c57658f1505c9a20eddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153649 Tested-by: Jenkins Reviewed-by: Michael Stahl --- sd/source/filter/xml/sdxmlwrp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sd') diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index f1c2d9d29ffa..099f56ee9e22 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -693,7 +693,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) if( !sBuildId.isEmpty() ) { sal_Int32 nIndex = sBuildId.indexOf('$'); - if( nIndex != -1 ) + if (sBuildId.indexOf(';') == -1 && nIndex != -1) { sal_Int32 nUPD = o3tl::toInt32(sBuildId.subView( 0, nIndex )); -- cgit