[Libreoffice-commits] core.git: Branch 'feature/calc-cell-borders' - drawinglayer/source

Kohei Yoshida kohei.yoshida at collabora.com
Mon Jan 20 08:47:59 PST 2014


 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit c69e618225652a109a101ff213d9b8a21eff97a6
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Jan 20 11:48:36 2014 -0500

    Do the same when the pixel thickness is zero.
    
    Change-Id: Icfbb295abb19cf58477f4f14f4a7294a540151c2

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 68abfa4..ce22687 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -378,6 +378,13 @@ namespace drawinglayer
                     {
                         // Horizontal line.
 
+                        if (basegfx::fTools::equalZero(nThick))
+                        {
+                            // Dash line segment too small to draw.  Substitute it with a solid line.
+                            drawHairLine(mpOutputDevice, fX1, fY1, fX2, fY1, aLineColor);
+                            return true;
+                        }
+
                         // Create a dash unit polygon set.
                         basegfx::B2DPolyPolygon aDashes;
                         std::vector<double>::const_iterator it = aPattern.begin(), itEnd = aPattern.end();
@@ -438,6 +445,13 @@ namespace drawinglayer
                     {
                         // Vertical line.
 
+                        if (basegfx::fTools::equalZero(nThick))
+                        {
+                            // Dash line segment too small to draw.  Substitute it with a solid line.
+                            drawHairLine(mpOutputDevice, fX1, fY1, fX1, fY2, aLineColor);
+                            return true;
+                        }
+
                         // Create a dash unit polygon set.
                         basegfx::B2DPolyPolygon aDashes;
                         std::vector<double>::const_iterator it = aPattern.begin(), itEnd = aPattern.end();


More information about the Libreoffice-commits mailing list