From a1ce4fb4f0dbc3c4141f510e5b2b732a24d862c8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 6 Sep 2011 08:46:33 +0100 Subject: callcatcher: various unused methods --- sfx2/inc/sfx2/app.hxx | 7 +++--- sfx2/inc/sfx2/fcontnr.hxx | 3 --- sfx2/source/appl/app.cxx | 21 ---------------- sfx2/source/appl/appdata.cxx | 53 ++++++++++++++++++++--------------------- sfx2/source/appl/appdde.cxx | 47 +++++++++++++++++++++++++++++++----- sfx2/source/bastyp/fltfnc.cxx | 3 --- sfx2/source/bastyp/helper.cxx | 33 ------------------------- sfx2/source/bastyp/progress.cxx | 3 --- sfx2/source/inc/appdata.hxx | 1 - sfx2/source/inc/helper.hxx | 2 -- 10 files changed, 71 insertions(+), 102 deletions(-) (limited to 'sfx2') diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx index c11627bbe7d5..87c32f5a3c9d 100644 --- a/sfx2/inc/sfx2/app.hxx +++ b/sfx2/inc/sfx2/app.hxx @@ -166,11 +166,15 @@ public: static ResMgr* CreateResManager( const char *pPrefix ); // DDE +#if defined( WNT ) long DdeExecute( const String& rCmd ); +#endif sal_Bool InitializeDde(); const DdeService* GetDdeService() const; DdeService* GetDdeService(); +#if defined( WNT ) void AddDdeTopic( SfxObjectShell* ); +#endif void RemoveDdeTopic( SfxObjectShell* ); // "static" methods @@ -261,9 +265,6 @@ public: SAL_DLLPRIVATE const String& GetLastDir_Impl() const; SAL_DLLPRIVATE void SetLastDir_Impl( const String & ); - SAL_DLLPRIVATE void EnterAsynchronCall_Impl(); - SAL_DLLPRIVATE bool IsInAsynchronCall_Impl() const; - SAL_DLLPRIVATE void LeaveAsynchronCall_Impl(); SAL_DLLPRIVATE void Registrations_Impl(); SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl(const SfxViewFrame *pFrame=0) const; diff --git a/sfx2/inc/sfx2/fcontnr.hxx b/sfx2/inc/sfx2/fcontnr.hxx index 513846614d4c..a6187a677741 100644 --- a/sfx2/inc/sfx2/fcontnr.hxx +++ b/sfx2/inc/sfx2/fcontnr.hxx @@ -109,12 +109,9 @@ public: const String GetName() const; const SfxFilter* GetAnyFilter( SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; - const SfxFilter* GetFilter4Mime( const String& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; - const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4EA( const String& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4Extension( const String& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4FilterName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; - const SfxFilter* GetFilter4UIName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; SAL_DLLPRIVATE static void ReadFilters_Impl( sal_Bool bUpdate=sal_False ); SAL_DLLPRIVATE static void ReadSingleFilter_Impl( const ::rtl::OUString& rName, diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index f5be7bd92e0e..49b825cf33a3 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -552,27 +552,6 @@ void SfxApplication::ReleaseIndex(sal_uInt16 i) //-------------------------------------------------------------------- -void SfxApplication::EnterAsynchronCall_Impl() -{ - ++pAppData_Impl->nAsynchronCalls; -} - -//-------------------------------------------------------------------- - -void SfxApplication::LeaveAsynchronCall_Impl() -{ - --pAppData_Impl->nAsynchronCalls; -} - -//-------------------------------------------------------------------- - -bool SfxApplication::IsInAsynchronCall_Impl() const -{ - return pAppData_Impl->nAsynchronCalls > 0; -} - -//-------------------------------------------------------------------- - Window* SfxApplication::GetTopWindow() const { SfxWorkWindow* pWork = GetWorkWindow_Impl( SfxViewFrame::Current() ); diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index 81fabb9c9f31..0c461468539a 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -88,33 +88,32 @@ void SfxBasicManagerCreationListener::onBasicManagerCreated( const Reference< XM m_rAppData.OnApplicationBasicManagerCreated( _rBasicManager ); } -SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) : - pDdeService( 0 ), - pDocTopics( 0 ), - pTriggerTopic(0), - pDdeService2(0), - pFactArr(0), - pTopFrames( new SfxFrameArr_Impl ), - pInitLinkList(0), - pMatcher( 0 ), - pBasicResMgr( 0 ), - pSvtResMgr( 0 ), - pAppDispatch(NULL), - pTemplates( 0 ), - pPool(0), - pDisabledSlotList( 0 ), - pSecureURLs(0), - pSaveOptions( 0 ), - pUndoOptions( 0 ), - pHelpOptions( 0 ), - pProgress(0), - pTemplateCommon( 0 ), - nDocModalMode(0), - nAutoTabPageId(0), - nRescheduleLocks(0), - nInReschedule(0), - nAsynchronCalls(0), - m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessServiceFactory())) +SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) + : pDdeService( 0 ) + , pDocTopics( 0 ) + , pTriggerTopic(0) + , pDdeService2(0) + , pFactArr(0) + , pTopFrames( new SfxFrameArr_Impl ) + , pInitLinkList(0) + , pMatcher( 0 ) + , pBasicResMgr( 0 ) + , pSvtResMgr( 0 ) + , pAppDispatch(NULL) + , pTemplates( 0 ) + , pPool(0) + , pDisabledSlotList( 0 ) + , pSecureURLs(0) + , pSaveOptions( 0 ) + , pUndoOptions( 0 ) + , pHelpOptions( 0 ) + , pProgress(0) + , pTemplateCommon( 0 ) + , nDocModalMode(0) + , nAutoTabPageId(0) + , nRescheduleLocks(0) + , nInReschedule(0) + , m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessServiceFactory())) , pTbxCtrlFac(0) , pStbCtrlFac(0) , pViewFrames(0) diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index 04f99efaabb0..5dbbdd007e33 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -53,6 +53,7 @@ #include "helper.hxx" #include #include +#include //======================================================================== @@ -85,6 +86,41 @@ public: }; //-------------------------------------------------------------------- +namespace +{ + sal_Bool lcl_IsDocument( const String& rContent ) + { + using namespace com::sun::star; + + sal_Bool bRet = sal_False; + INetURLObject aObj( rContent ); + DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); + + try + { + ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () ); + bRet = aCnt.isDocument(); + } + catch( const ucb::CommandAbortedException& ) + { + DBG_WARNING( "CommandAbortedException" ); + } + catch( const ucb::IllegalIdentifierException& ) + { + DBG_WARNING( "IllegalIdentifierException" ); + } + catch( const ucb::ContentCreationException& ) + { + DBG_WARNING( "IllegalIdentifierException" ); + } + catch( const uno::Exception& ) + { + DBG_ERRORFILE( "Any other exception" ); + } + + return bRet; + } +} sal_Bool ImplDdeService::MakeTopic( const String& rNm ) { @@ -119,7 +155,7 @@ sal_Bool ImplDdeService::MakeTopic( const String& rNm ) INetURLObject aWorkPath( SvtPathOptions().GetWorkPath() ); INetURLObject aFile; if ( aWorkPath.GetNewAbsURL( rNm, &aFile ) && - SfxContentHelper::IsDocument( aFile.GetMainURL( INetURLObject::NO_DECODE ) ) ) + lcl_IsDocument( aFile.GetMainURL( INetURLObject::NO_DECODE ) ) ) { // File exists? then try to load it: SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -172,7 +208,6 @@ sal_Bool ImplDdeService::SysTopicExecute( const String* pStr ) { return (sal_Bool)SFX_APP()->DdeExecute( *pStr ); } - #endif class SfxDdeTriggerTopic_Impl : public DdeTopic @@ -254,8 +289,7 @@ sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent, return sal_False; } -//------------------------------------------------------------------------- - +#if defined( WNT ) long SfxApplication::DdeExecute ( const String& rCmd // Expressed in our BASIC-Syntax @@ -291,6 +325,7 @@ long SfxApplication::DdeExecute } return 1; } +#endif long SfxObjectShell::DdeExecute ( @@ -521,8 +556,7 @@ void SfxAppData_Impl::DeInitDDE() DELETEZ( pDdeService ); } -//-------------------------------------------------------------------- - +#if defined( WNT ) void SfxApplication::AddDdeTopic( SfxObjectShell* pSh ) { DBG_ASSERT( pAppData_Impl->pDocTopics, "There is no Dde-Service" ); @@ -552,6 +586,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh ) pAppData_Impl->pDocTopics->Count() ); pAppData_Impl->pDdeService->AddTopic( *pTopic ); } +#endif void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh ) { diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 0b500f10e6bc..63add660c327 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -167,12 +167,9 @@ const SfxFilter* SfxFilterContainer::aMethod( ArgType aArg, SfxFilterFlags nMust return aMatch.aMethod( aArg, nMust, nDont ); \ } -IMPL_FORWARD_LOOP( GetFilter4Mime, const String&, rMime ); -IMPL_FORWARD_LOOP( GetFilter4ClipBoardId, sal_uInt32, nId ); IMPL_FORWARD_LOOP( GetFilter4EA, const String&, rEA ); IMPL_FORWARD_LOOP( GetFilter4Extension, const String&, rExt ); IMPL_FORWARD_LOOP( GetFilter4FilterName, const String&, rName ); -IMPL_FORWARD_LOOP( GetFilter4UIName, const String&, rName ); const SfxFilter* SfxFilterContainer::GetAnyFilter( SfxFilterFlags nMust, SfxFilterFlags nDont ) const { diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index e00fbda6c374..ba762ffe7b47 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -88,39 +88,6 @@ void AppendDateTime_Impl( const util::DateTime rDT, // ----------------------------------------------------------------------- -sal_Bool SfxContentHelper::IsDocument( const String& rContent ) -{ - sal_Bool bRet = sal_False; - INetURLObject aObj( rContent ); - DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); - - try - { - ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () ); - bRet = aCnt.isDocument(); - } - catch( const ucb::CommandAbortedException& ) - { - DBG_WARNING( "CommandAbortedException" ); - } - catch( const ucb::IllegalIdentifierException& ) - { - DBG_WARNING( "IllegalIdentifierException" ); - } - catch( const ucb::ContentCreationException& ) - { - DBG_WARNING( "IllegalIdentifierException" ); - } - catch( const uno::Exception& ) - { - DBG_ERRORFILE( "Any other exception" ); - } - - return bRet; -} - -// ----------------------------------------------------------------------- - uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL ) { StringList_Impl* pList = NULL; diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 2ea27dc1de01..c1768d1c4cc1 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -529,9 +529,6 @@ void SfxProgress::Reschedule() SfxApplication* pApp = SFX_APP(); if ( pImp->bLocked && 0 == pApp->Get_Impl()->nRescheduleLocks ) { - DBG_ASSERTWARNING( pApp->IsInAsynchronCall_Impl(), - "Reschedule in synchron-call-stack" ); - SfxAppData_Impl *pAppData = pApp->Get_Impl(); ++pAppData->nInReschedule; Application::Reschedule(); diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index 5e31a7b537a6..b807f5cd21a7 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -138,7 +138,6 @@ public: sal_uInt16 nAutoTabPageId; sal_uInt16 nRescheduleLocks; sal_uInt16 nInReschedule; - sal_uInt16 nAsynchronCalls; rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow; diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx index 36b8ee9e3d46..85a3b2732d35 100644 --- a/sfx2/source/inc/helper.hxx +++ b/sfx2/source/inc/helper.hxx @@ -42,8 +42,6 @@ class SfxContentHelper { public: - static sal_Bool IsDocument( const String& rContent ); - static ::com::sun::star::uno::Sequence< ::rtl::OUString > GetResultSet( const String& rURL ); static ::com::sun::star::uno::Sequence< ::rtl::OUString > -- cgit