From 480f72ef456b3d42c584fb198dde5b8f3a10788b Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Mon, 30 Oct 2017 09:07:51 +0100 Subject: Revert "tdf#113197 Add MaskPrimitive (clip) to EMF/WMF if needed" This reverts commit bdb9cc1702d4e125db8c379f3b535bbd9f845b95. Breaks Mac unit tests in sw_ooxmlexport4 --- .../source/primitive2d/metafileprimitive2d.cxx | 60 +++++++++++++--------- 1 file changed, 35 insertions(+), 25 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 5ace807a264d..bb3d243b4beb 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -20,10 +20,43 @@ #include #include +//#include #include +//#include +//#include +//#include +//#include +//#include +//#include +//#include #include -#include -#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include using namespace com::sun::star; @@ -41,29 +74,6 @@ namespace drawinglayer { // get target size const ::tools::Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize()); - const basegfx::B2DRange aMtfRange(aMtfTarget.Left(), aMtfTarget.Top(), aMtfTarget.Right(), aMtfTarget.Bottom()); - - // tdf#113197 get content range and check if we have an overlap with - // defined target range (aMtfRange) - if (!aMtfRange.isEmpty()) - { - const basegfx::B2DRange aContentRange(xRetval.getB2DRange(rViewInformation)); - - // also test equal since isInside gives also true for equal - if (!aMtfRange.equal(aContentRange) && !aMtfRange.isInside(aContentRange)) - { - // contentRange is partly larger than aMtfRange (stuff sticks - // outside), clipping is needed - const drawinglayer::primitive2d::Primitive2DReference xMask( - new drawinglayer::primitive2d::MaskPrimitive2D( - basegfx::B2DPolyPolygon( - basegfx::utils::createPolygonFromRect( - aMtfRange)), - xRetval)); - - xRetval = drawinglayer::primitive2d::Primitive2DContainer{ xMask }; - } - } // create transformation basegfx::B2DHomMatrix aAdaptedTransform; -- cgit