drawinglayer/source/primitive2d/borderlineprimitive2d.cxx |   56 ++++++--------
 1 file changed, 26 insertions(+), 30 deletions(-)

New commits:
commit 77b6c1602aaa0bd059077765e7fabb53d9e6ddeb
Author: Kohei Yoshida <[email protected]>
Date:   Mon Mar 17 22:30:17 2014 -0400

    fdo#75260: Don't forget to offset the inner with the width of the outer.
    
    The inner and outer lines were drawn side-by-side as one fat line because
    of this.
    
    The positions of the right and bottom border lines are still off even after
    this change.
    
    Change-Id: Ia4b661bb819a813562e0143397cada52148f26e9

diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx 
b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 67efa09..b74061e 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -183,37 +183,33 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
 
                     xRetval.realloc(2);
 
-                    {
-                        // "inside" line
-                        double fWidth = getLeftWidth();
-                        basegfx::BColor aColor = getRGBColorLeft();
-                        bool bIsHairline = lcl_UseHairline(
-                                fWidth, getStart(), getEnd(), 
rViewInformation);
-                        fWidth = lcl_GetCorrectedWidth(fWidth,
-                                    getStart(), getEnd(), rViewInformation);
-
-                        if (bIsHairline)
-                            xRetval[0] = makeHairLinePrimitive(getStart(), 
getEnd(), aVector, aColor, 0.0);
-                        else
-                            xRetval[0] = makeSolidLinePrimitive(
-                                aClipRegion, aTmpStart, aTmpEnd, aVector, 
aColor, fWidth, 0.0);
-                    }
+                    double fLeftWidth = getLeftWidth();
+                    bool bLeftHairline = lcl_UseHairline(fLeftWidth, 
getStart(), getEnd(), rViewInformation);
+                    if (bLeftHairline)
+                        fLeftWidth = 0.0;
 
-                    {
-                        // "outside" line
-                        double fWidth = getRightWidth();
-                        basegfx::BColor aColor = getRGBColorRight();
-                        bool bIsHairline = lcl_UseHairline(
-                                fWidth, getStart(), getEnd(), 
rViewInformation);
-                        fWidth = lcl_GetCorrectedWidth(fWidth,
-                                    getStart(), getEnd(), rViewInformation);
-
-                        if (bIsHairline)
-                            xRetval[1] = makeHairLinePrimitive(getStart(), 
getEnd(), aVector, aColor, mfDistance);
-                        else
-                            xRetval[1] = makeSolidLinePrimitive(
-                                aClipRegion, aTmpStart, aTmpEnd, aVector, 
aColor, fWidth, mfDistance);
-                    }
+                    double fRightWidth = getRightWidth();
+                    bool bRightHairline = lcl_UseHairline(fRightWidth, 
getStart(), getEnd(), rViewInformation);
+                    if (bRightHairline)
+                        fRightWidth = 0.0;
+
+                    // "inside" line
+
+                    if (bLeftHairline)
+                        xRetval[0] = makeHairLinePrimitive(
+                            getStart(), getEnd(), aVector, getRGBColorLeft(), 
0.0);
+                    else
+                        xRetval[0] = makeSolidLinePrimitive(
+                            aClipRegion, aTmpStart, aTmpEnd, aVector, 
getRGBColorLeft(), fLeftWidth, 0.0);
+
+                    // "outside" line
+
+                    if (bRightHairline)
+                        xRetval[1] = makeHairLinePrimitive(
+                            getStart(), getEnd(), aVector, getRGBColorRight(), 
fLeftWidth+mfDistance);
+                    else
+                        xRetval[1] = makeSolidLinePrimitive(
+                            aClipRegion, aTmpStart, aTmpEnd, aVector, 
getRGBColorRight(), fRightWidth, fLeftWidth+mfDistance);
                 }
                 else
                 {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to