summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-10 16:25:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-10 20:51:22 +0100
commitf40390d98f45e6cb19ad896dc30eff07f746942f (patch)
tree40bd6dd5b9d2023bc6da92b4992a5cc41df72e35 /sw/source/uibase/docvw
parent70591eb5efb9f4e5596b32d1e3c9368b9e9726a4 (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/+/126645 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/docvw')
-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 30e391182118..913430ed9822 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -752,8 +752,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