19#ifndef INCLUDED_SFX2_SHELL_HXX
20#define INCLUDED_SFX2_SHELL_HXX
23#include <rtl/ustring.hxx>
131 std::unique_ptr< SfxShell_Impl >
pImpl;
155 SAL_DLLPRIVATE
void Invalidate_Impl(
SfxBindings& rBindings, sal_uInt16 nId );
156 static void HandleOpenXmlFilterSettings(
SfxRequest &);
182 void SetName(
const OUString &rName );
188 const OUString&
GetName()
const;
271 void ExecuteSlot(
SfxRequest &rReq,
bool bAsync );
309 SfxRepeatTarget* GetRepeatTarget()
const;
323 void SetRepeatTarget( SfxRepeatTarget *pTarget );
335 virtual void Invalidate(sal_uInt16 nId = 0);
339 bool IsActive()
const;
350 virtual void Activate(
bool bMDI);
360 virtual void Deactivate(
bool bMDI);
393 void UIFeatureChanged();
412 return static_cast<const T*
>(
GetItem(sal_uInt16(nWhich)));
431 void SetVerbs(
const css::uno::Sequence < css::embed::VerbDescriptor >& aVerbs);
432 const css::uno::Sequence < css::embed::VerbDescriptor >& GetVerbs()
const;
435 SAL_DLLPRIVATE
const SfxSlot* GetVerbSlot_Impl(sal_uInt16 nId)
const;
441 virtual std::optional<SfxItemSet> CreateItemSet( sal_uInt16 nId );
442 virtual void ApplyItemSet( sal_uInt16 nId,
const SfxItemSet&
rSet );
447 void SetContextName (
const OUString& rsContextName);
457 void BroadcastContextForActivation (
const bool bIsActivated);
461 bool SetContextBroadcasterEnabled (
const bool bIsEnabled);
468 SAL_DLLPRIVATE
bool CanExecuteSlot_Impl(
const SfxSlot &rSlot );
476 virtual bool IsConditionalFastCall(
const SfxRequest &rReq );
488 SAL_DLLPRIVATE
void DoActivate_Impl(
SfxViewFrame *pFrame,
bool bMDI);
499 SAL_DLLPRIVATE
void DoDeactivate_Impl(
SfxViewFrame const *pFrame,
bool bMDI);
513 assert(
pPool &&
"no pool");
532#define SFX_DECL_INTERFACE(nId) \
533 static SfxInterface* s_pInterface; \
534 static SfxInterface* GetStaticInterface(); \
535 static SfxInterfaceId GetInterfaceId() {return nId;} \
536 static void RegisterInterface(const SfxModule* pMod=nullptr); \
537 virtual SfxInterface* GetInterface() const override;
539#define SFX_TMPL_INTERFACE(Class,SuperClass,Abstract) \
541 SfxInterface* Class::s_pInterface = nullptr; \
542 SfxInterface* Class::GetStaticInterface() \
544 if ( !s_pInterface ) \
548 #Class, Abstract, GetInterfaceId(), \
549 SuperClass::GetStaticInterface(), \
550 a##Class##Slots_Impl[0], \
551 sal_uInt16(sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ); \
552 InitInterface_Impl(); \
554 return s_pInterface; \
557 SfxInterface* Class::GetInterface() const \
559 return GetStaticInterface(); \
562 void Class::RegisterInterface(const SfxModule* pMod) \
564 GetStaticInterface()->Register(pMod); \
567#define SFX_IMPL_INTERFACE(Class,SuperClass) \
568SFX_TMPL_INTERFACE(Class,SuperClass,false) \
570#define SFX_IMPL_SUPERCLASS_INTERFACE(Class,SuperClass) \
571SFX_TMPL_INTERFACE(Class,SuperClass,true) \
const SfxBroadcaster & operator=(const SfxBroadcaster &)=delete
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.
SfxUndoManager * pUndoMgr
std::unique_ptr< SfxShell_Impl > pImpl
static SfxInterface * GetStaticInterface()
virtual bool IsDesignMode() const
const T * GetItem(TypedWhichId< T > nWhich) const
void SetPool(SfxItemPool *pNewPool)
With this method, the subclasses register their special <SfxItemPool> in the SfxShell.
SfxShell(const SfxShell &)=delete
One SfxViewShell more or less represents one edit window for a document, there can be multiple ones f...
virtual OUString GetName() const override
SfxDispatcher * GetDispatcher()
Implementation of the interface com.sun.star.rdf.XDocumentMetadataAccess.
constexpr auto SFX_INTERFACE_SFXMODULE
constexpr auto SFX_INTERFACE_IDE_END
constexpr auto SFX_INTERFACE_SFXVIEWFRM
constexpr auto SFX_INTERFACE_SFXVIEWSH
constexpr auto SFX_INTERFACE_SMA_START
constexpr auto SFX_INTERFACE_SD_START
@ FormShowFilterNavigator
void(* SfxExecFunc)(SfxShell *, SfxRequest &rReq)
void(* SfxStateFunc)(SfxShell *, SfxItemSet &rSet)
o3tl::strong_int< sal_uInt16, struct SfxInterfaceIdTag > SfxInterfaceId
Id for <SfxInterface>s, gives a quasi-static access to the interface through an array to <SfxApplicat...
constexpr auto SFX_INTERFACE_NONE
constexpr auto SFX_INTERFACE_SC_START
constexpr auto SFX_INTERFACE_IDE_START
constexpr auto SFX_INTERFACE_SW_START
constexpr auto SFX_INTERFACE_SFXDOCSH
constexpr auto SFX_INTERFACE_SFXAPP