Blame SOURCES/0001-Resolves-tdf-112145-pdf-export-of-editengine-highlig.patch

91334d
From f41ae9bc40fae21ac66d859057488801c1d47ccd Mon Sep 17 00:00:00 2001
91334d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
91334d
Date: Thu, 31 Aug 2017 16:22:58 +0100
91334d
Subject: [PATCH] Resolves: tdf#112145 pdf export of editengine highlight color
91334d
 fails sometimes
91334d
91334d
When setting a fill or line color on the outputdevice, put it back to its previous
91334d
setting when finished with the record, PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D
91334d
was the one in this case but protect the other similar ones here too
91334d
91334d
Change-Id: Ifb9b182d72bb6c48a9d9480270fde4384be6291e
91334d
---
91334d
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 8 ++++++++
91334d
 1 file changed, 8 insertions(+)
91334d
91334d
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
91334d
index 885367d..0274b7c 100644
91334d
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
91334d
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
91334d
@@ -1219,6 +1219,8 @@ namespace drawinglayer
91334d
                     }
91334d
                     else
91334d
                     {
91334d
+                        mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
91334d
+
91334d
                         // support SvtGraphicStroke MetaCommentAction
91334d
                         SvtGraphicStroke* pSvtGraphicStroke = impTryToCreateSvtGraphicStroke(
91334d
                             rBasePolygon, nullptr,
91334d
@@ -1274,6 +1276,8 @@ namespace drawinglayer
91334d
                         }
91334d
 
91334d
                         impEndSvtGraphicStroke(pSvtGraphicStroke);
91334d
+
91334d
+                        mpOutputDevice->Pop();
91334d
                     }
91334d
 
91334d
                     break;
91334d
@@ -1666,6 +1670,7 @@ namespace drawinglayer
91334d
                 }
91334d
                 case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D :
91334d
                 {
91334d
+                    mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
91334d
                     const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate));
91334d
                     basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolygonCandidate.getB2DPolyPolygon());
91334d
 
91334d
@@ -1722,6 +1727,7 @@ namespace drawinglayer
91334d
                         impEndSvtGraphicFill(pSvtGraphicFill);
91334d
                     }
91334d
 
91334d
+                    mpOutputDevice->Pop();
91334d
                     break;
91334d
                 }
91334d
                 case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D :
91334d
@@ -1811,6 +1817,7 @@ namespace drawinglayer
91334d
                 }
91334d
                 case PRIMITIVE2D_ID_UNIFIEDTRANSPARENCEPRIMITIVE2D :
91334d
                 {
91334d
+                    mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
91334d
                     // for metafile: Need to examine what the pure vcl version is doing here actually
91334d
                     // - uses DrawTransparent with metafile for content and a gradient
91334d
                     // - uses DrawTransparent for single PolyPoylgons directly. Can be detected by
91334d
@@ -1945,6 +1952,7 @@ namespace drawinglayer
91334d
                         }
91334d
                     }
91334d
 
91334d
+                    mpOutputDevice->Pop();
91334d
                     break;
91334d
                 }
91334d
                 case PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D :
91334d
-- 
91334d
2.13.5
91334d