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

Takeshi Abe tabe at fixedpoint.jp
Sat Nov 11 06:25:39 UTC 2017


 include/sfx2/viewsh.hxx                |    1 -
 sfx2/source/view/sfxbasecontroller.cxx |    2 +-
 sfx2/source/view/viewfrm.cxx           |    2 +-
 sfx2/source/view/viewsh.cxx            |   21 ---------------------
 4 files changed, 2 insertions(+), 24 deletions(-)

New commits:
commit ce470df92913ffc1849de90b9fd6a2a9d69b8e33
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Nov 8 18:11:48 2017 +0900

    sfx2: Replace SfxViewShell::DiscardClients_Impl()
    
    with DisconnectAllClients() because both do the same
    ever since 17a91c18edea240a35a12a573933917240e9fb4a.
    
    Change-Id: I17639670d0fb787c69a53e8992f706937665d7b3
    Reviewed-on: https://gerrit.libreoffice.org/44447
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index d9467fb2aa47..7c9929fbbe9e 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -298,7 +298,6 @@ public:
     SAL_DLLPRIVATE void NewIPClient_Impl( SfxInPlaceClient *pIPClient );
     SAL_DLLPRIVATE void IPClientGone_Impl( SfxInPlaceClient const *pIPClient );
     SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient const *pIP );
-    SAL_DLLPRIVATE void DiscardClients_Impl();
 
     SAL_DLLPRIVATE void SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
     SAL_DLLPRIVATE bool IsShowView_Impl() const;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 8dd2fabe54c3..72ca5708d872 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -958,7 +958,7 @@ void SAL_CALL SfxBaseController::dispose()
         SfxViewFrame* pFrame = m_pData->m_pViewShell->GetViewFrame() ;
         if ( pFrame && pFrame->GetViewShell() == m_pData->m_pViewShell )
             pFrame->GetFrame().SetIsClosing_Impl();
-        m_pData->m_pViewShell->DiscardClients_Impl();
+        m_pData->m_pViewShell->DisconnectAllClients();
 
         if ( pFrame )
         {
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index de1bee06d486..6c2f5fb37757 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1032,7 +1032,7 @@ bool SfxViewFrame::Close()
     // If no saving have been made up until now, then embedded Objects should
     // not be saved automatically anymore.
     if ( GetViewShell() )
-        GetViewShell()->DiscardClients_Impl();
+        GetViewShell()->DisconnectAllClients();
     Broadcast( SfxHint( SfxHintId::Dying ) );
 
     if (SfxViewFrame::Current() == this)
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 30efcb52b6b8..1dfbd26db93c 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1028,9 +1028,6 @@ void SfxViewShell::SetWindow
     // Disconnect existing IP-Clients if possible
     DisconnectAllClients();
 
-    //TODO: should we have a "ReconnectAllClients" method?
-    DiscardClients_Impl();
-
     // Switch View-Port
     bool bHadFocus = pWindow && pWindow->HasChildPathFocus( true );
     pWindow = pViewPort;
@@ -1655,24 +1652,6 @@ void SfxViewShell::CheckIPClient_Impl(
 }
 
 
-void SfxViewShell::DiscardClients_Impl()
-
-/*  [Description]
-
-    The purpose of this Method is to prevent the saving of Objects when closing
-    the Document, if the user has chosen to close without saving.
-*/
-
-{
-    SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
-    if ( !pClients )
-        return;
-
-    for ( size_t n = 0; n < pClients->size(); )
-        delete pClients->at( n );
-}
-
-
 SfxObjectShell* SfxViewShell::GetObjectShell()
 {
     return pFrame ? pFrame->GetObjectShell() : nullptr;


More information about the Libreoffice-commits mailing list