summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-07-09 14:25:04 +0200
committerAndras Timar <andras.timar@collabora.com>2014-07-22 11:42:05 +0200
commitad5f9cad84dd0da11da556ef3d5ee7f6316da359 (patch)
tree36f6de803c67a53eb2bffc53150f95250e0729a5
parentdfa0fc194fc2600569374f7282208f77548c27c5 (diff)
Fix ignoring large twips values like MSO does (cp#1000087)
which was introduced in 10b4da63e3143108ba75891e9e98fdaa2f7953ab. Since 1e47614cdb84b018a22a334dad0cdd9f0f53892c, only convertTwipToMM100Unsigned() ignores large values, which presumably was not the intention. At least commit message suggests so. So, move the check back to convertTwipToMM100(). (cherry picked from commit 4d1621136c464b462a598571ecdcfe2ae119d8c7) Conflicts: writerfilter/source/dmapper/ConversionHelper.cxx Change-Id: I17040f1987e24789b9de39a837d9f7ecaed520fb Reviewed-on: https://gerrit.libreoffice.org/10193 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 7c0c2a112583..40a1a298a94e 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -230,6 +230,10 @@ OUString ConvertMSFormatStringToSO(
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 TWIP_TO_MM100( _t );
}
@@ -237,11 +241,7 @@ sal_uInt32 convertTwipToMM100Unsigned(sal_Int32 _t)
{
if( _t < 0 )
return 0;
- // 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 TWIP_TO_MM100( _t );
+ return convertTwipToMM100( _t );
}
sal_Int32 convertEMUToMM100(sal_Int32 _t)