LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
SfxBindings Class Referencefinal

#include <bindings.hxx>

Inheritance diagram for SfxBindings:
[legend]
Collaboration diagram for SfxBindings:
[legend]

Public Member Functions

 SfxBindings ()
 
virtual ~SfxBindings () override
 
void HidePopups (bool bHide=true)
 
void SetDispatcher (SfxDispatcher *pDisp)
 
void Update (sal_uInt16 nId)
 
void Update ()
 
SAL_DLLPRIVATE void StartUpdate_Impl (bool bComplete=false)
 
void Invalidate (sal_uInt16 nId)
 
void Invalidate (const sal_uInt16 *pIds)
 
void InvalidateShell (const SfxShell &rSh, bool bDeep=false)
 
void InvalidateAll (bool bWithMsg)
 
void SetState (const SfxItemSet &rSet)
 
void SetState (const SfxPoolItem &rItem)
 
void Invalidate (sal_uInt16 nId, bool bWithItem, bool bWithMsg=false)
 
bool IsInUpdate () const
 
void SetVisibleState (sal_uInt16 nId, bool bShow)
 
SfxStateCacheGetStateCache (sal_uInt16 nId)
 
SAL_DLLPRIVATE SfxStateCacheGetAnyStateCache_Impl (sal_uInt16 nId)
 
SfxItemState QueryState (sal_uInt16 nSID, std::unique_ptr< SfxPoolItem > &rpState)
 
template<class T >
SfxItemState QueryState (TypedWhichId< T > nSID, std::unique_ptr< T > &rpState)
 
void QueryControlState (sal_uInt16 nSID, boost::property_tree::ptree &rState)
 
sal_uInt16 QuerySlotId (const css::util::URL &aURL)
 
const SfxPoolItemExecuteSynchron (sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr)
 
bool Execute (sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr, SfxCallMode nCall=SfxCallMode::SLOT)
 
SAL_DLLPRIVATE void SetDispatchProvider_Impl (const css::uno::Reference< css::frame::XDispatchProvider > &rFrame)
 
void SetActiveFrame (const css::uno::Reference< css::frame::XFrame > &rFrame)
 
css::uno::Reference< css::frame::XFrame > GetActiveFrame () const
 
sal_uInt16 EnterRegistrations (std::string_view pFile={}, int nLine=0)
 
void LeaveRegistrations (std::string_view pFile={}, int nLine=0)
 
void Register (SfxControllerItem &rBinding)
 
void Release (SfxControllerItem &rBinding)
 
SfxDispatcherGetDispatcher () const
 
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder () const
 
css::uno::Reference< css::frame::XDispatch > GetDispatch (const SfxSlot *, const css::util::URL &aURL, bool bMasterCommand)
 
SAL_DLLPRIVATE void ContextChanged_Impl ()
 
SAL_DLLPRIVATE void Execute_Impl (SfxRequest &rReq, const SfxSlot *pSlot, SfxShell *pShell)
 
SAL_DLLPRIVATE void DeleteControllers_Impl ()
 
SAL_DLLPRIVATE SfxDispatcherGetDispatcher_Impl ()
 
SAL_DLLPRIVATE void ClearCache_Impl (sal_uInt16 nSlotId)
 
SAL_DLLPRIVATE void RegisterInternal_Impl (SfxControllerItem &rBinding)
 
SAL_DLLPRIVATE void Register_Impl (SfxControllerItem &rBinding, bool)
 
SAL_DLLPRIVATE SfxWorkWindowGetWorkWindow_Impl () const
 
SAL_DLLPRIVATE void SetWorkWindow_Impl (std::unique_ptr< SfxWorkWindow >)
 
SAL_DLLPRIVATE SfxBindingsGetSubBindings_Impl () const
 
SAL_DLLPRIVATE void SetRecorder_Impl (css::uno::Reference< css::frame::XDispatchRecorder > const &)
 
SAL_DLLPRIVATE void InvalidateSlotsInMap_Impl ()
 
SAL_DLLPRIVATE void AddSlotToInvalidateSlotsMap_Impl (sal_uInt16 nId)
 
- Public Member Functions inherited from SfxBroadcaster
 SfxBroadcaster ()
 
 SfxBroadcaster (const SfxBroadcaster &rBC)
 
virtual ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE
 
void Broadcast (const SfxHint &rHint)
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void ForAllListeners (std::function< bool(SfxListener *)> f) const
 

Private Member Functions

SAL_DLLPRIVATE const SfxPoolItemExecute_Impl (sal_uInt16 nSlot, const SfxPoolItem **pArgs, sal_uInt16 nModi, SfxCallMode nCall, const SfxPoolItem **pInternalArgs, bool bGlobalOnly=false)
 
