diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-15 17:27:58 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-11-16 15:59:04 +0100 |
commit | 0866a9e92ff0d301632d0600d6178c2fc2080f48 (patch) | |
tree | 0949cf2032f71009fbfa2e566aee2bd2ddf6d394 /sw | |
parent | e9ac9830328df833311a3ff703c165234965e2cb (diff) |
Resolves: tdf#143511 SysObj is clipped out if the widget is out of view
so the sizes and relative positions are invalid under gtk, unclip
the SysObj when using get_extents_relative_to
Change-Id: Ibdaff20531a2a40b3b9b7dc9ac880d014db07d5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125141
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 2ae806b5316b..606945672144 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -153,6 +153,10 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& rPosition, bool bPoint void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const Point& rPt) { + // tdf#143511 unclip SysObj so get_extents_relative_to of children + // of the SysObj can provide meaningful results + UnclipVisibleSysObj(); + pDev->Push(); pDev->SetFillColor(mColorDark); @@ -164,6 +168,7 @@ void SwAnnotationWin::DrawForPage(OutputDevice* pDev, const Point& rPt) pDev->SetFont(aFont); Size aSz = PixelToLogic(GetSizePixel()); + pDev->DrawRect(tools::Rectangle(rPt, aSz)); if (mxMetadataAuthor->get_visible()) |