30#include <sfx2/sfxsids.hrc>
36#define ShellClass_SfxModule
37#include <sfxslots.hxx>
70 Construct_Impl(rResName);
71 for (
auto pFactory : pFactoryList)
74 pFactory->SetModule_Impl(
this );
117 SAL_WARN(
"sfx.appl",
"ChildWindow registered multiple times!");
135 SAL_INFO(
"sfx.appl",
"TbxController-Registering is not clearly defined!");
153 SAL_INFO(
"sfx.appl",
"TbxController-Registering is not clearly defined!");
166 if( rFactory.nTypeId == rSlotType && rFactory.nSlotId == nSlotID )
172 if( rFactory.nTypeId == rSlotType && rFactory.nSlotId == 0 )
182 if ( rFactory.nTypeId == rSlotType &&
183 ( rFactory.nSlotId == 0 || rFactory.nSlotId == nSlotID ) )
191 if (rFactory.nId ==
nId)
204 if ( pFrame->GetObjectShell()->GetModule() == this )
220 ENSURE_OR_RETURN( i_frame.is(),
"SfxModule::GetModuleFieldUnit: invalid frame!", FieldUnit::MM_100TH );
224 while ( pViewFrame !=
nullptr )
231 pViewFrame !=
nullptr,
232 "SfxModule::GetModuleFieldUnit: unable to find an SfxViewFrame for the given XFrame",
233 FieldUnit::MM_100TH);
238 "SfxModule::GetModuleFieldUnit: no SfxModule for the given frame!",
239 FieldUnit::MM_100TH);
254 SAL_WARN(
"sfx.appl",
"GetModuleFieldUnit(): no module found" );
SAL_DLLPRIVATE SfxSlotPool & GetAppSlotPool_Impl() const
static SfxApplication * GetOrCreate()
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
std::vector< SfxChildWinFactory > maFactories
std::vector< SfxTbxCtrlFactory > maTbxCtrlFactories
std::vector< SfxStbCtrlFactory > maStbCtrlFactories
std::optional< SfxSlotPool > pSlotPool
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 ...
static SfxModule * GetActiveModule(SfxViewFrame *pFrame=nullptr)
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
SAL_DLLPRIVATE SfxStbCtrlFactory * GetStbCtrlFactory(const std::type_info &rSlotType, sal_uInt16 nSlotID) const
SAL_DLLPRIVATE SfxChildWinFactory * GetChildWinFactoryById(sal_uInt16 nId) const
SAL_DLLPRIVATE void Construct_Impl(const OString &rResName)
void RegisterToolBoxControl(const SfxTbxCtrlFactory &)
SAL_DLLPRIVATE SfxTbxCtrlFactory * GetTbxCtrlFactory(const std::type_info &rSlotType, sal_uInt16 nSlotID) const
FieldUnit GetFieldUnit() const
void RegisterStatusBarControl(const SfxStbCtrlFactory &)
virtual std::unique_ptr< SfxTabPage > CreateTabPage(sal_uInt16 nId, weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
SfxSlotPool * GetSlotPool() const
static FieldUnit GetCurrentFieldUnit()
std::locale GetResLocale() const
virtual ~SfxModule() override
void RegisterChildWindow(const SfxChildWinFactory &)
SfxModule * GetModule() const
The class SfxShell is the base class for all classes, which provide the functionality of the form <Sl...
SfxItemPool & GetPool() const
Each Subclass of SfxShell must reference a pool.
SAL_DLLPRIVATE void Invalidate_Impl(SfxBindings &rBindings, sal_uInt16 nId)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
With this method any objects of <SfxPoolItemu> subclasses can be accessed.
void SetPool(SfxItemPool *pNewPool)
With this method, the subclasses register their special <SfxItemPool> in the SfxShell.
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SfxFrame & GetFrame() const
virtual SfxObjectShell * GetObjectShell() override
#define DBG_ASSERT(sCon, aError)
#define ENSURE_OR_RETURN(c, m, r)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::locale Create(std::string_view aPrefixName, const LanguageTag &rLocale)
#define SFX_IMPL_SUPERCLASS_INTERFACE(Class, SuperClass)
const std::type_info & nTypeId
const std::type_info & nTypeId