SAL_DLLPRIVATE void SetSubBindings_Impl (SfxBindings *)
 
SAL_DLLPRIVATE void UpdateSlotServer_Impl ()
 
SAL_DLLPRIVATE std::optional< SfxItemSetCreateSet_Impl (SfxStateCache &rCache, const SfxSlot *&pRealSlot, const SfxSlotServer **, SfxFoundCacheArr_Impl &)
 
SAL_DLLPRIVATE std::size_t GetSlotPos (sal_uInt16 nId, std::size_t nStartSearchAt=0)
 
SAL_DLLPRIVATE void Update_Impl (SfxStateCache &rCache)
 
SAL_DLLPRIVATE SfxStateCacheGetStateCache (sal_uInt16 nId, std::size_t *pPos)
 
 DECL_DLLPRIVATE_LINK (NextJob, Timer *, void)
 
SAL_DLLPRIVATE bool NextJob_Impl (Timer const *pTimer)
 

Static Private Member Functions

static SAL_DLLPRIVATE void UpdateControllers_Impl (const SfxFoundCache_Impl &rFound, const SfxPoolItem *pItem, SfxItemState eItemState)
 

Private Attributes

std::unique_ptr< SfxBindings_ImplpImpl
 
SfxDispatcherpDispatcher
 
sal_uInt16 nRegLevel
 

Friends

class SfxApplication
 
class SfxShell
 
class SfxBindings_Impl
 

Additional Inherited Members

- Protected Member Functions inherited from SfxBroadcaster
void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 

Detailed Description

Definition at line 72 of file bindings.hxx.

Constructor & Destructor Documentation

◆ SfxBindings()

SfxBindings::SfxBindings ( )

Definition at line 127 of file bindings.cxx.

References LINK, nRegLevel, and pImpl.

◆ ~SfxBindings()

SfxBindings::~SfxBindings ( )
overridevirtual

Definition at line 153 of file bindings.cxx.

References DeleteControllers_Impl(), ENTERREGISTRATIONS, and pImpl.

Member Function Documentation

◆ AddSlotToInvalidateSlotsMap_Impl()

void SfxBindings::AddSlotToInvalidateSlotsMap_Impl ( sal_uInt16  nId)

Definition at line 295 of file bindings.cxx.

References nId, and pImpl.

Referenced by Invalidate().

◆ ClearCache_Impl()

void SfxBindings::ClearCache_Impl ( sal_uInt16  nSlotId)

Definition at line 1484 of file bindings.cxx.

References SfxStateCache::ClearCache(), and GetStateCache().

Referenced by SfxControllerItem::ClearCache().

◆ ContextChanged_Impl()

void SfxBindings::ContextChanged_Impl ( )

Definition at line 1744 of file bindings.cxx.

References InvalidateAll(), and pImpl.

◆ CreateSet_Impl()

std::optional< SfxItemSet > SfxBindings::CreateSet_Impl ( SfxStateCache rCache,
const SfxSlot *&  pRealSlot,
const SfxSlotServer **  pMsgServer,
SfxFoundCacheArr_Impl rFound 
)
private

◆ DECL_DLLPRIVATE_LINK()

SfxBindings::DECL_DLLPRIVATE_LINK ( NextJob  ,
Timer ,
void   
)
private

References Update.

◆ DeleteControllers_Impl()

void SfxBindings::DeleteControllers_Impl ( )

◆ EnterRegistrations()

sal_uInt16 SfxBindings::EnterRegistrations ( std::string_view  pFile = {},
int  nLine = 0 
)

Definition at line 1313 of file bindings.cxx.

References nRegLevel, pImpl, SAL_INFO, and SAL_STREAM.

◆ Execute()

bool SfxBindings::Execute ( sal_uInt16  nSlot,
const SfxPoolItem **  pArgs = nullptr,
SfxCallMode  nCall = SfxCallMode::SLOT 
)

Definition at line 866 of file bindings.cxx.

References Execute_Impl(), nId, and pDispatcher.

Referenced by SfxViewShell::Escape().

◆ Execute_Impl() [1/2]

const SfxPoolItem * SfxBindings::Execute_Impl ( sal_uInt16  nSlot,
const SfxPoolItem **  pArgs,
sal_uInt16  nModi,
SfxCallMode  nCall,
const SfxPoolItem **  pInternalArgs,
bool  bGlobalOnly = false 
)
private

◆ Execute_Impl() [2/2]

void SfxBindings::Execute_Impl ( SfxRequest rReq,
const SfxSlot pSlot,
SfxShell pShell 
)

◆ ExecuteSynchron()

const SfxPoolItem * SfxBindings::ExecuteSynchron ( sal_uInt16  nSlot,
const SfxPoolItem **  pArgs = nullptr 
)

