[Libreoffice-commits] core.git: vcl/source

Michael Stahl mstahl at redhat.com
Mon May 18 14:46:16 PDT 2015


 vcl/source/gdi/mapmod.cxx |    4 ++--
 vcl/source/outdev/map.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 21be3257d9d10f0f65c2ae49d7ef3beb81018bfc
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 18 23:11:05 2015 +0200

    tdf#90604: vcl: reduce MapMode precision further to 32 bits...
    
    ... which mysteriously causes the Export PNG to produce a non-blank
    image again.
    
    The cause is probably that DocumentToGraphicRenderer::renderToGraphic()
    records a VCL MetaFile, and the ReadFraction/WriteFraction do only
    32 bits, while the Fraction interface promises to handle "long".
    
    (regression from 2ce0aededea43231d91a0955fc0676120dcc4f13)
    
    Change-Id: Ic4289a3157ea802c17f0bc24db94ea45eabd9728

diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 8980a8d..eb61bb7 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -193,7 +193,7 @@ void MapMode::SetScaleX( const Fraction& rScaleX )
 
     ImplMakeUnique();
     mpImplMapMode->maScaleX = rScaleX;
-    mpImplMapMode->maScaleX.ReduceInaccurate(44);
+    mpImplMapMode->maScaleX.ReduceInaccurate(32);
 }
 
 void MapMode::SetScaleY( const Fraction& rScaleY )
@@ -201,7 +201,7 @@ void MapMode::SetScaleY( const Fraction& rScaleY )
 
     ImplMakeUnique();
     mpImplMapMode->maScaleY = rScaleY;
-    mpImplMapMode->maScaleY.ReduceInaccurate(44);
+    mpImplMapMode->maScaleY.ReduceInaccurate(32);
 }
 
 MapMode& MapMode::operator=( const MapMode& rMapMode )
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 6e34573..a33ef24 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -78,7 +78,7 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
         aF = Fraction( i*nN1, nD1 ) * Fraction( nN2, nD2 );
     }
 
-    aF.ReduceInaccurate(44);
+    aF.ReduceInaccurate(32);
     return aF;
 }
 


More information about the Libreoffice-commits mailing list