diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-07-19 11:24:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-07-19 16:49:09 +0200 |
commit | fce3d0eec508c14beb2bc4ad3b7982abf6ec3c4a (patch) | |
tree | 3349b068942cd0eb22f1540caef039adfea6654c /sfx2 | |
parent | a08e51634ff944eef05ce802242fc90a501f462a (diff) |
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/backingcomp.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
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 |