Definition at line 858 of file bindings.cxx.

References Execute_Impl(), nId, pDispatcher, and SYNCHRON.

Referenced by SfxObjectShell::PrepareClose().

◆ GetActiveFrame()

css::uno::Reference< css::frame::XFrame > SfxBindings::GetActiveFrame ( ) const

◆ GetAnyStateCache_Impl()

SfxStateCache * SfxBindings::GetAnyStateCache_Impl ( sal_uInt16  nId)

Definition at line 457 of file bindings.cxx.

References GetStateCache(), nId, and pImpl.

Referenced by SfxViewFrame::INetExecute_Impl().

◆ GetDispatch()

uno::Reference< frame::XDispatch > SfxBindings::GetDispatch ( const SfxSlot ,
const css::util::URL &  aURL,
bool  bMasterCommand 
)

◆ GetDispatcher()

SfxDispatcher * SfxBindings::GetDispatcher ( ) const
inline

◆ GetDispatcher_Impl()

SAL_DLLPRIVATE SfxDispatcher * SfxBindings::GetDispatcher_Impl ( )
inline

◆ GetRecorder()

const css::uno::Reference< css::frame::XDispatchRecorder > & SfxBindings::GetRecorder ( ) const

◆ GetSlotPos()

std::size_t SfxBindings::GetSlotPos ( sal_uInt16  nId,
std::size_t  nStartSearchAt = 0 
)
private

Definition at line 708 of file bindings.cxx.

References DBG_ASSERT, nId, nPos, and pImpl.

Referenced by DeleteControllers_Impl(), GetStateCache(), Invalidate(), Register_Impl(), and Release().

◆ GetStateCache() [1/2]

SfxStateCache * SfxBindings::GetStateCache ( sal_uInt16  nId)

Definition at line 465 of file bindings.cxx.

References GetStateCache(), and nId.

◆ GetStateCache() [2/2]

SfxStateCache * SfxBindings::GetStateCache ( sal_uInt16  nId,
std::size_t *  pPos 
)
private

◆ GetSubBindings_Impl()

SfxBindings * SfxBindings::GetSubBindings_Impl ( ) const

Definition at line 1673 of file bindings.cxx.

References pImpl.

Referenced by SfxDispatcher::~SfxDispatcher().

◆ GetWorkWindow_Impl()

SfxWorkWindow * SfxBindings::GetWorkWindow_Impl ( ) const

◆ HidePopups()

void SfxBindings::HidePopups ( bool  bHide = true)

◆ Invalidate() [1/3]

void SfxBindings::Invalidate ( const sal_uInt16 *  pIds)

◆ Invalidate() [2/3]

void SfxBindings::Invalidate ( sal_uInt16  nId)

◆ Invalidate() [3/3]

void SfxBindings::Invalidate ( sal_uInt16  nId,
bool  bWithItem,
bool  bWithMsg = false 
)

◆ InvalidateAll()

void SfxBindings::InvalidateAll ( bool  bWithMsg)

◆ InvalidateShell()

void SfxBindings::InvalidateShell ( const SfxShell rSh,
bool  bDeep = false 
)

◆ InvalidateSlotsInMap_Impl()

void SfxBindings::InvalidateSlotsInMap_Impl ( )

Definition at line 286 of file bindings.cxx.

References Invalidate(), and pImpl.

Referenced by Update().

◆ IsInUpdate()

bool SfxBindings::IsInUpdate ( ) const

Definition at line 1688 of file bindings.cxx.

References pImpl.

◆ LeaveRegistrations()

void SfxBindings::LeaveRegistrations ( std::string_view  pFile = {},
int  nLine = 0 
)

◆ NextJob_Impl()

bool SfxBindings::NextJob_Impl ( Timer const *  pTimer)
private

◆ QueryControlState()

void SfxBindings::QueryControlState ( sal_uInt16  nSID,
boost::property_tree::ptree &  rState 
)

◆ QuerySlotId()

sal_uInt16 SfxBindings::QuerySlotId ( const css::util::URL &  aURL)

Definition at line 1641 of file bindings.cxx.

References aURL, SfxOfficeDispatch::GetId(), pImpl, and xDispatch.

◆ QueryState() [1/2]

SfxItemState SfxBindings::QueryState ( sal_uInt16  nSID,
std::unique_ptr< SfxPoolItem > &  rpState 
)

◆ QueryState() [2/2]

template<class T >
SfxItemState SfxBindings::QueryState ( TypedWhichId< T >  nSID,
std::unique_ptr< T > &  rpState 
)
inline

Definition at line 146 of file bindings.hxx.

◆ Register()

void SfxBindings::Register ( SfxControllerItem rBinding)

