summaryrefslogtreecommitdiff
path: root/patches/dev300/ppt-customshape-shading-fix.diff (plain)
blob: 3fa4afbf0a6e03d53c43da3b1e72b09e01659e30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Fill subgeometry of customshapes properly

From: Thorsten Behrens <thb@openoffice.org>


---

 svx/source/customshapes/EnhancedCustomShape2d.cxx |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


diff --git svx/source/customshapes/EnhancedCustomShape2d.cxx svx/source/customshapes/EnhancedCustomShape2d.cxx
index ed0b16b..15f69b3 100644
--- svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1710,6 +1710,22 @@ 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);