summaryrefslogtreecommitdiff
path: root/sd/source
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:41 +0100
commit0b7fe09bef0ac324132528e1b93b7c4102f3e087 (patch)
tree5d8dd0eeaa9c7893de85ecde0c753f05e02c37b1 /sd/source
parentaec427fd124e73298b46f7b0423fa90f8e024f4b (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/+/126602 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index c3b797f239ce..42ebe77c306f 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -390,8 +390,13 @@ void AnnotationWindow::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(rDevice.PixelToLogic(Size(aWidth, aHeight)));
+ }
mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS);
}
else