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

Noel Grandin noel at peralex.com
Thu May 19 08:33:54 UTC 2016


 sfx2/source/appl/sfxpicklist.cxx |   40 ---------------------------------------
 sfx2/source/doc/oleprops.hxx     |    2 -
 sfx2/source/inc/sfxpicklist.hxx  |    2 -
 sfx2/source/inc/sfxtypes.hxx     |   11 ----------
 sfx2/source/inc/templdgi.hxx     |    8 -------
 5 files changed, 63 deletions(-)

New commits:
commit 3fae8c02855360c4573932ae0f518a45658cfbe5
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 19 08:28:56 2016 +0200

    loplugin:unusedmethods in sfx2
    
    Change-Id: I90e2c0a0091843aee16931382d125a4328ac69fb
    Reviewed-on: https://gerrit.libreoffice.org/25125
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 909706a..31ec4e5 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -305,41 +305,6 @@ void SfxPickList::CreatePickListEntries()
     }
 }
 
-void SfxPickList::CreateMenuEntries( Menu* pMenu )
-{
-    ::osl::MutexGuard aGuard( thePickListMutex::get() );
-
-    static bool bPickListMenuInitializing = false;
-
-    if ( bPickListMenuInitializing ) // method is not reentrant!
-        return;
-
-    bPickListMenuInitializing = true;
-    CreatePickListEntries();
-
-    for ( sal_uInt16 nId = START_ITEMID_PICKLIST; nId <= END_ITEMID_PICKLIST; ++nId )
-        pMenu->RemoveItem( pMenu->GetItemPos( nId ) );
-
-    if ( pMenu->GetItemType( pMenu->GetItemCount()-1 ) == MenuItemType::SEPARATOR )
-        pMenu->RemoveItem( pMenu->GetItemCount()-1 );
-
-    if ( m_aPicklistVector.size() > 0 &&
-         pMenu->GetItemType( pMenu->GetItemCount()-1 )
-            != MenuItemType::SEPARATOR && m_nAllowedMenuSize )
-        pMenu->InsertSeparator();
-
-    OUString aEmptyString;
-    for ( size_t i = 0; i < m_aPicklistVector.size(); i++ )
-    {
-        PickListEntry* pEntry = GetPickListEntry( i );
-
-        pMenu->InsertItem( (sal_uInt16)(START_ITEMID_PICKLIST + i), aEmptyString );
-        CreatePicklistMenuTitle( pMenu, (sal_uInt16)(START_ITEMID_PICKLIST + i), pEntry->aName, i );
-    }
-
-    bPickListMenuInitializing = false;
-}
-
 void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
 {
     ::osl::ClearableMutexGuard aGuard( thePickListMutex::get() );
@@ -369,11 +334,6 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
     }
 }
 
-void SfxPickList::ExecuteMenuEntry( sal_uInt16 nId )
-{
-    ExecuteEntry( (sal_uInt32)( nId - START_ITEMID_PICKLIST ) );
-}
-
 void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
     const SfxStringHint* pStringHint = dynamic_cast<const SfxStringHint*>(&rHint);
diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index 8ae7236..ebbf4fa 100644
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.hxx
@@ -104,8 +104,6 @@ public:
                             mxTextEnc( new rtl_TextEncoding( osl_getThreadTextEncoding() ) ) {}
     inline explicit     SfxOleTextEncoding( rtl_TextEncoding eTextEnc ) :
                             mxTextEnc( new rtl_TextEncoding( eTextEnc ) ) {}
-    inline explicit     SfxOleTextEncoding( sal_Int16 nCodePage ) :
-                            mxTextEnc( new rtl_TextEncoding ) { SetCodePage( nCodePage ); }
 
     /** Returns the current text encoding identifier. */
     inline rtl_TextEncoding GetTextEncoding() const { return *mxTextEnc; }
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index c7c70e2..a9a13ae 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -62,8 +62,6 @@ class SfxPickList : public SfxListener
         static SfxPickList& Get();
         static void ensure() { Get(); }
 
-        void                CreateMenuEntries( Menu* pMenu );
-        static void         ExecuteMenuEntry( sal_uInt16 nId );
         static void         ExecuteEntry( sal_uInt32 nIndex );
 
         virtual void        Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index dd55b76..cfa3d1d 100644
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -69,17 +69,6 @@ public:
 #endif
 
 
-struct StringList_Impl : private Resource
-{
-
-    ResId aResId;
-
-    StringList_Impl( const ResId& rErrIdP,  sal_uInt16 nId)
-        : Resource( rErrIdP ), aResId(nId, *rErrIdP.GetResMgr()) {}
-    ~StringList_Impl() { FreeResource(); }
-
-};
-
 #endif // INCLUDED_SFX2_SOURCE_INC_SFXTYPES_HXX
 
 
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 3f20203..b8a08d3 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -62,14 +62,6 @@ protected:
     sal_uInt16 nModifier;
 
 public:
-    DropListBox_Impl(vcl::Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD)
-        : SvTreeListBox(pParent, rId)
-        , pDialog(pD)
-        , nModifier(0)
-    {
-        SetHighlightRange();
-    }
-
     DropListBox_Impl(vcl::Window* pParent, WinBits nWinBits, SfxCommonTemplateDialog_Impl* pD)
         : SvTreeListBox(pParent, nWinBits)
         , pDialog(pD)


More information about the Libreoffice-commits mailing list