diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-31 16:22:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-03 21:22:35 +0200 |
commit | cf5b61967ef8647db663a1f0d699169b017916a7 (patch) | |
tree | e3ea4b3bc0cb3a41ebc107fff6ed7496029a558a /drawinglayer | |
parent | 723487f415d8d0474f1de7d9f01eab2aa3db947e (diff) |
Resolves: tdf#112145 pdf export of editengine highlight color fails sometimes
When setting a fill or line color on the outputdevice, put it back to its previous
setting when finished with the record, PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D
was the one in this case but protect the other similar ones here too
Change-Id: Ifb9b182d72bb6c48a9d9480270fde4384be6291e
Reviewed-on: https://gerrit.libreoffice.org/41761
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 4b02e95e6a92..d9455afc13c4 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1223,6 +1223,8 @@ namespace drawinglayer } else { + mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); + // support SvtGraphicStroke MetaCommentAction SvtGraphicStroke* pSvtGraphicStroke = impTryToCreateSvtGraphicStroke( rBasePolygon, nullptr, @@ -1278,6 +1280,8 @@ namespace drawinglayer } impEndSvtGraphicStroke(pSvtGraphicStroke); + + mpOutputDevice->Pop(); } break; @@ -1657,6 +1661,7 @@ namespace drawinglayer } case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D : { + mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate)); basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolygonCandidate.getB2DPolyPolygon()); @@ -1712,6 +1717,7 @@ namespace drawinglayer impEndSvtGraphicFill(pSvtGraphicFill); } + mpOutputDevice->Pop(); break; } case PRIMITIVE2D_ID_MASKPRIMITIVE2D : @@ -1782,6 +1788,7 @@ namespace drawinglayer } case PRIMITIVE2D_ID_UNIFIEDTRANSPARENCEPRIMITIVE2D : { + mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); // for metafile: Need to examine what the pure vcl version is doing here actually // - uses DrawTransparent with metafile for content and a gradient // - uses DrawTransparent for single PolyPolygons directly. Can be detected by @@ -1915,6 +1922,7 @@ namespace drawinglayer } } + mpOutputDevice->Pop(); break; } case PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D : |