Issue 86057 - Don't use UPD for versioning: xmloff/source/draw/ximpshap.cxx
Summary: Don't use UPD for versioning: xmloff/source/draw/ximpshap.cxx
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: code (show other issues)
Version: 680m245
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.0
Assignee: clippka
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-13 08:33 UTC by rt
Modified: 2008-07-14 09:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description rt 2008-02-13 08:33:41 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.
Comment 1 clippka 2008-02-13 10:30:46 UTC
taking over
Comment 2 sven.jacobi 2008-02-13 11:53:24 UTC
please take over
Comment 3 clippka 2008-06-06 14:11:55 UTC
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.
Comment 4 clippka 2008-06-06 14:12:22 UTC
closing
Comment 5 rt 2008-06-09 12:39:33 UTC
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.
Comment 6 clippka 2008-06-09 14:26:58 UTC
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
Comment 7 sven.jacobi 2008-06-10 11:56:31 UTC
The bugfix looks good, verified
Comment 8 clippka 2008-07-14 09:24:15 UTC
fix is in master, closing