1 |
From 62ccbdf2233e10e70909a080f09465982a504474 Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> |
3 |
Date: Wed, 5 Nov 2014 13:49:07 +0000 |
4 |
Subject: [PATCH] Resolves: fdo#37559 revert adding extra dummy polygons to get |
5 |
better gradients |
6 |
|
7 |
Change-Id: I38b8e7cb79540a99696ac09e4061c9d87440b2b2 |
8 |
--- |
9 |
drawinglayer/source/primitive2d/polygonprimitive2d.cxx | 3 +-- |
10 |
svx/source/customshapes/EnhancedCustomShape2d.cxx | 16 ---------------- |
11 |
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2 +- |
12 |
3 files changed, 2 insertions(+), 19 deletions(-) |
13 |
|
14 |
diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx |
15 |
index 4a2944b..85b118f 100644 |
16 |
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx |
17 |
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx |
18 |
@@ -526,11 +526,10 @@ namespace drawinglayer |
19 |
{ |
20 |
// copy local polygon, it may be changed |
21 |
basegfx::B2DPolygon aLocalPolygon(getB2DPolygon()); |
22 |
- aLocalPolygon.removeDoublePoints(); |
23 |
basegfx::B2DPolyPolygon aArrowA; |
24 |
basegfx::B2DPolyPolygon aArrowB; |
25 |
|
26 |
- if(!aLocalPolygon.isClosed() && aLocalPolygon.count() > 1) |
27 |
+ if(!aLocalPolygon.isClosed()) |
28 |
{ |
29 |
// apply arrows |
30 |
const double fPolyLength(basegfx::tools::getLength(aLocalPolygon)); |
31 |
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx |
32 |
index 1e0e818..64e08d9 100644 |
33 |
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx |
34 |
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx |
35 |
@@ -1902,22 +1902,6 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm |
36 |
|
37 |
if(aNewB2DPolyPolygon.count()) |
38 |
{ |
39 |
- if( !bLineGeometryNeededOnly ) |
40 |
- { |
41 |
- // hack aNewB2DPolyPolygon to fill logic rect - this is |
42 |
- // needed to produce gradient fills that look like mso |
43 |
- aNewB2DPolygon.clear(); |
44 |
- aNewB2DPolygon.append(basegfx::B2DPoint(0,0)); |
45 |
- aNewB2DPolygon.setClosed(true); |
46 |
- aNewB2DPolyPolygon.append(aNewB2DPolygon); |
47 |
- |
48 |
- aNewB2DPolygon.clear(); |
49 |
- aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(), |
50 |
- aLogicRect.GetHeight())); |
51 |
- aNewB2DPolygon.setClosed(true); |
52 |
- aNewB2DPolyPolygon.append(aNewB2DPolygon); |
53 |
- } |
54 |
- |
55 |
// #i37011# |
56 |
bool bForceCreateTwoObjects(false); |
57 |
|
58 |
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |
59 |
index 7332449..fba8740 100644 |
60 |
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |
61 |
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |
62 |
@@ -606,7 +606,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec |
63 |
void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 ) |
64 |
{ |
65 |
fy1 = fx1 = 0.0; |
66 |
- if ( rPoly.GetSize() > 1 ) |
67 |
+ if ( rPoly.GetSize() ) |
68 |
{ |
69 |
std::vector< double >::const_iterator aIter = std::lower_bound( rDistances.begin(), rDistances.end(), fX ); |
70 |
sal_uInt16 nIdx = sal::static_int_cast<sal_uInt16>( std::distance( rDistances.begin(), aIter ) ); |
71 |
-- |
72 |
1.9.3 |
73 |
|