[libreoffice/f20] Resolves: fdo#37559 revert adding extra dummy polygons

Caolán McNamara caolanm at fedoraproject.org
Wed Nov 5 13:56:51 UTC 2014


commit 09a3db31fc484bb955819c7416db6f04fe87f98d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 5 13:53:10 2014 +0000

    Resolves: fdo#37559 revert adding extra dummy polygons

 ...o-37559-revert-adding-extra-dummy-polygon.patch |   73 ++++++++++++++++++++
 libreoffice.spec                                   |    6 ++-
 2 files changed, 78 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch b/0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch
new file mode 100644
index 0000000..e04e56a
--- /dev/null
+++ b/0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch
@@ -0,0 +1,73 @@
+From 62ccbdf2233e10e70909a080f09465982a504474 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Wed, 5 Nov 2014 13:49:07 +0000
+Subject: [PATCH] Resolves: fdo#37559 revert adding extra dummy polygons to get
+ better gradients
+
+Change-Id: I38b8e7cb79540a99696ac09e4061c9d87440b2b2
+---
+ drawinglayer/source/primitive2d/polygonprimitive2d.cxx  |  3 +--
+ svx/source/customshapes/EnhancedCustomShape2d.cxx       | 16 ----------------
+ svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |  2 +-
+ 3 files changed, 2 insertions(+), 19 deletions(-)
+
+diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+index 4a2944b..85b118f 100644
+--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
++++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+@@ -526,11 +526,10 @@ namespace drawinglayer
+         {
+             // copy local polygon, it may be changed
+             basegfx::B2DPolygon aLocalPolygon(getB2DPolygon());
+-            aLocalPolygon.removeDoublePoints();
+             basegfx::B2DPolyPolygon aArrowA;
+             basegfx::B2DPolyPolygon aArrowB;
+ 
+-            if(!aLocalPolygon.isClosed() && aLocalPolygon.count() > 1)
++            if(!aLocalPolygon.isClosed())
+             {
+                 // apply arrows
+                 const double fPolyLength(basegfx::tools::getLength(aLocalPolygon));
+diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
+index 1e0e818..64e08d9 100644
+--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
++++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
+@@ -1902,22 +1902,6 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
+ 
+     if(aNewB2DPolyPolygon.count())
+     {
+-        if( !bLineGeometryNeededOnly )
+-        {
+-            // hack aNewB2DPolyPolygon to fill logic rect - this is
+-            // needed to produce gradient fills that look like mso
+-            aNewB2DPolygon.clear();
+-            aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
+-            aNewB2DPolygon.setClosed(true);
+-            aNewB2DPolyPolygon.append(aNewB2DPolygon);
+-
+-            aNewB2DPolygon.clear();
+-            aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
+-                                                    aLogicRect.GetHeight()));
+-            aNewB2DPolygon.setClosed(true);
+-            aNewB2DPolyPolygon.append(aNewB2DPolygon);
+-        }
+-
+         // #i37011#
+         bool bForceCreateTwoObjects(false);
+ 
+diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+index 7332449..fba8740 100644
+--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
++++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+@@ -606,7 +606,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec
+ void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 )
+ {
+     fy1 = fx1 = 0.0;
+-    if ( rPoly.GetSize() > 1 )
++    if ( rPoly.GetSize() )
+     {
+         std::vector< double >::const_iterator aIter = std::lower_bound( rDistances.begin(), rDistances.end(), fX );
+         sal_uInt16 nIdx = sal::static_int_cast<sal_uInt16>( std::distance( rDistances.begin(), aIter ) );
+-- 
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 86cb7ed..c769dfb 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -36,7 +36,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        4%{?libo_prerelease}%{?dist}
+Release:        5%{?libo_prerelease}%{?dist}
 License:        (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
 Group:          Applications/Productivity
 URL:            http://www.libreoffice.org/
@@ -316,6 +316,7 @@ Patch60: 0001-Resolves-rhbz-1146169-a11y-frames-label-dies-before-.patch
 Patch61: 0001-fdo-79602-sw-fix-text-formatting-of-proportional-lin.patch
 Patch62: 0002-fdo-79602-sw-add-new-compatibiltiy-flag-PropLineSpac.patch
 Patch63: 0001-fdo-85403-broadcast-changes-after-TextToColumn.patch
+Patch64: 0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2257,6 +2258,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Wed Nov 05 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.2.7.2-5
+- Resolves: fdo#37559 revert adding extra dummy polygons
+
 * Mon Nov 03 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.2.7.2-4
 - Resolves: fdo#79602: Writer text formatting of proportional line space < 100%
 - Resolves: fdo#85403 broadcast changes after TextToColumn


More information about the scm-commits mailing list