diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-20 21:57:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-22 09:39:15 +0100 |
commit | af6752b88e34df05449a4237d9be0fac509c227c (patch) | |
tree | 39eb9c3f30cfa12bba0546db5d643512323c9084 /sfx2 | |
parent | b2d7ede98716806cc4b3ea8547247175d5f04d18 (diff) |
callcatcher: remove unused methods
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/dispatch.hxx | 9 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 206 |
2 files changed, 0 insertions, 215 deletions
diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx index b54d2f4c0d4d..9a0b4f96e62f 100644 --- a/sfx2/inc/sfx2/dispatch.hxx +++ b/sfx2/inc/sfx2/dispatch.hxx @@ -137,7 +137,6 @@ friend class SfxHelp; sal_Bool _FindServer( sal_uInt16 nId, SfxSlotServer &rServer, sal_Bool bModal ); sal_Bool _FillState( const SfxSlotServer &rServer, SfxItemSet &rState, const SfxSlot *pRealSlot ); - const SfxPoolItem* _Execute( const SfxSlotServer &rServer ); void _Execute( SfxShell &rShell, const SfxSlot &rSlot, SfxRequest &rReq, SfxCallMode eCall = SFX_CALLMODE_STANDARD); @@ -156,7 +155,6 @@ public: virtual ~SfxDispatcher(); - const SfxPoolItem* Execute( const SfxExecuteItem& rItem ); virtual sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs=0, sal_uInt16 nMode=0 ); sal_uInt16 ExecuteFunction( sal_uInt16 nSID, const SfxItemSet& rArgs , sal_uInt16 nMode=0 ); @@ -187,7 +185,6 @@ public: sal_uInt16 nModi, const SfxItemSet &rArgs ); - sal_uInt16 GetSlotId( const String& rCommand ); const SfxSlot* GetSlot( const String& rCommand ); sal_Bool IsActive( const SfxShell& rShell ); @@ -208,9 +205,6 @@ public: Window *pWin = 0, const Point *pPosPixel = 0 ); static void ExecutePopup( sal_uInt16 nConfigId = 0, Window *pWin = 0, const Point *pPosPixel = 0 ); - static void ExecutePopup( sal_uInt16 nConfigId, - Window *pWin, const Point *pPosPixel, - const SfxPoolItem *pArg1, ... ); sal_Bool IsAppDispatcher() const; sal_Bool IsFlushed() const; @@ -232,11 +226,9 @@ public: void SetDisableFlags( sal_uInt32 nFlags ); sal_uInt32 GetDisableFlags() const; - SAL_DLLPRIVATE sal_Bool HasSlot_Impl( sal_uInt16 ); SAL_DLLPRIVATE void SetMenu_Impl(); SAL_DLLPRIVATE void Update_Impl( sal_Bool bForce = sal_False ); // ObjectBars etc. SAL_DLLPRIVATE sal_Bool IsUpdated_Impl() const; - SAL_DLLPRIVATE void DebugOutput_Impl() const; SAL_DLLPRIVATE int GetShellAndSlot_Impl( sal_uInt16 nSlot, SfxShell **ppShell, const SfxSlot **ppSlot, sal_Bool bOwnShellsOnly, sal_Bool bModal, sal_Bool bRealSlot=sal_True ); SAL_DLLPRIVATE void LockUI_Impl( sal_Bool bLock = sal_True ); @@ -244,7 +236,6 @@ public: SAL_DLLPRIVATE sal_Bool GetReadOnly_Impl() const; SAL_DLLPRIVATE sal_Bool IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const; SAL_DLLPRIVATE void SetQuietMode_Impl( sal_Bool bOn ); - SAL_DLLPRIVATE void SetModalMode_Impl( sal_Bool bOn ); SAL_DLLPRIVATE sal_Bool IsReadOnlyShell_Impl( sal_uInt16 nShell ) const; SAL_DLLPRIVATE void RemoveShell_Impl( SfxShell& rShell ); SAL_DLLPRIVATE void DoParentActivate_Impl(); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 1bd4c1373ec1..ef669db60e60 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1121,14 +1121,6 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, const SfxItemSet& r return nRet; } -sal_uInt16 SfxDispatcher::GetSlotId( const String& rCommand ) -{ - const SfxSlot *pSlot = GetSlot( rCommand ); - if ( pSlot ) - return pSlot->GetSlotId(); - return 0; -} - const SfxSlot* SfxDispatcher::GetSlot( const String& rCommand ) { // Count the number of Shells on the linked Dispatcher @@ -1210,21 +1202,6 @@ SfxExecuteItem::SfxExecuteItem( } //-------------------------------------------------------------------- -const SfxPoolItem* SfxDispatcher::Execute( const SfxExecuteItem& rItem ) -{ - const SfxPoolItem** pPtr = new const SfxPoolItem*[ rItem.Count() + 1 ]; - for( sal_uInt16 nPos = rItem.Count(); nPos--; ) - pPtr[ nPos ] = rItem.GetObject( nPos ); - pPtr[ rItem.Count() ] = 0; - const SfxPoolItem* pRet = Execute( - rItem.GetSlot(), rItem.GetCallMode(), pPtr, rItem.GetModifier() ); - - delete [] (SfxPoolItem**)pPtr; - - return pRet; -} - -//-------------------------------------------------------------------- const SfxPoolItem* SfxDispatcher::Execute( sal_uInt16 nSlot, SfxCallMode nCall, @@ -2287,94 +2264,6 @@ sal_Bool SfxDispatcher::_FindServer return sal_False; } -sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot ) -{ - Flush(); - sal_uInt16 nTotCount = pImp->aStack.Count(); - - if ( pImp->pParent && !pImp->pParent->pImp->pFrame ) - { - // the last frame also uses the AppDispatcher - nTotCount = nTotCount + pImp->aStack.Count(); - } - - if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END) - { - // Verb-Slot? - for ( sal_uInt16 nShell = 0;; ++nShell ) - { - SfxShell *pSh = GetShell(nShell); - if ( pSh == NULL ) - return false; - if ( pSh->ISA(SfxViewShell) ) - return true; - } - } - - // SID check against set filter - sal_uInt16 nSlotEnableMode=0; - if ( pImp->pFrame ) - { - nSlotEnableMode = IsSlotEnabledByFilter_Impl( nSlot ); - if ( 0 == nSlotEnableMode ) - return sal_False; - } - - // In Quiet-Mode only Parent-Dispatcher - if ( pImp->bQuiet ) - return sal_False; - - sal_Bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly ); - - for ( sal_uInt16 i=0 ; i < nTotCount; ++i ) - { - SfxShell *pObjShell = GetShell(i); - SfxInterface *pIFace = pObjShell->GetInterface(); - const SfxSlot *pSlot = pIFace->GetSlot(nSlot); - if ( pSlot && pSlot->nDisableFlags && ( pSlot->nDisableFlags & pObjShell->GetDisableFlags() ) != 0 ) - return sal_False; - - if ( pSlot && !( pSlot->nFlags & SFX_SLOT_READONLYDOC ) && bReadOnly ) - return sal_False; - - if ( pSlot ) - { - // Slot belongs to Container? - bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER); - bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); - - // Shell belongs to Server? - // AppDispatcher or IPFrame-Dispatcher - bool bIsServerShell = !pImp->pFrame || bIsInPlace; - - // Of course ShellServer-Slots are also executable even when it is - // excecuted on a container dispatcher without a IPClient - if ( !bIsServerShell ) - { - SfxViewShell *pViewSh = pImp->pFrame->GetViewShell(); - bIsServerShell = !pViewSh || !pViewSh->GetUIActiveClient(); - } - - // Shell belongs to Container? - // AppDispatcher or no IPFrameDispatcher - bool bIsContainerShell = !pImp->pFrame || !bIsInPlace; - - // Shell and Slot match - if ( !( ( bIsContainerSlot && bIsContainerShell ) || - ( !bIsContainerSlot && bIsServerShell ) ) ) - pSlot = 0; - } - - if ( pSlot && !IsAllowed( nSlot ) ) - pSlot = NULL; - - if ( pSlot ) - return sal_True; - } - - return sal_False; -} - //-------------------------------------------------------------------- sal_Bool SfxDispatcher::_FillState ( @@ -2459,61 +2348,6 @@ sal_Bool SfxDispatcher::_FillState return sal_False; } -//-------------------------------------------------------------------- -const SfxPoolItem* SfxDispatcher::_Execute( const SfxSlotServer &rSvr ) - -/* [Description] - - This method performs a request for a cached <Slot-Server>. -*/ - -{ - const SfxSlot *pSlot = rSvr.GetSlot(); - if ( IsLocked( pSlot->GetSlotId() ) ) - return 0; - - if ( pSlot ) - { - Flush(); - - if ( pSlot->IsMode(SFX_SLOT_ASYNCHRON) ) - //! ignore rSvr - { - SfxShell *pShell = GetShell( rSvr.GetShellLevel() ); - SfxDispatcher *pDispat = this; - while ( pDispat ) - { - sal_uInt16 nShellCount = pDispat->pImp->aStack.Count(); - for ( sal_uInt16 n=0; n<nShellCount; n++ ) - if ( pShell == pDispat->pImp->aStack.Top(n) ) - { - pDispat->pImp->xPoster->Post( - new SfxRequest( pSlot->GetSlotId(), - SFX_CALLMODE_RECORD, pShell->GetPool() ) ); - return 0; - } - } - } - else - { - // Determine the object and call the Message of this object - SfxShell *pSh = GetShell(rSvr.GetShellLevel()); - SfxRequest aReq( pSlot->GetSlotId(), SFX_CALLMODE_RECORD, pSh->GetPool() ); - if ( Call_Impl( *pSh, *pSlot, aReq, sal_True ) ) // Bindings always recording - return aReq.GetReturnValue(); - } - } - return 0; -} - -//---------------------------------------------------------------------- -void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, - Window *pWin, const Point *pPos, - const SfxPoolItem *, ... ) -{ - ExecutePopup( nConfigId, pWin, pPos ); -} - SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId,Window *pWin, const Point *pPos ) { SfxDispatcher &rDisp = *SFX_APP()->GetDispatcher_Impl(); @@ -2608,31 +2442,6 @@ sal_uInt32 SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const return pImp->aObjBars[nPos].nResId; } -//-------------------------------------------------------------------- -void SfxDispatcher::DebugOutput_Impl() const -{ -#ifdef DBG_UTIL - - sal_uInt16 nOld = (sal_uInt16) DbgGetData()->nTraceOut; - DbgGetData()->nTraceOut = DBG_OUT_FILE; - - if (bFlushed) - OSL_TRACE("Flushed"); - if (pImp->bUpdated) - OSL_TRACE("updated"); - - for ( sal_uInt16 nShell = pImp->aStack.Count(); nShell > 0; --nShell ) - { - SfxShell *pShell = GetShell(nShell-1); - const SfxInterface *pIFace = pShell->GetInterface(); - OSL_TRACE("%s", pIFace->GetClassName()); - } - - DbgGetData()->nTraceOut = nOld; - -#endif -} - void SfxDispatcher::LockUI_Impl( sal_Bool bLock ) { sal_Bool bWasLocked = pImp->bUILocked; @@ -2697,21 +2506,6 @@ void SfxDispatcher::SetQuietMode_Impl( sal_Bool bOn ) pBindings->InvalidateAll(sal_True); } -//------------------------------------------------------------------------- -void SfxDispatcher::SetModalMode_Impl( sal_Bool bOn ) - -/* [Description] - - With 'Bon' only slots of the parent dispatcher are found. -*/ - -{ - pImp->bModal = bOn; - SfxBindings* pBindings = GetBindings(); - if ( pBindings ) - pBindings->InvalidateAll(sal_True); -} - void SfxDispatcher::SetExecuteMode( sal_uInt16 nMode ) { pImp->nStandardMode = nMode; |