[Libreoffice-commits] .: Branch 'libreoffice-3-3-0' - drawinglayer/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Tue Jan 18 01:54:16 PST 2011


 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   15 ++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 4772261c09d3d79d1ab8126e060d272c0de156f0
Author: Philipp Lohmann [pl] <Philipp.Lohmann at Oracle.COM>
Date:   Tue Jan 18 10:43:05 2011 +0100

    calc65: #i116371# fix backgrounds for polypolygons in metafile
    
    Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
    (cherry picked from commit cb7d7138b943042f11eec3211d7a913c9b85908c)
    
    Signed-off-by: Michael Meeks <michael.meeks at novell.com>
    Signed-off-by: Petr Mladek <pmladek at suse.cz>
    Signed-off-by: Radek Doulik <rodo at novell.com>

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 718a871..cfd0f47 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())


More information about the Libreoffice-commits mailing list