From 5e01f82b0918d2b54acee36f8d47de18d9340a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 3 Nov 2021 15:06:26 +0000 Subject: [PATCH] Resolves: tdf#143443 size of comment box too tall after cut/paste MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a problem since... commit 69c546e1e7a697217f273baa7c1729ff823efd76 Author: Caolán McNamara Date: Fri Dec 4 16:30:31 2020 +0000 weld annotation window this sidebar case assumes that the papersize of the underlying editengine is initially unlimited in size Change-Id: I127f249158deecef3e2c6874982b4e7cc78e69fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124656 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sw/source/uibase/docvw/SidebarTxtControl.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index df1636ea510c..eaeca216f1bf 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -112,7 +112,9 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) pEditView->setEditViewCallbacks(this); EditEngine* pEditEngine = GetEditEngine(); - pEditEngine->SetPaperSize(aSize); + // tdf#143443 note we don't call SetPaperSize on pEditEngine unlike + // similar cases so that the Control defaults to the smallest possible + // height it might take, it can grow later pEditEngine->SetRefDevice(&rDevice); pEditView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize));