summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 7ae4de94f676..706020b37dd3 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1306,8 +1306,34 @@ namespace drawinglayer
&rStrokeArrowPrimitive.getStart(),
&rStrokeArrowPrimitive.getEnd());
+ // write LineGeometry start marker
impStartSvtGraphicStroke(pSvtGraphicStroke);
+
+ // #116162# When B&W is set as DrawMode, DRAWMODE_WHITEFILL is used
+ // to let all fills be just white; for lines DRAWMODE_BLACKLINE is used
+ // so all line geometry is supposed to get black. Since in the in-between
+ // stages of line geometry drawing filled polygons are used (e.g. line
+ // start/ends) it is necessary to change these drawmodes to preserve
+ // that lines shall be black; thus change DRAWMODE_WHITEFILL to
+ // DRAWMODE_BLACKFILL during line geometry processing to have line geometry
+ // parts filled black.
+ const sal_uLong nOldDrawMode(mpOutputDevice->GetDrawMode());
+ const bool bDrawmodeChange(nOldDrawMode & DRAWMODE_WHITEFILL && mnSvtGraphicStrokeCount);
+
+ if(bDrawmodeChange)
+ {
+ mpOutputDevice->SetDrawMode((nOldDrawMode & ~DRAWMODE_WHITEFILL) | DRAWMODE_BLACKFILL);
+ }
+
+ // process sub-line geometry (evtl. filled PolyPolygons)
process(rCandidate.get2DDecomposition(getViewInformation2D()));
+
+ if(bDrawmodeChange)
+ {
+ mpOutputDevice->SetDrawMode(nOldDrawMode);
+ }
+
+ // write LineGeometry end marker
impEndSvtGraphicStroke(pSvtGraphicStroke);
}