diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 6a7a7770a17e..6f1c1d49da3f 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -112,9 +112,12 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) pEditView->setEditViewCallbacks(this); EditEngine* pEditEngine = GetEditEngine(); - // 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 + // For tdf#143443 note we want an 'infinite' height initially (which is the + // editengines default). For tdf#144686 it is helpful if the initial width + // is the "SidebarWidth" so the calculated text height is always meaningful + // for layout in the sidebar. + Size aPaperSize(mrPostItMgr.GetSidebarWidth(), pEditEngine->GetPaperSize().Height()); + pEditEngine->SetPaperSize(aPaperSize); pEditEngine->SetRefDevice(&rDevice); pEditView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize)); |