incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1400911 - /incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
Date Mon, 22 Oct 2012 15:15:22 GMT
Author: alg
Date: Mon Oct 22 15:15:22 2012
New Revision: 1400911

URL: http://svn.apache.org/viewvc?rev=1400911&view=rev
Log:
#116162# Forced DRAWMODE_WHITEFILL to DRAWMODE_BLACKFILL during line geometry processing to
get line geometry rendered black (as intended) in b&w mode (e.g. print preview)

Modified:
    incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx

Modified: incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx?rev=1400911&r1=1400910&r2=1400911&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx Mon
Oct 22 15:15:22 2012
@@ -1287,9 +1287,35 @@ namespace drawinglayer
                             &rStrokeArrowPrimitive.getStart(), 
                             &rStrokeArrowPrimitive.getEnd());
 
+                        // write LineGeometry start marker
 			    		impStartSvtGraphicStroke(pSvtGraphicStroke);
-				    	process(rCandidate.get2DDecomposition(getViewInformation2D()));
-					    impEndSvtGraphicStroke(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);
                     }
 
                     break;



Mime
View raw message