[Libreoffice-commits] core.git: sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jul 19 14:49:32 UTC 2018


 sfx2/source/dialog/backingcomp.cxx |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit fce3d0eec508c14beb2bc4ad3b7982abf6ec3c4a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 19 11:24:40 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
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 <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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


More information about the Libreoffice-commits mailing list