summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-05-18 23:11:05 +0200
committerMichael Stahl <mstahl@redhat.com>2015-05-18 23:37:26 +0200
commit21be3257d9d10f0f65c2ae49d7ef3beb81018bfc (patch)
treee1b53a820a505b7a7e2a110b13d8d2b671cf9cff
parentdd205b85cc386f1ce7aa2e5b44c99ef4ae03aa18 (diff)
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
-rw-r--r--vcl/source/gdi/mapmod.cxx4
-rw-r--r--vcl/source/outdev/map.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 8980a8d30719..eb61bb753c4b 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 6e34573bf303..a33ef24d4373 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;
}