Kaydet (Commit) 10b4da63 authored tarafından Luboš Luňák's avatar Luboš Luňák Kaydeden (comit) Luboš Luňák

ignore large twips values like MSO does (cp#1000043)

Change-Id: Ib304245b6ae64c15cfb6c999580f73e5e228c440
üst da9bd301
...@@ -36,8 +36,6 @@ namespace writerfilter { ...@@ -36,8 +36,6 @@ namespace writerfilter {
namespace dmapper{ namespace dmapper{
namespace ConversionHelper{ namespace ConversionHelper{
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
sal_Int32 MakeBorderLine( sal_Int32 nSprmValue, table::BorderLine2& rToFill ) sal_Int32 MakeBorderLine( sal_Int32 nSprmValue, table::BorderLine2& rToFill )
{ {
//TODO: Lines are always solid //TODO: Lines are always solid
...@@ -231,6 +229,11 @@ OUString ConvertMSFormatStringToSO( ...@@ -231,6 +229,11 @@ 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;
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
return TWIP_TO_MM100( _t ); return TWIP_TO_MM100( _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