[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Mon May 12 03:18:40 PDT 2014


 sc/source/ui/view/output.cxx |   96 ++++++++++++++++++++++++-------------------
 1 file changed, 54 insertions(+), 42 deletions(-)

New commits:
commit b30c08e3dd5e1c20923f66684a893a9c2ede6637
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun May 11 19:50:53 2014 -0400

    fdo#78535: Don't process borders of 0 width.
    
    Or they would get drawn for real.
    
    Change-Id: Iec24e70a80ff8aa1ef7512e71249a99243297c4e
    (cherry picked from commit 224b235971a01971de626d38ccc8506d0a55771b)
    Reviewed-on: https://gerrit.libreoffice.org/9323
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1a5cdde..30d2ee8 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1716,50 +1716,62 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
 
                         const svx::frame::Style noStyle;
                         // Horizontal lines
-                        long nUpperRotate = lcl_getRotate( mpDoc, nTab, nX, nY - 1 );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[bLayoutRTL?1:0], aPoints[bLayoutRTL?0:1], aTopLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aLeftLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aRightLine,
-                                    pForceColor, nUpperRotate, nAttrRotate ) );
-
-                        long nLowerRotate = lcl_getRotate( mpDoc, nTab, nX, nY + 1 );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[bLayoutRTL?2:3], aPoints[bLayoutRTL?3:2], aBottomLine,
-                                    aLeftLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aRightLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    pForceColor, 18000 - nAttrRotate, 18000 - nLowerRotate ) );
+                        if (aTopLine.Prim() || aTopLine.Secn())
+                        {
+                            long nUpperRotate = lcl_getRotate( mpDoc, nTab, nX, nY - 1 );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[bLayoutRTL?1:0], aPoints[bLayoutRTL?0:1], aTopLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aLeftLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aRightLine,
+                                        pForceColor, nUpperRotate, nAttrRotate ) );
+                        }
+
+                        if (aBottomLine.Prim() || aBottomLine.Secn())
+                        {
+                            long nLowerRotate = lcl_getRotate( mpDoc, nTab, nX, nY + 1 );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[bLayoutRTL?2:3], aPoints[bLayoutRTL?3:2], aBottomLine,
+                                        aLeftLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aRightLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        pForceColor, 18000 - nAttrRotate, 18000 - nLowerRotate ) );
+                        }
 
                         // Vertical slanted lines
-                        long nLeftRotate = lcl_getRotate( mpDoc, nTab, nX - 1, nY );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[0], aPoints[3], aLeftLine,
-                                    aTopLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aBottomLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    pForceColor, nAttrRotate, nLeftRotate ) );
-
-                        long nRightRotate = lcl_getRotate( mpDoc, nTab, nX + 1, nY );
-                        pProcessor->process( svx::frame::CreateBorderPrimitives(
-                                    aPoints[1], aPoints[2], aRightLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aTopLine,
-                                    svx::frame::Style(),
-                                    svx::frame::Style(),
-                                    aBottomLine,
-                                    pForceColor, 18000 - nRightRotate, 18000 - nAttrRotate ) );
+                        if (aLeftLine.Prim() || aLeftLine.Secn())
+                        {
+                            long nLeftRotate = lcl_getRotate( mpDoc, nTab, nX - 1, nY );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[0], aPoints[3], aLeftLine,
+                                        aTopLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aBottomLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        pForceColor, nAttrRotate, nLeftRotate ) );
+                        }
+
+                        if (aRightLine.Prim() || aRightLine.Secn())
+                        {
+                            long nRightRotate = lcl_getRotate( mpDoc, nTab, nX + 1, nY );
+                            pProcessor->process( svx::frame::CreateBorderPrimitives(
+                                        aPoints[1], aPoints[2], aRightLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aTopLine,
+                                        svx::frame::Style(),
+                                        svx::frame::Style(),
+                                        aBottomLine,
+                                        pForceColor, 18000 - nRightRotate, 18000 - nAttrRotate ) );
+                        }
                     }
                 }
                 nPosX += nColWidth * nLayoutSign;


More information about the Libreoffice-commits mailing list