Kaydet (Commit) 4d162113 authored tarafından Matúš Kukan's avatar Matúš Kukan

Fix ignoring large twips values like MSO does (cp#1000087)

which was introduced in 10b4da63.

Since 1e47614c, only
convertTwipToMM100Unsigned() ignores large values, which presumably
was not the intention. At least commit message suggests so.

So, move the check back to convertTwipToMM100().

Change-Id: I17040f1987e24789b9de39a837d9f7ecaed520fb
üst d61c11c7
...@@ -228,6 +228,10 @@ OUString ConvertMSFormatStringToSO( ...@@ -228,6 +228,10 @@ OUString ConvertMSFormatStringToSO(
sal_Int32 convertTwipToMM100(sal_Int32 _t) sal_Int32 convertTwipToMM100(sal_Int32 _t)
{ {
// It appears that MSO handles large twip values specially, probably legacy 16bit handling,
// anything that's bigger than 32767 appears to be simply ignored.
if( _t >= 0x8000 )
return 0;
return ::convertTwipToMm100( _t ); return ::convertTwipToMm100( _t );
} }
...@@ -235,11 +239,7 @@ sal_uInt32 convertTwipToMM100Unsigned(sal_Int32 _t) ...@@ -235,11 +239,7 @@ sal_uInt32 convertTwipToMM100Unsigned(sal_Int32 _t)
{ {
if( _t < 0 ) if( _t < 0 )
return 0; return 0;
// It appears that MSO handles large twip values specially, probably legacy 16bit handling, return convertTwipToMM100( _t );
// anything that's bigger than 32767 appears to be simply ignored.
if( _t >= 0x8000 )
return 0;
return ::convertTwipToMm100( _t );
} }
sal_Int32 convertEMUToMM100(sal_Int32 _t) sal_Int32 convertEMUToMM100(sal_Int32 _t)
......
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