summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-26 16:53:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-27 20:13:03 +0100
commit3d9f5d21154f4a79df0a3ea4c2d3b6289a034d31 (patch)
tree6b3413db2f5f3ece0bf803084b46469a69052129 /sd
parentd87e95289363e95eec2c6603f248253e6c7598df (diff)
calculate text height after setting paper size
Change-Id: Ifb92109ead6b4a321d4abd81c2d36c415cbd767a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111655 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index fbed7c862aea..408eb1a548bd 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -399,12 +399,14 @@ void AnnotationWindow::DoResize()
void AnnotationContents::DoResize()
{
- ::tools::Long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height();
::tools::Long aHeight = GetSizePixel().Height();
::tools::ULong aWidth = GetSizePixel().Width();
aHeight -= POSTIT_META_HEIGHT;
+ mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth, aHeight) ) ) ;
+ ::tools::Long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height();
+
if( aTextHeight > aHeight )
{
// we need vertical scrollbars and have to reduce the width
@@ -416,8 +418,6 @@ void AnnotationContents::DoResize()
mxVScrollbar->set_vpolicy(VclPolicyType::NEVER);
}
- mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ;
-
::tools::Rectangle aOutputArea = PixelToLogic(::tools::Rectangle(0, 0, aWidth, aHeight));
if (mxVScrollbar->get_vpolicy() == VclPolicyType::NEVER)
{