diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-05 20:27:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-06 12:01:26 +0200 |
commit | 94b73fb5e206a8718e5127cf58c826099ae92f5a (patch) | |
tree | a80a1e5272108c4d600b977e3a1559751080401d | |
parent | 197c91c45a0ff691af5089b2603737c1320880c1 (diff) |
let a subclass defer creating its EditView
Change-Id: I0d182db0658ff5e0ab3d7164de000ed76460eef5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104008
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 12c6a94cd740..d29316f9c9a9 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -75,11 +75,14 @@ void WeldEditView::makeEditEngine() void WeldEditView::Resize() { - OutputDevice& rDevice = GetDrawingArea()->get_ref_device(); - Size aOutputSize(rDevice.PixelToLogic(GetOutputSizePixel())); - Size aSize(aOutputSize); - m_xEditEngine->SetPaperSize(aSize); - m_xEditView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize)); + if (m_xEditView) + { + OutputDevice& rDevice = GetDrawingArea()->get_ref_device(); + Size aOutputSize(rDevice.PixelToLogic(GetOutputSizePixel())); + Size aSize(aOutputSize); + m_xEditEngine->SetPaperSize(aSize); + m_xEditView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize)); + } weld::CustomWidgetController::Resize(); } |