summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-31 16:22:58 +0100
committerMichael Stahl <mstahl@redhat.com>2017-09-07 12:26:05 +0200
commit63da940c6e31b615269846424a965ba8ce0837a3 (patch)
treefecb3f03be840b1155ee2e78070300fed12c5699 /drawinglayer
parent1937fbd57804d3f45a0946af77003c43446de1b5 (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/41762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 99d9e700e390..88616b2517b7 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1220,6 +1220,8 @@ namespace drawinglayer
}
else
{
+ mpOutputDevice->Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
+
// support SvtGraphicStroke MetaCommentAction
SvtGraphicStroke* pSvtGraphicStroke = impTryToCreateSvtGraphicStroke(
rBasePolygon, nullptr,
@@ -1275,6 +1277,8 @@ namespace drawinglayer
}
impEndSvtGraphicStroke(pSvtGraphicStroke);
+
+ mpOutputDevice->Pop();
}
break;
@@ -1667,6 +1671,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());
@@ -1742,6 +1747,7 @@ namespace drawinglayer
RenderMetafilePrimitive2D(aMetafile);
}
+ mpOutputDevice->Pop();
break;
}
case PRIMITIVE2D_ID_MASKPRIMITIVE2D :
@@ -1812,6 +1818,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
@@ -1946,6 +1953,7 @@ namespace drawinglayer
}
}
+ mpOutputDevice->Pop();
break;
}
case PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D :