LibreOffice Module sfx2 (master) 1
|
#include <module.hxx>
Public Member Functions | |
SfxModule (const OString &rResName, std::initializer_list< SfxObjectFactory * > pFactoryList) | |
virtual | ~SfxModule () override |
std::locale | GetResLocale () const |
SfxSlotPool * | GetSlotPool () const |
void | RegisterToolBoxControl (const SfxTbxCtrlFactory &) |
void | RegisterChildWindow (const SfxChildWinFactory &) |
void | RegisterStatusBarControl (const SfxStbCtrlFactory &) |
virtual std::unique_ptr< SfxTabPage > | CreateTabPage (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< SfxStyleFamilies > | CreateStyleFamilies () |
FieldUnit | GetFieldUnit () const |
SAL_DLLPRIVATE SfxTbxCtrlFactory * | GetTbxCtrlFactory (const std::type_info &rSlotType, sal_uInt16 nSlotID) const |
SAL_DLLPRIVATE SfxStbCtrlFactory * | GetStbCtrlFactory (const std::type_info &rSlotType, sal_uInt16 nSlotID) const |
SAL_DLLPRIVATE SfxChildWinFactory * | GetChildWinFactoryById (sal_uInt16 nId) const |
Public Member Functions inherited from SfxShell | |
virtual | ~SfxShell () override |
The connection to a possible corresponding SbxObject is dissolved. More... | |
virtual SfxInterface * | GetInterface () 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... | |
SfxViewShell * | GetViewShell () const |
Returns the SfxViewShell in which they are located in the subshells. More... | |
const SfxPoolItem * | GetSlotState (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 SfxPoolItem * | ExecuteSlot (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... | |
SfxItemPool & | GetPool () 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 SfxUndoManager * | GetUndoManager () |
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... | |
SfxDispatcher * | GetDispatcher () 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... | |
SfxViewFrame * | GetFrame () 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 SfxPoolItem * | GetItem (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 SfxSlot * | GetVerbSlot_Impl (sal_uInt16 nId) const |
virtual SfxObjectShell * | GetObjectShell () |
void | SetDisableFlags (SfxDisableFlags nFlags) |
SfxDisableFlags | GetDisableFlags () const |
virtual std::optional< SfxItemSet > | CreateItemSet (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 SfxModule * | GetActiveModule (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 SfxInterface * | GetStaticInterface () |
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_Impl * | pImpl |
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 &) |
Definition at line 49 of file module.hxx.
SfxModule::SfxModule | ( | const OString & | rResName, |
std::initializer_list< SfxObjectFactory * > | pFactoryList | ||
) |
Definition at line 67 of file module.cxx.
|
overridevirtual |
Definition at line 88 of file module.cxx.
References pImpl.
|
private |
Definition at line 78 of file module.cxx.
References SfxApplication::GetAppSlotPool_Impl(), SfxApplication::GetOrCreate(), SfxShell::GetPool(), SfxModule_Impl::maResName, pImpl, SfxModule_Impl::pSlotPool, and SfxShell::SetPool().
|
inlinevirtual |
Definition at line 82 of file module.hxx.
Referenced by IMPL_LINK_NOARG(), and SfxManageStyleSheetPage::SfxManageStyleSheetPage().
|
virtual |
Definition at line 196 of file module.cxx.
|
static |
Definition at line 208 of file module.cxx.
References SfxViewFrame::Current(), SfxObjectShell::GetModule(), and SfxViewFrame::GetObjectShell().
Referenced by SfxChildWindow::CreateChildWindow(), GetCurrentFieldUnit(), SfxApplication::GetModule_Impl(), GetModuleFieldUnit(), SfxSlotPool::GetSlotPool(), SfxWorkWindow::InitializeChild_Impl(), SfxManageStyleSheetPage::SetDescriptionText_Impl(), and SfxTemplateManagerDlg::SfxTemplateManagerDlg().
SfxChildWinFactory * SfxModule::GetChildWinFactoryById | ( | sal_uInt16 | nId | ) | const |
Definition at line 188 of file module.cxx.
References SfxModule_Impl::maFactories, nId, and pImpl.
Referenced by SfxChildWindow::CreateChildWindow(), and SfxWorkWindow::InitializeChild_Impl().
|
static |
Definition at line 243 of file module.cxx.
References GetActiveModule(), SfxShell::GetItem(), GetValue, and SAL_WARN.
FieldUnit SfxModule::GetFieldUnit | ( | ) | const |
Definition at line 258 of file module.cxx.
References SfxShell::GetItem(), and GetValue.
Referenced by GetModuleFieldUnit().
|
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().
std::locale SfxModule::GetResLocale | ( | ) | const |
Definition at line 97 of file module.cxx.
References Translate::Create(), SfxModule_Impl::maResName, and pImpl.
SfxSlotPool * SfxModule::GetSlotPool | ( | ) | const |
Definition at line 102 of file module.cxx.
References pImpl, and SfxModule_Impl::pSlotPool.
Referenced by ConvertSlotsToCommands(), SfxStatusBarControl::CreateControl(), SfxToolBoxControl::CreateControl(), SfxObjectShell::ExecFile_Impl(), SfxSlotPool::GetSlotPool(), SfxInterface::Register(), SfxStatusBarControllerFactory(), and SfxToolBoxControllerFactory().
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().
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().
|
inlinestaticprivate |
SfxInterface initializer.
Definition at line 63 of file module.hxx.
|
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.
void SfxModule::RegisterChildWindow | ( | const SfxChildWinFactory & | rFact | ) |
Definition at line 108 of file module.cxx.
References DBG_ASSERT, SfxModule_Impl::maFactories, SfxChildWinFactory::nId, pImpl, and SAL_WARN.
Referenced by SfxApplication::RegisterChildWindow_Impl().
void SfxModule::RegisterStatusBarControl | ( | const SfxStbCtrlFactory & | rFact | ) |
Definition at line 144 of file module.cxx.
References SfxModule_Impl::maStbCtrlFactories, n, SfxStbCtrlFactory::nSlotId, SfxStbCtrlFactory::nTypeId, pImpl, and SAL_INFO.
Referenced by SfxApplication::RegisterStatusBarControl_Impl().
void SfxModule::RegisterToolBoxControl | ( | const SfxTbxCtrlFactory & | rFact | ) |
Definition at line 126 of file module.cxx.
References SfxModule_Impl::maTbxCtrlFactories, n, SfxTbxCtrlFactory::nSlotId, SfxTbxCtrlFactory::nTypeId, pImpl, and SAL_INFO.
Referenced by SfxApplication::RegisterToolBoxControl_Impl().
|
private |
Definition at line 54 of file module.hxx.
Referenced by Construct_Impl(), GetChildWinFactoryById(), GetResLocale(), GetSlotPool(), GetStbCtrlFactory(), GetTbxCtrlFactory(), RegisterChildWindow(), RegisterStatusBarControl(), RegisterToolBoxControl(), and ~SfxModule().