[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 6 10:01:45 UTC 2021


 sw/source/uibase/docvw/SidebarTxtControl.cxx |   25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

New commits:
commit e94784a54fa1995a23587fcb5493a24e62deda04
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 5 15:32:19 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Feb 6 11:01:01 2021 +0100

    print struck-through 'deleted' comments with change-tracking enabled
    
    in print comments in margins, the strike-through lines were missing in
    the print out previous to this
    
    Change-Id: I7f7f06d29b5f035a1e4996e1d89ce2b198b7a15c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110480
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index bf3601cbe893..390ed80b0712 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -142,15 +142,22 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags)
 
     if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED )
     {
-        SetLineColor(mrSidebarWin.GetChangeColor());
-        pDev->DrawLine( PixelToLogic( GetPosPixel(), pDev->GetMapMode() ),
-                  PixelToLogic( GetPosPixel() +
-                                Point( GetSizePixel().Width(),
-                                       GetSizePixel().Height() ), pDev->GetMapMode() ) );
-        pDev->DrawLine( PixelToLogic( GetPosPixel() +
-                                Point( GetSizePixel().Width(),0), pDev->GetMapMode() ),
-                  PixelToLogic( GetPosPixel() +
-                                Point( 0, GetSizePixel().Height() ), pDev->GetMapMode() ) );
+        pDev->Push(PushFlags::LINECOLOR);
+
+        pDev->SetLineColor(mrSidebarWin.GetChangeColor());
+        Point aBottomRight(rPt);
+        aBottomRight.Move(aSize);
+        pDev->DrawLine(rPt,  aBottomRight);
+
+        Point aTopRight(rPt);
+        aTopRight.Move(Size(aSize.Width(), 0));
+
+        Point aBottomLeft(rPt);
+        aBottomLeft.Move(Size(0, aSize.Height()));
+
+        pDev->DrawLine(aTopRight, aBottomLeft);
+
+        pDev->Pop();
     }
 }
 


More information about the Libreoffice-commits mailing list