Blame SOURCES/0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch

ebc4bd
From 62ccbdf2233e10e70909a080f09465982a504474 Mon Sep 17 00:00:00 2001
ebc4bd
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
ebc4bd
Date: Wed, 5 Nov 2014 13:49:07 +0000
ebc4bd
Subject: [PATCH] Resolves: fdo#37559 revert adding extra dummy polygons to get
ebc4bd
 better gradients
ebc4bd
ebc4bd
Change-Id: I38b8e7cb79540a99696ac09e4061c9d87440b2b2
ebc4bd
---
ebc4bd
 drawinglayer/source/primitive2d/polygonprimitive2d.cxx  |  3 +--
ebc4bd
 svx/source/customshapes/EnhancedCustomShape2d.cxx       | 16 ----------------
ebc4bd
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |  2 +-
ebc4bd
 3 files changed, 2 insertions(+), 19 deletions(-)
ebc4bd
ebc4bd
diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
ebc4bd
index 4a2944b..85b118f 100644
ebc4bd
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
ebc4bd
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
ebc4bd
@@ -526,11 +526,10 @@ namespace drawinglayer
ebc4bd
         {
ebc4bd
             // copy local polygon, it may be changed
ebc4bd
             basegfx::B2DPolygon aLocalPolygon(getB2DPolygon());
ebc4bd
-            aLocalPolygon.removeDoublePoints();
ebc4bd
             basegfx::B2DPolyPolygon aArrowA;
ebc4bd
             basegfx::B2DPolyPolygon aArrowB;
ebc4bd
 
ebc4bd
-            if(!aLocalPolygon.isClosed() && aLocalPolygon.count() > 1)
ebc4bd
+            if(!aLocalPolygon.isClosed())
ebc4bd
             {
ebc4bd
                 // apply arrows
ebc4bd
                 const double fPolyLength(basegfx::tools::getLength(aLocalPolygon));
ebc4bd
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
ebc4bd
index 1e0e818..64e08d9 100644
ebc4bd
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
ebc4bd
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
ebc4bd
@@ -1902,22 +1902,6 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
ebc4bd
 
ebc4bd
     if(aNewB2DPolyPolygon.count())
ebc4bd
     {
ebc4bd
-        if( !bLineGeometryNeededOnly )
ebc4bd
-        {
ebc4bd
-            // hack aNewB2DPolyPolygon to fill logic rect - this is
ebc4bd
-            // needed to produce gradient fills that look like mso
ebc4bd
-            aNewB2DPolygon.clear();
ebc4bd
-            aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
ebc4bd
-            aNewB2DPolygon.setClosed(true);
ebc4bd
-            aNewB2DPolyPolygon.append(aNewB2DPolygon);
ebc4bd
-
ebc4bd
-            aNewB2DPolygon.clear();
ebc4bd
-            aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
ebc4bd
-                                                    aLogicRect.GetHeight()));
ebc4bd
-            aNewB2DPolygon.setClosed(true);
ebc4bd
-            aNewB2DPolyPolygon.append(aNewB2DPolygon);
ebc4bd
-        }
ebc4bd
-
ebc4bd
         // #i37011#
ebc4bd
         bool bForceCreateTwoObjects(false);
ebc4bd
 
ebc4bd
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
ebc4bd
index 7332449..fba8740 100644
ebc4bd
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
ebc4bd
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
ebc4bd
@@ -606,7 +606,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec
ebc4bd
 void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 )
ebc4bd
 {
ebc4bd
     fy1 = fx1 = 0.0;
ebc4bd
-    if ( rPoly.GetSize() > 1 )
ebc4bd
+    if ( rPoly.GetSize() )
ebc4bd
     {
ebc4bd
         std::vector< double >::const_iterator aIter = std::lower_bound( rDistances.begin(), rDistances.end(), fX );
ebc4bd
         sal_uInt16 nIdx = sal::static_int_cast<sal_uInt16>( std::distance( rDistances.begin(), aIter ) );
ebc4bd
-- 
ebc4bd
1.9.3
ebc4bd