writerfilter/source/dmapper/ConversionHelper.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 01acca76d62fbf6bebc24ef72f3c5b93dcd41b85 Author: LuboÅ¡ LuÅák <l.lu...@collabora.com> Date: Wed Mar 12 13:45:36 2014 +0100 ignore large twips values like MSO does (cp#1000043) (cherry picked from commit 10b4da63e3143108ba75891e9e98fdaa2f7953ab) Reviewed on: https://gerrit.libreoffice.org/8550 Change-Id: Ib304245b6ae64c15cfb6c999580f73e5e228c440 diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index e6eadf3..d6dba13 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -36,8 +36,6 @@ namespace writerfilter { namespace dmapper{ 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 ) { //TODO: Lines are always solid @@ -231,6 +229,11 @@ 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; +#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) return TWIP_TO_MM100( _t ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits