summaryrefslogtreecommitdiff
path: root/svtools/source/uno/wizard
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/uno/wizard')
-rw-r--r--svtools/source/uno/wizard/wizardpagecontroller.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx
index 850d9b102c7a..57ed08c6f164 100644
--- a/svtools/source/uno/wizard/wizardpagecontroller.cxx
+++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx
@@ -51,18 +51,27 @@ 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();
- // 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 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);
}
- Reference< XWindow > xPageWindow(m_xWizardPage->getWindow(), UNO_SET_THROW);
- xPageWindow->setVisible( true );
+ xPageWindow->setVisible(true);
}
catch( const Exception& )
{