diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-03-13 19:57:36 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-03-13 20:52:43 +0100 |
commit | 8131b3892a6d7b287075a3ccb50f947a63e42e33 (patch) | |
tree | c3580351aae8ab7599390f2ba6ff994fe9f2e81d /vcl | |
parent | e85105b5b13339f13fe755ee479c10ee19d54992 (diff) |
vcl: targetted restoration of OutputDevice::PixelToLogic overload
Add some code needed for commit 684c502ed0a6782fe1b9c7d7cd1911a4a88b543a
This fixes the infinite loop that allocates gigs of memory in sc_unoapi test.
The problem was that instead of PixelToLogic overload an implicit Region
ctor was called.
Change-Id: Iefcd453a5c6327964c219074239ac65be737da6e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/outdev.hxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/outmap.cxx | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index a4c398177d03..e51ec2b5a37e 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -978,6 +978,7 @@ public: Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const; Polygon PixelToLogic( const Polygon& rDevicePoly ) const; PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly ) const; + basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const; Region PixelToLogic( const Region& rDeviceRegion ) const; Point PixelToLogic( const Point& rDevicePt, const MapMode& rMapMode ) const; diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx index b1a5e013ed6a..6b28d77e542f 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -1414,6 +1414,14 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly ) con return aPolyPoly; } +basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygon& rPixelPolyPoly ) const +{ + basegfx::B2DPolyPolygon aTransformedPoly = rPixelPolyPoly; + const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation(); + aTransformedPoly.transform( rTransformationMatrix ); + return aTransformedPoly; +} + // ----------------------------------------------------------------------- Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const |