Apache OpenOffice (AOO) Bugzilla – Issue 86057
Don't use UPD for versioning: xmloff/source/draw/ximpshap.cxx
Last modified: 2008-07-14 09:24:15 UTC
In xmloff/source/draw/ximpshap.cxx there is sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); GetImport().getBuildIds( nUPD, nBuild ); if ( nUPD < 680 || ( nUPD == 680 && nBuild <= 9221 ) ) { Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( mxShape, UNO_QUERY ); if( xDefaulter.is() ) { rtl::OUString aEmptyType; xDefaulter->createCustomShapeDefaults( aEmptyType ); } } I.e., the UPD is used for product or file format versioning. This will probably give wrong results when we change from SRC680 to DEV300 as planned.
taking over
please take over
currently there is no other way to detect that the file was created with a OOo 2.x prior to the build id used in this code. So we have to stick with it. If we some day have a dev680, then this will be ok as long as also the build id increases.
closing
Sorry, but we do not get wrong results when UPD is 680 again, we get them now. On DEV300 UPD is 300 which is less than 680. Perhaps you could change 'if nUPD < 680' into whether GetImport().getBuildIds is available at all. AFAIK that method got introduced somewhere on SRC680, so older codelines do not have it at all.
yes you are right changed the compare to if( ((nUPD <= 640 && nUPD <= 645) || (nUPD == 680)) && (nBuild <= 9221)) This should be safe as long as we make no updates on the old 640 && 645 code line. new 640 to 645 code lines should fail with the build id check. fixed in cws impress144 for OOo 3.0
The bugfix looks good, verified
fix is in master, closing