From a45827b2308febc7369db27fb489a6d1389534e1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Jul 2015 08:39:57 +0200 Subject: loplugin:unusedmethods Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971 Reviewed-on: https://gerrit.libreoffice.org/17378 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/inc/classes/filtercachedata.hxx | 63 ---------------------- framework/inc/classes/wildcard.hxx | 14 ----- framework/inc/protocols.h | 42 --------------- framework/inc/queries.h | 11 ---- .../inc/uielement/spinfieldtoolbarcontroller.hxx | 2 - framework/inc/uielement/uicommanddescription.hxx | 6 +-- framework/source/inc/pattern/window.hxx | 50 ----------------- .../source/uiconfiguration/imagemanagerimpl.cxx | 11 ---- .../source/uiconfiguration/imagemanagerimpl.hxx | 8 ++- .../uiconfiguration/uicategorydescription.cxx | 6 --- .../uielement/spinfieldtoolbarcontroller.cxx | 5 -- .../source/uielement/uicommanddescription.cxx | 4 -- 12 files changed, 6 insertions(+), 216 deletions(-) (limited to 'framework') diff --git a/framework/inc/classes/filtercachedata.hxx b/framework/inc/classes/filtercachedata.hxx index 538f683e946c..395b89d53673 100644 --- a/framework/inc/classes/filtercachedata.hxx +++ b/framework/inc/classes/filtercachedata.hxx @@ -400,49 +400,6 @@ class DataContainer DataContainer(); - static void convertFileTypeToPropertySequence ( const FileType& aSource , - css::uno::Sequence< css::beans::PropertyValue >& lDestination , - const OUString& sCurrentLocale ); - static void convertFilterToPropertySequence ( const Filter& aSource , - css::uno::Sequence< css::beans::PropertyValue >& lDestination , - const OUString& sCurrentLocale ); - static void convertDetectorToPropertySequence ( const Detector& aSource , - css::uno::Sequence< css::beans::PropertyValue >& lDestination ); - static void convertLoaderToPropertySequence ( const Loader& aSource , - css::uno::Sequence< css::beans::PropertyValue >& lDestination , - const OUString& sCurrentLocale ); - static void convertContentHandlerToPropertySequence ( const ContentHandler& aSource , - css::uno::Sequence< css::beans::PropertyValue >& lDestination ); - static void convertPropertySequenceToFilter ( const css::uno::Sequence< css::beans::PropertyValue >& lSource , - Filter& aDestination , - const OUString& sCurrentLocale ); - static void convertPropertySequenceToFileType ( const css::uno::Sequence< css::beans::PropertyValue >& lSource , - FileType& aDestination , - const OUString& sCurrentLocale ); - static void convertPropertySequenceToDetector ( const css::uno::Sequence< css::beans::PropertyValue >& lSource , - Detector& aDestination ); - static void convertPropertySequenceToLoader ( const css::uno::Sequence< css::beans::PropertyValue >& lSource , - Loader& aDestination , - const OUString& sCurrentLocale ); - static void convertPropertySequenceToContentHandler ( const css::uno::Sequence< css::beans::PropertyValue >& lSource , - ContentHandler& aDestination , - const OUString& sCurrentLocale ); - static void extractLocalizedStrings ( const OUString& sCurrentLocale , - const css::uno::Any& aCFGValue , - OUStringHashMap& lLocales ); - static void packLocalizedStrings ( sal_Int16 nMode , - const OUString& sCurrentLocale , - css::uno::Any& aCFGValue , - const OUStringHashMap& lLocales ); - static OUString getLocalelizedString ( const OUStringHashMap& lLocales , - const OUString& sLocale ); - static void setLocalelizedString ( OUStringHashMap& lLocales , - const OUString& sLocale , - const OUString& sValue ); - static void correctExtensions ( OUStringList& lExtensions ); - - public: - FileTypeHash m_aTypeCache; /// hold all information about registered file types FilterHash m_aFilterCache; /// hold all information about registered filters DetectorHash m_aDetectorCache; /// hold all information about registered detect services @@ -485,26 +442,6 @@ class FilterCFGAccess : public ::utl::ConfigItem ConfigItemMode nMode = DEFAULT_FILTERCACHE_MODE ); // open configuration virtual ~FilterCFGAccess( ); - static OUString encodeTypeData ( const FileType& aType ); // build own formatted string of type properties - static void decodeTypeData ( const OUString& sData , - FileType& aType ); - static OUString encodeFilterData( const Filter& aFilter ); // build own formatted string of filter properties - static void decodeFilterData( const OUString& sData , - Filter& aFilter ); - static OUString encodeStringList( const OUStringList& lList ); // build own formatted string of OUStringList - static OUStringList decodeStringList( const OUString& sValue ); - - private: - - // debug checks - - private: - static bool implcp_ctor ( const OUString& sPath , // methods to check incoming parameter on our interface methods! - sal_Int32 nVersion , - sal_Int16 nMode ); - static bool implcp_read ( const DataContainer& rData ); - static bool implcp_write( const DataContainer& rData ); - // member private: diff --git a/framework/inc/classes/wildcard.hxx b/framework/inc/classes/wildcard.hxx index c2bef274b3ab..e9ced168099a 100644 --- a/framework/inc/classes/wildcard.hxx +++ b/framework/inc/classes/wildcard.hxx @@ -56,20 +56,6 @@ class Wildcard virtual ~Wildcard(); - // interface - - /*-**************************************************************************************************** - @short try to find an agreement between given text and searchpattern - @descr You can use wildcards in pattern only! - @param "sText" is the text, in which we search given pattern. - @param "sPattern" is the searched pattern with includes wildcards. - @return true , if pattern was found. - @return false, if pattern don't match the text. - *//*-*****************************************************************************************************/ - - static bool match( const OUString& sText , - const OUString& sPattern ); - }; // class Wildcard } // namespace framework diff --git a/framework/inc/protocols.h b/framework/inc/protocols.h index 9857388e9118..fafba56637ce 100644 --- a/framework/inc/protocols.h +++ b/framework/inc/protocols.h @@ -75,48 +75,6 @@ class ProtocolCheck E_NEWS }; - /** - it checks, if the given URL string match one of the well known protocols. - It returns the right enum value. - Protocols are defined above ... - */ - static EProtocol specifyProtocol( const OUString& sURL ) - { - // because "private:" is part of e.g. "private:object" too ... - // we must check it before all other ones!!! - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE))) - return E_PRIVATE; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_OBJECT))) - return E_PRIVATE_OBJECT; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_STREAM))) - return E_PRIVATE_STREAM; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_FACTORY))) - return E_PRIVATE_FACTORY; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SLOT))) - return E_SLOT; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_UNO))) - return E_UNO; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MACRO))) - return E_MACRO; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SERVICE))) - return E_SERVICE; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MAILTO))) - return E_MAILTO; - else - if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_NEWS))) - return E_NEWS; - else - return E_UNKNOWN_PROTOCOL; - } - /** it checks if given URL match the required protocol only It should be used instead of specifyProtocol() if only this question diff --git a/framework/inc/queries.h b/framework/inc/queries.h index 1ce67f9abc96..be733cbb1c69 100644 --- a/framework/inc/queries.h +++ b/framework/inc/queries.h @@ -283,17 +283,6 @@ class QueryAnalyzer } } - // this method checks if given string match any supported query. - // (ignore additional parameters!) - - static bool isQuery( const OUString& sQuery ) - { - return( - sQuery.startsWith("_query_") || // new style - sQuery.startsWith("_filterquery_") // old style! - ); - } - private: EQuery m_eQuery; sal_uInt32 m_nIFlags; diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx index 7d9a8e86eec7..b2f5efe2339e 100644 --- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx +++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx @@ -45,7 +45,6 @@ class ISpinfieldListener virtual void KeyInput( const KeyEvent& rKEvt ) = 0; virtual void Modify() = 0; virtual void GetFocus() = 0; - virtual void LoseFocus() = 0; virtual void StateChanged( StateChangedType nType ) = 0; virtual void DataChanged( const DataChangedEvent& rDCEvt ) = 0; virtual bool PreNotify( NotifyEvent& rNEvt ) = 0; @@ -78,7 +77,6 @@ class SpinfieldToolbarController : public ISpinfieldListener, virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void Modify() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; - virtual void LoseFocus() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index c00507ba8a09..00fe3fcaba7f 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -94,10 +94,10 @@ public: protected: UICommandDescription( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& rxContext, bool ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > impl_createConfigAccess(const OUString& _sName); void impl_fillElements(const sal_Char* _pName); - bool m_bConfigRead; - OUString m_aPrivateResourceURL; + + bool m_bConfigRead; + OUString m_aPrivateResourceURL; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; ModuleToCommandFileMap m_aModuleToCommandFileMap; UICommandsHashMap m_aUICommandsHashMap; diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx index 8779aa28476c..9e93ae342398 100644 --- a/framework/source/inc/pattern/window.hxx +++ b/framework/source/inc/pattern/window.hxx @@ -41,59 +41,9 @@ class WindowHelper { public: -static OUString getWindowState(const css::uno::Reference< css::awt::XWindow >& xWindow) -{ - if (!xWindow.is()) - return OUString(); - - OString sWindowState; - // SOLAR SAFE -> ---------------------------- - { - SolarMutexGuard aSolarGuard; - vcl::Window* pWindow = VCLUnoHelper::GetWindow(xWindow); - // check for system window is necessary to guarantee correct pointer cast! - if (pWindow!=NULL && pWindow->IsSystemWindow()) - { - sal_uLong nMask = WINDOWSTATE_MASK_ALL; - nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); - sWindowState = static_cast(pWindow)->GetWindowState(nMask); - } - } - // <- SOLAR SAFE ---------------------------- - return OStringToOUString(sWindowState,RTL_TEXTENCODING_UTF8); -} -static void setWindowState(const css::uno::Reference< css::awt::XWindow >& xWindow , - const OUString& sWindowState) -{ - if ( - (!xWindow.is() ) || - (!sWindowState.getLength()) - ) - return; - - // SOLAR SAFE -> ---------------------------- - SolarMutexGuard aSolarGuard; - - vcl::Window* pWindow = VCLUnoHelper::GetWindow(xWindow); - // check for system window is necessary to guarantee correct pointer cast! - if ( - (pWindow ) && - (pWindow->IsSystemWindow()) && - ( - // dont overwrite a might existing minimized mode! - (pWindow->GetType() != WINDOW_WORKWINDOW) || - (!static_cast(pWindow)->IsMinimized() ) - ) - ) - { - static_cast(pWindow)->SetWindowState(OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8)); - } - - // <- SOLAR SAFE ---------------------------- -} static bool isTopWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) { diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 91ceb5c67a60..f102b87d7618 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -298,11 +298,6 @@ bool CmdImageList::hasImage( sal_Int16 /*nImageType*/, const OUString& rCommandU return false; } -::std::vector< OUString >& CmdImageList::getImageNames() -{ - return impl_getImageNameVector(); -} - ::std::vector< OUString >& CmdImageList::getImageCommandNames() { return impl_getImageCommandNameVector(); @@ -332,12 +327,6 @@ bool GlobalImageList::hasImage( sal_Int16 nImageType, const OUString& rCommandUR return CmdImageList::hasImage( nImageType, rCommandURL ); } -::std::vector< OUString >& GlobalImageList::getImageNames() -{ - osl::MutexGuard guard( getGlobalImageListMutex() ); - return impl_getImageNameVector(); -} - ::std::vector< OUString >& GlobalImageList::getImageCommandNames() { osl::MutexGuard guard( getGlobalImageListMutex() ); diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx b/framework/source/uiconfiguration/imagemanagerimpl.hxx index 9b5ee93daa49..a72e8274bb43 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.hxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx @@ -61,14 +61,13 @@ namespace framework virtual Image getImageFromCommandURL( sal_Int16 nImageType, const OUString& rCommandURL ); virtual bool hasImage( sal_Int16 nImageType, const OUString& rCommandURL ); - virtual ::std::vector< OUString >& getImageNames(); - virtual ::std::vector< OUString >& getImageCommandNames(); + virtual ::std::vector< OUString >& getImageCommandNames(); protected: void impl_fillCommandToImageNameMap(); ImageList* impl_getImageList( sal_Int16 nImageType ); - std::vector< OUString >& impl_getImageNameVector() { return m_aImageNameVector;} - std::vector< OUString >& impl_getImageCommandNameVector() { return m_aImageCommandNameVector;} + std::vector< OUString >& impl_getImageNameVector() { return m_aImageNameVector;} + std::vector< OUString >& impl_getImageCommandNameVector() { return m_aImageCommandNameVector;} private: bool m_bVectorInit; @@ -89,7 +88,6 @@ namespace framework virtual Image getImageFromCommandURL( sal_Int16 nImageType, const OUString& rCommandURL ) SAL_OVERRIDE; virtual bool hasImage( sal_Int16 nImageType, const OUString& rCommandURL ) SAL_OVERRIDE; - virtual ::std::vector< OUString >& getImageNames() SAL_OVERRIDE; virtual ::std::vector< OUString >& getImageCommandNames() SAL_OVERRIDE; }; diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index 44a1a37a5c43..2985457991f2 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -408,8 +408,6 @@ public: return aSeq; } -private: - virtual css::uno::Reference< css::container::XNameAccess > impl_createConfigAccess(const OUString& _sName) SAL_OVERRIDE; }; UICategoryDescription::UICategoryDescription( const Reference< XComponentContext >& rxContext ) : @@ -433,10 +431,6 @@ UICategoryDescription::UICategoryDescription( const Reference< XComponentContext UICategoryDescription::~UICategoryDescription() { } -Reference< XNameAccess > UICategoryDescription::impl_createConfigAccess(const OUString& _sName) -{ - return new ConfigurationAccess_UICategory( _sName, m_xGenericUICommands, m_xContext ); -} struct Instance { explicit Instance( diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index e9516021b0a1..2381be2351d8 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -297,11 +297,6 @@ void SpinfieldToolbarController::GetFocus() notifyFocusGet(); } -void SpinfieldToolbarController::LoseFocus() -{ - notifyFocusLost(); -} - void SpinfieldToolbarController::StateChanged( StateChangedType /*nType*/ ) { } diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index c021456cbde7..cbf0d61abb84 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -656,10 +656,6 @@ void UICommandDescription::impl_fillElements(const sal_Char* _pName) } } // for ( sal_Int32 i = 0; i < aElementNames.getLength(); i++ ) } -Reference< XNameAccess > UICommandDescription::impl_createConfigAccess(const OUString& _sName) -{ - return new ConfigurationAccess_UICommand( _sName, m_xGenericUICommands, m_xContext ); -} Any SAL_CALL UICommandDescription::getByName( const OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) -- cgit