summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-01-18 10:43:05 +0100
committerThorsten Behrens <tbehrens@novell.com>2011-01-18 10:43:42 +0100
commit4772261c09d3d79d1ab8126e060d272c0de156f0 (patch)
tree2bcd68bd250df21dd16a9c8277a78e49a313eea2
parent4cf8bcde1cfa948b3415ec4775671b53e290aeae (diff)
calc65: #i116371# fix backgrounds for polypolygons in metafile
Signed-off-by: Thorsten Behrens <tbehrens@novell.com> (cherry picked from commit cb7d7138b943042f11eec3211d7a913c9b85908c) Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Radek Doulik <rodo@novell.com>
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 718a871747..cfd0f476eb 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1380,6 +1380,7 @@ namespace drawinglayer
{
// need to handle PolyPolygonHatchPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END
const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate);
+ const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
// #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
@@ -1387,8 +1388,20 @@ namespace drawinglayer
while(fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon))
;
+ if(rFillHatchAttribute.isFillBackground())
+ {
+ // with fixing #i111954# (see below) the possible background
+ // fill of a hatched object was lost.Generate a background fill
+ // primitive and render it
+ const primitive2d::Primitive2DReference xBackground(
+ new primitive2d::PolyPolygonColorPrimitive2D(
+ aLocalPolyPolygon,
+ rHatchCandidate.getBackgroundColor()));
+
+ process(primitive2d::Primitive2DSequence(&xBackground, 1));
+ }
+
SvtGraphicFill* pSvtGraphicFill = 0;
- const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
aLocalPolyPolygon.transform(maCurrentTransformation);
if(!mnSvtGraphicFillCount && aLocalPolyPolygon.count())