diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-21 10:27:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-02-21 13:27:54 +0000 |
commit | b428a97d88b08fadd63039482c09c17a5fbac3be (patch) | |
tree | 120117f894eea5349749de5a745dd08b0ea910b9 /svtools/source/uno/wizard | |
parent | b767398f33f91f53f65ab2822ee667b59589e162 (diff) |
Related: tdf#152508 and tdf#132110 use initial child size as size request
tdf#132110 works with this, and might be a better solution for tdf#152508
which doesn't have an explicit reproducer, but describes a similar
problem.
Change-Id: Ib9c39489fe37b77d6b905b891b975d2ab0d77289
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147386
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/uno/wizard')
-rw-r--r-- | svtools/source/uno/wizard/wizardpagecontroller.cxx | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx index 57ed08c6f164..67776a38e937 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.cxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -51,25 +51,13 @@ namespace svt::uno { // Plug a toplevel SalFrame into the native page which can host our awt widgetry css::uno::Reference<css::awt::XWindow> xChildFrame = pParent->CreateChildFrame(); - com::sun::star::awt::Rectangle r0 = xChildFrame->getPosSize(); m_xWizardPage.set(m_xController->createPage(xChildFrame, i_nPageId), UNO_SET_THROW); css::uno::Reference<css::awt::XWindow> xPageWindow(m_xWizardPage->getWindow(), UNO_SET_THROW); - // If size of page is changed by createPage, then the requested size of the container - // should also be set to this size, to avoid annoying resizings. - com::sun::star::awt::Rectangle r1 = xChildFrame->getPosSize(); - - if (r0.Width != r1.Width || r0.Height != r1.Height) - pParent->set_size_request(r1.Width, r1.Height); - else - { - // tdf#132110 If the parent size wasn't overridden, then use - // the size of the child if that was set - com::sun::star::awt::Rectangle aChildRect = xPageWindow->getPosSize(); - if (aChildRect.Width && aChildRect.Height) - pParent->set_size_request(aChildRect.Width, aChildRect.Height); - } + // tdf#132110 use the current size of the child as the size request + com::sun::star::awt::Rectangle aChildRect = xPageWindow->getPosSize(); + pParent->set_size_request(aChildRect.Width, aChildRect.Height); xPageWindow->setVisible(true); } |