fix paint table border in DOUBLE_THIN style

flw.aquarius at gmail.com flw.aquarius at gmail.com
Sun Dec 13 04:26:07 PST 2015


Hi, I find a bug in the master branch and fixed it. But i am in trouble when i push the patch to the gerrit. It the waring fllow:

The authenticity of host '[gerrit.libreoffice.org]:29418 ([89.238.68.148]:29418)' can't be established.

So, i show the screenshot to show the bug and patch fllow:

screenshot:
http://7xjcd4.com1.z0.glb.clouddn.com/bog_lo_bug_cell_double_thin_1.png

patch:
From f7d4b14cccb20ea39a90fb68986fb5578c6fd9a2 Mon Sep 17 00:00:00 2001
From: aqcoder <flw.aquarius at gmail.com>
Date: Sun, 13 Dec 2015 19:11:28 +0800
Subject: [PATCH] fix paint table border in DOUBLE_THIN style

it always paint partial table border which have line style of DOUBLE_THIN.
Becouse the partial of the border line is out of the invalid window rect.
so, we extend it.

Change-Id: I9d95ca71a96cfa869c68d9d2200f29c7cd447eca
---
 sw/source/core/layout/paintfrm.cxx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 83a8638..9746df7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2742,6 +2742,24 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
                 aPaintEnd.Y()   += static_cast<long>(offsetEnd   + 0.5);
             }
 
+            if( rEntryStyle.Type() == table::BorderLineStyle::DOUBLE_THIN )
+            {
+                long aPixel = rDev.PixelToLogic( Point(1, 1) ).getX();
+                SwRect aPaintEx( aPaintStart, aPaintEnd );
+                if( bHori )
+                {
+                    aPaintEx.Pos().Y() -= aPixel;
+                    aPaintEx.SSize().Height() += aPixel * 2;
+                }
+                else
+                {
+                    aPaintEx.Pos().X() -= aPixel;
+                    aPaintEx.SSize().Width() += aPixel * 2;
+                }
+
+                gProp.pSGlobalShell->InvalidateWindows( aPaintEx );
+            }
+
             if (bHori)
             {
                 mrTabFrame.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
-- 
2.5.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20151213/a277c65b/attachment.html>


More information about the LibreOffice mailing list