summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-10 16:25:45 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-12-11 02:00:11 +0100
commitc1f939c454d844d7a5d59a87f6d20c61b54fcb61 (patch)
tree26d21759162043231d775e494d3bdf395f746218 /sw
parent26259e4089ec0225e84ed99159d85e858f612022 (diff)
Resolves: tdf#145974 reduce the papersize by scrollbar thickness
if scrollbar required and scrollbar isn't an overlay one Change-Id: I839fd8c214febadb80f692b53dc156e251f506ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126603 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 70460686d03d..a64dd1ebc0bc 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -755,8 +755,13 @@ void SwAnnotationWin::DoResize()
if (aTextHeight > aHeight)
{
- // we need vertical scrollbars and have to reduce the width
- aWidth -= mxVScrollbar->get_scroll_thickness();
+ const int nThickness = mxVScrollbar->get_scroll_thickness();
+ if (nThickness)
+ {
+ // we need vertical scrollbars and have to reduce the width
+ aWidth -= nThickness;
+ mpOutliner->SetPaperSize(PixelToLogic(Size(aWidth, aHeight)));
+ }
mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS);
}
else