Definition at line 775 of file bindings.cxx.

References Register_Impl().

Referenced by SfxControllerItem::Bind(), and SfxControllerItem::ReBind().

◆ Register_Impl()

void SfxBindings::Register_Impl ( SfxControllerItem rBinding,
bool  bInternal 
)

◆ RegisterInternal_Impl()

void SfxBindings::RegisterInternal_Impl ( SfxControllerItem rBinding)

Definition at line 769 of file bindings.cxx.

References Register_Impl().

Referenced by SfxControllerItem::BindInternal_Impl().

◆ Release()

void SfxBindings::Release ( SfxControllerItem rBinding)

◆ SetActiveFrame()

void SfxBindings::SetActiveFrame ( const css::uno::Reference< css::frame::XFrame > &  rFrame)

◆ SetDispatcher()

void SfxBindings::SetDispatcher ( SfxDispatcher pDisp)

◆ SetDispatchProvider_Impl()

void SfxBindings::SetDispatchProvider_Impl ( const css::uno::Reference< css::frame::XDispatchProvider > &  rFrame)

Definition at line 1721 of file bindings.cxx.

References InvalidateAll(), and pImpl.

Referenced by SetActiveFrame(), and SetDispatcher().

◆ SetRecorder_Impl()

void SfxBindings::SetRecorder_Impl ( css::uno::Reference< css::frame::XDispatchRecorder > const &  rRecorder)

Definition at line 1739 of file bindings.cxx.

References pImpl.

Referenced by SfxViewFrame::MiscExec_Impl(), and SfxFrame::SetFrameInterface_Impl().

◆ SetState() [1/2]

void SfxBindings::SetState ( const SfxItemSet rSet)

Bug: Use WhichIter and possibly send VoidItems up

Not implemented: Updates from EnumSlots via master slots

Definition at line 382 of file bindings.cxx.

References SfxItemIter::GetCurItem(), SfxItemSet::GetPool(), SfxItemPool::GetSlotId(), GetStateCache(), SfxStateCache::Invalidate(), Invalidate(), SfxStateCache::IsControllerDirty(), SfxItemIter::NextItem(), nRegLevel, pImpl, rSet, SfxStateCache::SetState(), and UpdateSlotServer_Impl().

◆ SetState() [2/2]

void SfxBindings::SetState ( const SfxPoolItem rItem)

◆ SetSubBindings_Impl()

void SfxBindings::SetSubBindings_Impl ( SfxBindings pSub)
private

Definition at line 1658 of file bindings.cxx.

References pImpl.

Referenced by SetDispatcher().

◆ SetVisibleState()

void SfxBindings::SetVisibleState ( sal_uInt16  nId,
bool  bShow 
)

Definition at line 1696 of file bindings.cxx.

References GetStateCache(), nId, and SfxStateCache::SetVisibleState().

◆ SetWorkWindow_Impl()

void SfxBindings::SetWorkWindow_Impl ( std::unique_ptr< SfxWorkWindow xWork)

Definition at line 1678 of file bindings.cxx.

References pImpl.

Referenced by SfxWorkWindow::SfxWorkWindow().

◆ StartUpdate_Impl()

void SfxBindings::StartUpdate_Impl ( bool  bComplete = false)

Definition at line 1493 of file bindings.cxx.

References NextJob_Impl(), and pImpl.

Referenced by IMPL_LINK_NOARG().

◆ Update() [1/2]

void SfxBindings::Update ( )

◆ Update() [2/2]

void SfxBindings::Update ( sal_uInt16  nId)

◆ Update_Impl()

void SfxBindings::Update_Impl ( SfxStateCache rCache)
private

◆ UpdateControllers_Impl()

void SfxBindings::UpdateControllers_Impl ( const SfxFoundCache_Impl rFound,
const SfxPoolItem pItem,
SfxItemState  eItemState 
)
staticprivate

◆ UpdateSlotServer_Impl()

void SfxBindings::UpdateSlotServer_Impl ( )
private

Friends And Related Function Documentation

◆ SfxApplication

friend class SfxApplication
friend

Definition at line 93 of file bindings.hxx.

◆ SfxBindings_Impl

friend class SfxBindings_Impl
friend

Definition at line 95 of file bindings.hxx.

◆ SfxShell

friend class SfxShell
friend

Definition at line 94 of file bindings.hxx.

Member Data Documentation

◆ nRegLevel

sal_uInt16 SfxBindings::nRegLevel
private

◆ pDispatcher

SfxDispatcher* SfxBindings::pDispatcher
private

◆ pImpl

std::unique_ptr< SfxBindings_Impl> SfxBindings::pImpl
private

The documentation for this class was generated from the following files: