diff options
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 17 | ||||
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/region.cxx | 11 |
4 files changed, 14 insertions, 21 deletions
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 14a5492e36c3..d545d2f9eba3 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -19,6 +19,7 @@ #include <vcl/gdimetafiletools.hxx> #include <vcl/metaact.hxx> +#include <vcl/canvastools.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> @@ -319,9 +320,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) if(!rRect.IsEmpty() && !aClips.empty() && aClips.back().count()) { - const basegfx::B2DRange aClipRange( - rRect.Left(), rRect.Top(), - rRect.Right(), rRect.Bottom()); + const basegfx::B2DRange aClipRange(vcl::unotools::b2DRectangleFromRectangle(rRect)); aClips.back() = basegfx::utils::clipPolyPolygonOnRange( aClips.back(), @@ -516,9 +515,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) aClips.back(), basegfx::B2DPolyPolygon( basegfx::utils::createPolygonFromRect( - basegfx::B2DRange( - rRect.Left(), rRect.Top(), - rRect.Right(), rRect.Bottom()))), + vcl::unotools::b2DRectangleFromRectangle(rRect))), aTarget, false); // stroke } @@ -538,7 +535,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) { const sal_uInt32 nHor(pA->GetHorzRound()); const sal_uInt32 nVer(pA->GetVertRound()); - const basegfx::B2DRange aRange(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()); + const basegfx::B2DRange aRange(vcl::unotools::b2DRectangleFromRectangle(rRect)); basegfx::B2DPolygon aOutline; if(nHor || nVer) @@ -575,7 +572,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) } else { - const basegfx::B2DRange aRange(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()); + const basegfx::B2DRange aRange(vcl::unotools::b2DRectangleFromRectangle(rRect)); bDone = handleGeometricContent( aClips.back(), @@ -978,9 +975,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) aClips.back(), basegfx::B2DPolyPolygon( basegfx::utils::createPolygonFromRect( - basegfx::B2DRange( - rRect.Left(), rRect.Top(), - rRect.Right(), rRect.Bottom()))), + vcl::unotools::b2DRectangleFromRectangle(rRect))), pA->GetGradient(), aTarget); } diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index df90d4592c80..8696fd259a0e 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <vcl/canvastools.hxx> #include <vcl/pdfextoutdevdata.hxx> #include <vcl/graph.hxx> #include <vcl/outdev.hxx> @@ -443,8 +444,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc { rWriter.Push(); basegfx::B2DPolyPolygon aRect( basegfx::utils::createPolygonFromRect( - basegfx::B2DRectangle( aVisibleOutputRect.Left(), aVisibleOutputRect.Top(), - aVisibleOutputRect.Right(), aVisibleOutputRect.Bottom() ) ) ); + vcl::unotools::b2DRectangleFromRectangle(aVisibleOutputRect) ) ); rWriter.SetClipRegion( aRect); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 218b65a908b9..79289ba8b39a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -58,6 +58,7 @@ #include <svl/cryptosign.hxx> #include <vcl/bitmapex.hxx> #include <vcl/bitmapaccess.hxx> +#include <vcl/canvastools.hxx> #include <vcl/cvtgrf.hxx> #include <vcl/image.hxx> #include <vcl/lineinfo.hxx> @@ -10000,7 +10001,7 @@ void PDFWriterImpl::moveClipRegion( sal_Int32 nX, sal_Int32 nY ) void PDFWriterImpl::intersectClipRegion( const tools::Rectangle& rRect ) { basegfx::B2DPolyPolygon aRect( basegfx::utils::createPolygonFromRect( - basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); + vcl::unotools::b2DRectangleFromRectangle(rRect) ) ); intersectClipRegion( aRect ); } diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index ff2fbfdf0580..083f89a15395 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -24,6 +24,7 @@ #include <tools/helpers.hxx> #include <osl/diagnose.h> #include <sal/log.hxx> +#include <vcl/canvastools.hxx> #include <vcl/region.hxx> #include <regionband.hxx> @@ -539,11 +540,7 @@ void vcl::Region::Union( const tools::Rectangle& rRect ) // get the other B2DPolyPolygon and use logical Or-Operation const basegfx::B2DPolygon aRectPoly( basegfx::utils::createPolygonFromRect( - basegfx::B2DRectangle( - rRect.Left(), - rRect.Top(), - rRect.Right(), - rRect.Bottom()))); + vcl::unotools::b2DRectangleFromRectangle(rRect))); const basegfx::B2DPolyPolygon aClip( basegfx::utils::solvePolygonOperationOr( aThisPolyPoly, @@ -716,7 +713,7 @@ void vcl::Region::Exclude( const tools::Rectangle& rRect ) // get the other B2DPolyPolygon const basegfx::B2DPolygon aRectPoly( basegfx::utils::createPolygonFromRect( - basegfx::B2DRectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))); + vcl::unotools::b2DRectangleFromRectangle(rRect))); const basegfx::B2DPolyPolygon aOtherPolyPoly(aRectPoly); const basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationDiff(aThisPolyPoly, aOtherPolyPoly); @@ -797,7 +794,7 @@ void vcl::Region::XOr( const tools::Rectangle& rRect ) // get the other B2DPolyPolygon const basegfx::B2DPolygon aRectPoly( basegfx::utils::createPolygonFromRect( - basegfx::B2DRectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()))); + vcl::unotools::b2DRectangleFromRectangle(rRect))); const basegfx::B2DPolyPolygon aOtherPolyPoly(aRectPoly); const basegfx::B2DPolyPolygon aClip = basegfx::utils::solvePolygonOperationXor(aThisPolyPoly, aOtherPolyPoly); |