Kaydet (Commit) 0a9b9978 authored tarafından Michael Stahl's avatar Michael Stahl

vcl: fix the MapMode ctor too to limit precision to 32 bits

Change-Id: Ifc27d4bd9225581197332c8e21c476eed5d13eb7
üst 21be3257
...@@ -33,6 +33,10 @@ struct MapMode::ImplMapMode ...@@ -33,6 +33,10 @@ struct MapMode::ImplMapMode
sal_uLong mnRefCount; sal_uLong mnRefCount;
MapUnit meUnit; MapUnit meUnit;
Point maOrigin; Point maOrigin;
// NOTE: these Fraction must NOT have more than 32 bits precision
// because ReadFraction / WriteFraction do only 32 bits, so more than
// that cannot be stored in MetaFiles!
// => call ReduceInaccurate whenever setting these
Fraction maScaleX; Fraction maScaleX;
Fraction maScaleY; Fraction maScaleY;
bool mbSimple; bool mbSimple;
...@@ -158,6 +162,8 @@ MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg, ...@@ -158,6 +162,8 @@ MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg,
mpImplMapMode->maOrigin = rLogicOrg; mpImplMapMode->maOrigin = rLogicOrg;
mpImplMapMode->maScaleX = rScaleX; mpImplMapMode->maScaleX = rScaleX;
mpImplMapMode->maScaleY = rScaleY; mpImplMapMode->maScaleY = rScaleY;
mpImplMapMode->maScaleX.ReduceInaccurate(32);
mpImplMapMode->maScaleY.ReduceInaccurate(32);
} }
MapMode::~MapMode() MapMode::~MapMode()
......
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