summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-05 15:32:19 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-02-08 02:43:00 +0100
commite79c5801bb1b9db74a8819bc1f6f214382211191 (patch)
treefa82d66b49317f94e6379f03eaca2117b4c1d6ed /sw
parent9c7a9060adbbcd0fbf593a811b5a02fe9bae898a (diff)
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/+/110444 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx25
1 files changed, 16 insertions, 9 deletions
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index fde45169248d..d8c43c9efd70 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -141,15 +141,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();
}
}