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

Caolán McNamara caolanm at redhat.com
Mon May 8 14:30:24 UTC 2017


 sfx2/source/appl/sfxpicklist.cxx |    3 +--
 sfx2/source/inc/sfxpicklist.hxx  |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit f17d55e5495859b2a78ed625fc2573391e26cdf1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon May 8 15:27:49 2017 +0100

    fold SfxPickList::Get and ::ensure together
    
    Change-Id: Iab68095a9733393b656623ddd6bb8705f7cfda82

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index be1eef7aaf13..9e9bf33adc4f 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -165,10 +165,9 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
                                                                  (pFilter) ? pFilter->GetServiceName() : OUString() );
 }
 
-SfxPickList& SfxPickList::Get()
+void SfxPickList::ensure()
 {
     static SfxPickList aUniqueInstance(SvtHistoryOptions().GetSize(ePICKLIST));
-    return aUniqueInstance;
 }
 
 SfxPickList::SfxPickList( sal_uInt32 nAllowedMenuSize ) :
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index e77d6ed69c17..b1e86b084f75 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -45,8 +45,7 @@ class SfxPickList : public SfxListener
     static void             AddDocumentToPickList( SfxObjectShell* pDocShell );
 
     public:
-        static SfxPickList& Get();
-        static void ensure() { Get(); }
+        static void ensure();
 
         virtual void        Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
 };


More information about the Libreoffice-commits mailing list