From 8ac02b48579c18c1f3c394ea1ae8eb76262eb1e7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 14 Jan 2016 11:44:48 +0200 Subject: loplugin:unusedmethods unused return value in sfx2 Change-Id: I9c16c3f2754f181571faf7d5e1c48fa8bda59f7d --- sfx2/source/doc/doctemplates.cxx | 6 +++--- sfx2/source/inc/sfxtypes.hxx | 2 -- sfx2/source/inc/virtmenu.hxx | 7 ------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index e493e5a4aca5..31f603f07bf5 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -229,7 +229,7 @@ class SfxDocTplService_Impl const OUString& aFsysGroupName, const OUString& aOldGroupName, const OUString& aNewGroupName ); - bool RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath, + void RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath, const OUString& aGroupName ); bool WriteUINamesForTemplateDir_Impl( const OUString& aUserPath, const uno::Sequence< beans::StringPair >& aUINames ); @@ -1322,7 +1322,7 @@ bool SfxDocTplService_Impl::ReplaceUINamesForTemplateDir_Impl( const OUString& a } -bool SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath, +void SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( const OUString& aUserPath, const OUString& aGroupName ) { uno::Sequence< beans::StringPair > aUINames = ReadUINamesForTemplateDir_Impl( aUserPath ); @@ -1343,7 +1343,7 @@ bool SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( const OUString& aU aNewUINames.realloc( nNewLen ); - return !bChanged || WriteUINamesForTemplateDir_Impl( aUserPath, aNewUINames ); + !bChanged || WriteUINamesForTemplateDir_Impl( aUserPath, aNewUINames ); } diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx index 487142bff140..a5c5d54d2ac8 100644 --- a/sfx2/source/inc/sfxtypes.hxx +++ b/sfx2/source/inc/sfxtypes.hxx @@ -79,8 +79,6 @@ struct StringList_Impl : private Resource : Resource( rErrIdP ), aResId(nId, *rErrIdP.GetResMgr()) {} ~StringList_Impl() { FreeResource(); } - operator bool() { return IsAvailableRes(aResId.SetRT(RSC_STRING)); } - }; #endif // INCLUDED_SFX2_SOURCE_INC_SFXTYPES_HXX diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx index bf892ee01edc..2f5e8b1bb6cc 100644 --- a/sfx2/source/inc/virtmenu.hxx +++ b/sfx2/source/inc/virtmenu.hxx @@ -89,7 +89,6 @@ public: void SetItemText( sal_uInt16 nItemId, const OUString& rText ); Menu* GetSVMenu() const { return pSVMenu;} - SfxMenuControl& operator[]( sal_uInt16 nPos ) const; void SetPopupMenu( sal_uInt16 nId, PopupMenu *pMenu ); void InitPopup(sal_uInt16 nPos, bool bOLE = true); @@ -100,12 +99,6 @@ public: -inline SfxMenuControl& SfxVirtualMenu::operator[]( sal_uInt16 nPos ) const -{ - return *(pItems+nPos); -} - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit