sfx2/source/dialog/backingcomp.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
New commits: commit fce3d0eec508c14beb2bc4ad3b7982abf6ec3c4a Author: Caolán McNamara <[email protected]> AuthorDate: Thu Jul 19 11:24:40 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Jul 19 16:49:09 2018 +0200 tdf#93085 restore orig min window size after startcenter... is replaced by something else, but use 1,1 if orig was 0,0 otherwise its ignored Change-Id: Id63ec5875cd8fb4335f0f47586bb30bb5f812145 Reviewed-on: https://gerrit.libreoffice.org/57722 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index 8d4ee36b4dd4..d6e36f75476b 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -92,6 +92,8 @@ private: osl::Mutex m_aTypeProviderMutex; + Size m_aInitialWindowMinSize; + public: explicit BackingComp(); @@ -425,6 +427,12 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f if( pMenu ) nMenuHeight = pMenu->GetSizePixel().Height(); + m_aInitialWindowMinSize = pParent->GetMinOutputSizePixel(); + if (!m_aInitialWindowMinSize.Width()) + m_aInitialWindowMinSize.AdjustWidth(1); + if (!m_aInitialWindowMinSize.Height()) + m_aInitialWindowMinSize.AdjustHeight(1); + pParent->SetMinOutputSizePixel( Size( pBack->get_width_request(), @@ -573,9 +581,12 @@ void SAL_CALL BackingComp::dispose() { css::uno::Reference< css::awt::XWindow > xParentWindow = m_xFrame->getContainerWindow(); VclPtr< WorkWindow > pParent = static_cast<WorkWindow*>(VCLUnoHelper::GetWindow(xParentWindow).get()); - - // hide NotebookBar - sfx2::SfxNotebookBar::CloseMethod(static_cast<SystemWindow*>(pParent)); + if (pParent) + { + pParent->SetMinOutputSizePixel(m_aInitialWindowMinSize); + // hide NotebookBar + sfx2::SfxNotebookBar::CloseMethod(static_cast<SystemWindow*>(pParent)); + } } // stop listening at the window _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
