[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - writerfilter/source

Matúš Kukan matus.kukan at collabora.com
Fri Jul 11 01:29:54 PDT 2014


 writerfilter/source/dmapper/ConversionHelper.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit e361a7348335e7102fda31a0c518bb4157c4e9d0
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Wed Jul 9 14:25:04 2014 +0200

    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().
    
    Change-Id: I17040f1987e24789b9de39a837d9f7ecaed520fb
    (cherry picked from commit 4d1621136c464b462a598571ecdcfe2ae119d8c7)
    Reviewed-on: https://gerrit.libreoffice.org/10177
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 6d21e5425690732a3254722add7023ace4d3c537)
    Reviewed-on: https://gerrit.libreoffice.org/10215
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index af6ea70..febe4b0 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -228,6 +228,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 ::convertTwipToMm100( _t );
 }
 
@@ -235,11 +239,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 ::convertTwipToMm100( _t );
+    return convertTwipToMM100( _t );
 }
 
 sal_Int32 convertEMUToMM100(sal_Int32 _t)


More information about the Libreoffice-commits mailing list