LibreOffice Module sfx2 (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SfxModule Class Reference

#include <module.hxx>

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

Public Member Functions

 SfxModule (const OString &rResName, std::initializer_list< SfxObjectFactory * > pFactoryList)
 
virtual ~SfxModule () override
 
std::locale GetResLocale () const
 
SfxSlotPoolGetSlotPool () const
 
void RegisterToolBoxControl (const SfxTbxCtrlFactory &)
 
void RegisterChildWindow (const SfxChildWinFactory &)
 
void RegisterStatusBarControl (const SfxStbCtrlFactory &)
 
virtual std::unique_ptr< SfxTabPageCreateTabPage (sal_uInt16 nId, weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
 
virtual void Invalidate (sal_uInt16 nId=0) override
 With this method can the slots of the subclasses be invalidated through the slot Id or alternatively through the Which ID. More...
 
virtual std::optional< SfxStyleFamiliesCreateStyleFamilies ()
 
FieldUnit GetFieldUnit () const
 
SAL_DLLPRIVATE SfxTbxCtrlFactoryGetTbxCtrlFactory (const std::type_info &rSlotType, sal_uInt16 nSlotID) const
 
SAL_DLLPRIVATE SfxStbCtrlFactoryGetStbCtrlFactory (const std::type_info &rSlotType, sal_uInt16 nSlotID) const
 
SAL_DLLPRIVATE SfxChildWinFactoryGetChildWinFactoryById (sal_uInt16 nId) const
 
- Public Member Functions inherited from SfxShell
virtual ~SfxShell () override
 The connection to a possible corresponding SbxObject is dissolved. More...
 
virtual SfxInterfaceGetInterface () const
 With this virtual method, which is automatically overridden by each subclass with its own slots through the macro <SFX_DECL_INTERFACE>, one can access each of the <SfxInterface> instance belonging to the subclass. More...
 
void SetName (const OUString &rName)
 Sets the name of the Shell object. More...
 
const OUString & GetName () const
 Returns the name of the Shell object. More...
 
SfxViewShellGetViewShell () const
 Returns the SfxViewShell in which they are located in the subshells. More...
 
const SfxPoolItemGetSlotState (sal_uInt16 nSlotId, const SfxInterface *pIF=nullptr, SfxItemSet *pStateSet=nullptr)
 This method returns the status of the slot with the specified slot ID on the specified interface. More...
 
const SfxPoolItemExecuteSlot (SfxRequest &rReq, const SfxInterface *pIF=nullptr)
 This method allows you to forward a <SfxRequest> to the specified base <SfxShell>. More...
 
void ExecuteSlot (SfxRequest &rReq, bool bAsync)
 Asynchronous ExecuteSlot for the RELOAD. More...
 
SfxItemPoolGetPool () const
 Each Subclass of SfxShell must reference a pool. More...
 
void SetPool (SfxItemPool *pNewPool)
 With this method, the subclasses register their special <SfxItemPool> in the SfxShell. More...
 
virtual SfxUndoManagerGetUndoManager ()
 Each Subclass of SfxShell can have a <SfxUndoManager>. More...
 
void SetUndoManager (SfxUndoManager *pNewUndoMgr)
 Sets a <SfxUndoManager> for this <SfxShell> Instance. More...
 
SfxRepeatTarget * GetRepeatTarget () const
 Returns a pointer to the <SfxRepeatTarget> instance that is used in SID_REPEAT as repeat target when it is addressed from the <SfxUndoManager> supplied by this SfxShell. More...
 
void SetRepeatTarget (SfxRepeatTarget *pTarget)
 Sets the <SfxRepeatTarget> instance that is used in SID_REPEAT as RepeatTarget, when the current supplied by this <SfxUndoManager> is addressed. More...
 
virtual void Invalidate (sal_uInt16 nId=0)
 With this method can the slots of the subclasses be invalidated through the slot Id or alternatively through the Which ID. More...
 
virtual bool IsDesignMode () const
 
bool IsActive () const
 
virtual void Activate (bool bMDI)
 Virtual method that is called when enabling the SfxShell instance, in order to give the Subclasses the opportunity to respond to the to the enabling. More...
 
virtual void Deactivate (bool bMDI)
 Virtual method that is called when disabling the SfxShell instance, to give the Subclasses the opportunity to respond to the disabling. More...
 
SfxDispatcherGetDispatcher () const
 This method returns a pointer to the <SfxDispatcher>, when the SfxShell is currently <UI-active> or a NULL-pointer if it is not UI-active. More...
 
SfxViewFrameGetFrame () const
 This method returns a pointer to the <SfxViewFrame> to which this SfxShell instance is associated or in which they currently is <UI-active>. More...
 
virtual bool HasUIFeature (SfxShellFeature nFeature) const
 
void UIFeatureChanged ()
 
const SfxPoolItemGetItem (sal_uInt16 nSlotId) const
 With this method any objects of <SfxPoolItemu> subclasses can be accessed. More...
 
template<class T >
const T * GetItem (TypedWhichId< T > nWhich) const
 
void PutItem (const SfxPoolItem &rItem)
 With this method, any objects of subclasses of <SfxPoolItem> can be made available. More...
 
void SetVerbs (const css::uno::Sequence< css::embed::VerbDescriptor > &aVerbs)
 
const css::uno::Sequence< css::embed::VerbDescriptor > & GetVerbs () const
 
void VerbExec (SfxRequest &)
 
SAL_DLLPRIVATE const SfxSlotGetVerbSlot_Impl (sal_uInt16 nId) const
 
virtual SfxObjectShellGetObjectShell ()
 
void SetDisableFlags (SfxDisableFlags nFlags)
 
SfxDisableFlags GetDisableFlags () const
 
virtual std::optional< SfxItemSetCreateItemSet (sal_uInt16 nId)
 
virtual void ApplyItemSet (sal_uInt16 nId, const SfxItemSet &rSet)
 
void SetContextName (const OUString &rsContextName)
 Set the name of the sidebar context that is broadcast on calls to Activation(). More...
 
void BroadcastContextForActivation (const bool bIsActivated)
 Broadcast a sidebar context change. More...
 
bool SetContextBroadcasterEnabled (const bool bIsEnabled)
 Enabled or disable the context broadcaster. More...
 
SAL_DLLPRIVATE bool CanExecuteSlot_Impl (const SfxSlot &rSlot)
 This method determines by calling the status function whether 'rSlot' can be executed currently. More...
 
virtual bool IsConditionalFastCall (const SfxRequest &rReq)
 This method determines whether we need to execute without checking the disabled state of the slot. More...
 
SAL_DLLPRIVATE void DoActivate_Impl (SfxViewFrame *pFrame, bool bMDI)
 This method controls the activation of SfxShell instance. More...
 
SAL_DLLPRIVATE void DoDeactivate_Impl (SfxViewFrame const *pFrame, bool bMDI)
 This method controls the deactivation of the SfxShell instance. More...
 
- 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
 

Static Public Member Functions

static SfxModuleGetActiveModule (SfxViewFrame *pFrame=nullptr)
 
static FieldUnit GetCurrentFieldUnit ()
 
static FieldUnit GetModuleFieldUnit (css::uno::Reference< css::frame::XFrame > const &i_frame)
 retrieves the field unit of the module belonging to the document displayed in the given frame More...
 
- Static Public Member Functions inherited from SfxShell
static SfxInterfaceGetStaticInterface ()
 
static void EmptyExecStub (SfxShell *pShell, SfxRequest &)
 
static void EmptyStateStub (SfxShell *pShell, SfxItemSet &)
 
static void VerbState (SfxItemSet &)
 

Private Member Functions

SAL_DLLPRIVATE void Construct_Impl (const OString &rResName)
 

Static Private Member Functions

static void InitInterface_Impl ()
 SfxInterface initializer. More...
 

Private Attributes

SfxModule_ImplpImpl
 

Additional Inherited Members

- Protected Member Functions inherited from SfxShell
 SfxShell ()
 The constructor of the SfxShell class initializes only simple types, the corresponding SbxObject is only created on-demand. More...
 
 SfxShell (SfxViewShell *pViewSh)
 The constructor of the SfxShell class initializes only simple types, the corresponding SbxObject is only created on-demand. More...
 
void SetViewShell_Impl (SfxViewShell *pView)
 
SAL_DLLPRIVATE void Invalidate_Impl (SfxBindings &rBindings, sal_uInt16 nId)
 
- Protected Member Functions inherited from SfxBroadcaster
void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 
- Static Protected Member Functions inherited from SfxShell
static void HandleOpenXmlFilterSettings (SfxRequest &)
 

Detailed Description

Definition at line 49 of file module.hxx.

Constructor & Destructor Documentation

◆ SfxModule()

SfxModule::SfxModule ( const OString &  rResName,
std::initializer_list< SfxObjectFactory * >  pFactoryList 
)

Definition at line 67 of file module.cxx.

◆ ~SfxModule()

SfxModule::~SfxModule ( )
overridevirtual

Definition at line 88 of file module.cxx.

References pImpl.

Member Function Documentation

◆ Construct_Impl()

void SfxModule::Construct_Impl ( const OString &  rResName)
private

◆ CreateStyleFamilies()

virtual std::optional< SfxStyleFamilies > SfxModule::CreateStyleFamilies ( )
inlinevirtual

Definition at line 82 of file module.hxx.

Referenced by IMPL_LINK_NOARG(), and SfxManageStyleSheetPage::SfxManageStyleSheetPage().

◆ CreateTabPage()

std::unique_ptr< SfxTabPage > SfxModule::CreateTabPage ( sal_uInt16  nId,
weld::Container pPage,
weld::DialogController pController,
const SfxItemSet rSet 
)
virtual

Definition at line 196 of file module.cxx.

◆ GetActiveModule()

SfxModule * SfxModule::GetActiveModule ( SfxViewFrame pFrame = nullptr)
static

◆ GetChildWinFactoryById()

SfxChildWinFactory * SfxModule::GetChildWinFactoryById ( sal_uInt16  nId) const

◆ GetCurrentFieldUnit()

FieldUnit SfxModule::GetCurrentFieldUnit ( )
static

Definition at line 243 of file module.cxx.

References GetActiveModule(), SfxShell::GetItem(), GetValue, and SAL_WARN.

◆ GetFieldUnit()

FieldUnit SfxModule::GetFieldUnit ( ) const

Definition at line 258 of file module.cxx.

References SfxShell::GetItem(), and GetValue.

Referenced by GetModuleFieldUnit().

◆ GetModuleFieldUnit()

FieldUnit SfxModule::GetModuleFieldUnit ( css::uno::Reference< css::frame::XFrame > const &  i_frame)
static

retrieves the field unit of the module belonging to the document displayed in the given frame

Effectively, this method looks up the SfxViewFrame belonging to the given XFrame, then the SfxModule belonging to the document in this frame, then this module's field unit.

Failures in any of those steps are reported as assertion in non-product builds, and then FieldUnit::MM_100TH is returned.

Definition at line 218 of file module.cxx.

References ENSURE_OR_RETURN, GetActiveModule(), GetFieldUnit(), SfxViewFrame::GetFirst(), SfxViewFrame::GetFrame(), SfxFrame::GetFrameInterface(), and SfxViewFrame::GetNext().

◆ GetResLocale()

std::locale SfxModule::GetResLocale ( ) const

Definition at line 97 of file module.cxx.

References Translate::Create(), SfxModule_Impl::maResName, and pImpl.

◆ GetSlotPool()

SfxSlotPool * SfxModule::GetSlotPool ( ) const

◆ GetStbCtrlFactory()

SfxStbCtrlFactory * SfxModule::GetStbCtrlFactory ( const std::type_info &  rSlotType,
sal_uInt16  nSlotID 
) const

Definition at line 179 of file module.cxx.

References SfxModule_Impl::maStbCtrlFactories, and pImpl.

Referenced by SfxStatusBarControl::CreateControl().

◆ GetTbxCtrlFactory()

SfxTbxCtrlFactory * SfxModule::GetTbxCtrlFactory ( const std::type_info &  rSlotType,
sal_uInt16  nSlotID 
) const

Definition at line 162 of file module.cxx.

References SfxModule_Impl::maTbxCtrlFactories, and pImpl.

Referenced by SfxToolBoxControl::CreateControl().

◆ InitInterface_Impl()

static void SfxModule::InitInterface_Impl ( )
inlinestaticprivate

SfxInterface initializer.

Definition at line 63 of file module.hxx.

◆ Invalidate()

void SfxModule::Invalidate ( sal_uInt16  nId = 0)
overridevirtual

With this method can the slots of the subclasses be invalidated through the slot Id or alternatively through the Which ID.

Slot IDs, which are inherited by the subclass are also invalidated.

[Cross-reference]

<SfxBindings::Invalidate(sal_uInt16)> <SfxBindings::InvalidateAll(sal_Bool)>

Reimplemented from SfxShell.

Definition at line 201 of file module.cxx.

References SfxViewFrame::GetFirst(), SfxViewFrame::GetNext(), SfxShell::Invalidate_Impl(), and nId.

◆ RegisterChildWindow()

void SfxModule::RegisterChildWindow ( const SfxChildWinFactory rFact)

◆ RegisterStatusBarControl()

void SfxModule::RegisterStatusBarControl ( const SfxStbCtrlFactory rFact)

◆ RegisterToolBoxControl()

void SfxModule::RegisterToolBoxControl ( const SfxTbxCtrlFactory rFact)

Member Data Documentation

◆ pImpl

SfxModule_Impl* SfxModule::pImpl
private

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