[Libreoffice-commits] core.git: framework/inc framework/source

Juergen Funk juergen.funk_ml at cib.de
Tue Feb 7 08:42:13 UTC 2017


 framework/inc/services/desktop.hxx    |   17 +++++++++++++++--
 framework/source/services/desktop.cxx |   10 +++++++++-
 2 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit d8ccf8cf7a604cb1df04f23b5b5036fff1d4afdb
Author: Juergen Funk <juergen.funk_ml at cib.de>
Date:   Thu Dec 8 12:25:50 2016 +0100

    Stop question in context of session manager when cancel a frame
    
    When shutdown or logout, LO make the question for all open
    windows, but when you cancel a window the question for the other
    windows are not necessary, this patch breaks the other questions.
    
     in dependency of tdf#104101
    
    Change-Id: I7119317d392ccd808c67fb57f82b1e990062abf2
    Reviewed-on: https://gerrit.libreoffice.org/33311
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx
index ee2d576..4b6dbc0 100644
--- a/framework/inc/services/desktop.hxx
+++ b/framework/inc/services/desktop.hxx
@@ -373,8 +373,21 @@ class Desktop : private cppu::BaseMutex,
 
     private:
 
-        bool m_bIsTerminated;  /// check flag to protect us against dispose before terminate!
-                                    /// see dispose() for further information!
+        /** check flag to protect us against dispose before terminate!
+          *   see dispose() for further information!
+          */
+        bool m_bIsTerminated;
+
+        /** when true, the call came form session manager
+          *   the methode is Desktop::terminateQuickstarterToo()
+          *   this the only one place where set this to true
+          *   In this case,  when one frame break, not make
+          *   question for other, the break of shutdown or logout
+          *   can be only once.
+          *   In Desktop::impl_closeFrames would be test and break
+          *   the loop and reset to false
+          */
+        bool m_bSession;
 
         css::uno::Reference< css::uno::XComponentContext >              m_xContext;               /// reference to factory, which has create this instance
         FrameContainer                                                  m_aChildTaskContainer;    /// array of child tasks (children of desktop are tasks; and tasks are also frames - But pure frames are not accepted!)
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index e5133a7..b210434 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -158,6 +158,7 @@ Desktop::Desktop( const css::uno::Reference< css::uno::XComponentContext >& xCon
         ,   cppu::OPropertySetHelper( cppu::WeakComponentImplHelperBase::rBHelper   )
         // Init member
         ,   m_bIsTerminated         ( false                                     )   // see dispose() for further information!
+        ,   m_bSession              ( false                                         )
         ,   m_xContext              ( xContext                                      )
         ,   m_aChildTaskContainer   (                                               )
         ,   m_aListenerContainer    ( m_aMutex )
@@ -389,6 +390,7 @@ namespace
 bool SAL_CALL Desktop::terminateQuickstarterToo()
 {
     QuickstartSuppressor aQuickstartSuppressor(this, m_xQuickLauncher);
+    m_bSession = true;
     return terminate();
 }
 
@@ -1702,7 +1704,10 @@ bool Desktop::impl_closeFrames(bool bAllowUI)
                 if ( ! bSuspended )
                 {
                     ++nNonClosedFrames;
-                    continue;
+                    if(m_bSession)
+                        break;
+                    else
+                        continue;
                 }
             }
 
@@ -1754,6 +1759,9 @@ bool Desktop::impl_closeFrames(bool bAllowUI)
         }
     }
 
+    // reset the session
+    m_bSession = false;
+
     return (nNonClosedFrames < 1);
 }
 


More information about the Libreoffice-commits mailing list