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

The class SfxShell is the base class for all classes, which provide the functionality of the form <Slot>s. More...

#include <shell.hxx>

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

Public Member Functions

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 SfxInterfaceGetStaticInterface ()
 
static void EmptyExecStub (SfxShell *pShell, SfxRequest &)
 
static void EmptyStateStub (SfxShell *pShell, SfxItemSet &)
 
static void VerbState (SfxItemSet &)
 

Protected Member Functions

 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

static void HandleOpenXmlFilterSettings (SfxRequest &)
 

Private Member Functions

 SfxShell (const SfxShell &)=delete
 
SfxShelloperator= (const SfxShell &)=delete
 

Private Attributes

std::unique_ptr< SfxShell_ImplpImpl
 
SfxItemPoolpPool
 
SfxUndoManagerpUndoMgr
 

Friends

class SfxObjectItem
 

Detailed Description

The class SfxShell is the base class for all classes, which provide the functionality of the form <Slot>s.

Each instance has a reference to an interface description, which is obtainable through <SfxShell::GetInterface()const>. This interface provides the connection to specific methods and contains some other descriptive data for controllers like menus and toolboxes, but also for the various APIs. The main part of the interface description is in the form of a <Type-Library>, which is generated from an IDL-file by the <SVIDL-Compiler>. For each SfxShell Subclass-File there is one such IDL-file to write.

Definition at line 127 of file shell.hxx.

Constructor & Destructor Documentation

◆ SfxShell() [1/3]

SfxShell::SfxShell ( const SfxShell )
privatedelete

◆ SfxShell() [2/3]

SfxShell::SfxShell ( )
protected

The constructor of the SfxShell class initializes only simple types, the corresponding SbxObject is only created on-demand.

Therefore, the application of a SfxShell instance is very cheap.

Definition at line 95 of file shell.cxx.

◆ SfxShell() [3/3]

SfxShell::SfxShell ( SfxViewShell pViewSh)
protected

The constructor of the SfxShell class initializes only simple types, the corresponding SbxObject is only created on-demand.

Therefore, the application of a SfxShell instance is very cheap.

Definition at line 102 of file shell.cxx.

References pImpl.

◆ ~SfxShell()

SfxShell::~SfxShell ( )
overridevirtual

The connection to a possible corresponding SbxObject is dissolved.

The SbxObject may continue to exist, but can not any longer perform any functions and can not provide any properties.

Definition at line 110 of file shell.cxx.

Member Function Documentation

◆ Activate()

void SfxShell::Activate ( bool  bMDI)
virtual

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.

[Cross-reference]

StarView SystemWindow::Activate(bool)

Reimplemented in SfxViewFrame, and SfxViewShell.

Definition at line 359 of file shell.cxx.

Referenced by DoActivate_Impl().

◆ ApplyItemSet()

void SfxShell::ApplyItemSet ( sal_uInt16  nId,
const SfxItemSet rSet 
)
virtual

Definition at line 699 of file shell.cxx.

◆ BroadcastContextForActivation()

void SfxShell::BroadcastContextForActivation ( const bool  bIsActivated)

Broadcast a sidebar context change.

This method is typically called from Activate() or Deactivate().

Parameters
bIsActivatedWhen <TRUE> then broadcast the context name that was defined with an earlier call to SetContextName(). When <FALSE> then broadcast the 'default' context.

Definition at line 713 of file shell.cxx.

References GetFrame(), SfxViewFrame::GetFrame(), SfxFrame::GetFrameInterface(), comphelper::LibreOfficeKit::isDialogPainting(), and pImpl.

Referenced by Deactivate(), and SfxViewFrame::GetDispatcher().

◆ CanExecuteSlot_Impl()

bool SfxShell::CanExecuteSlot_Impl ( const SfxSlot rSlot)

This method determines by calling the status function whether 'rSlot' can be executed currently.

Definition at line 393 of file shell.cxx.

References SfxItemSet::GetItemState(), GetPool(), SfxSlot::GetStateFnc(), SfxSlot::GetWhich(), and nId.

Referenced by SfxDispatcher::Call_Impl().

◆ CreateItemSet()

std::optional< SfxItemSet > SfxShell::CreateItemSet ( sal_uInt16  nId)
virtual

Definition at line 694 of file shell.cxx.

◆ Deactivate()

void SfxShell::Deactivate ( bool  bMDI)
virtual

Virtual method that is called when disabling the SfxShell instance, to give the Subclasses the opportunity to respond to the disabling.

[Cross-reference]

StarView SystemWindow::Deactivate(bool)

Reimplemented in SfxViewFrame, and SfxViewShell.

Definition at line 376 of file shell.cxx.

References BroadcastContextForActivation().

Referenced by DoDeactivate_Impl().

◆ DoActivate_Impl()

void SfxShell::DoActivate_Impl ( SfxViewFrame pFrame,
bool  bMDI 
)

This method controls the activation of SfxShell instance.

First, by calling the virtual method <SfxShell::Activate(sal_Bool)> which gives the subclass the opportunity to respond to the event.

When bMDI == TRUE, the associated SbxObject is being 'armed', so that unqualified methods of the object (without the name of the object) from BASIC are found.

Definition at line 292 of file shell.cxx.

References Activate(), GetInterface(), GetObjectShell(), SfxObjectShell::GetTitle(), pImpl, SAL_INFO, and CrashReporter::setActiveSfxObjectName().

◆ DoDeactivate_Impl()

void SfxShell::DoDeactivate_Impl ( SfxViewFrame const *  pFrame,
bool  bMDI 
)

This method controls the deactivation of the SfxShell instance.

When bMDI == TRUE the SbxObject is first set to a status that only qualified BASIC methods can be called.

Then the subclass gets the opportunity in every case to respond to the event by calling the virtual method <SfxShell::Deactivate(sal_Bool)>.

Definition at line 329 of file shell.cxx.

References Deactivate(), GetInterface(), pImpl, and SAL_INFO.

Referenced by SfxDispatcher::RemoveShell_Impl().

◆ EmptyExecStub()

void SfxShell::EmptyExecStub ( SfxShell pShell,
SfxRequest  
)
static

Definition at line 87 of file shell.cxx.

◆ EmptyStateStub()

void SfxShell::EmptyStateStub ( SfxShell pShell,
SfxItemSet  
)
static

Definition at line 91 of file shell.cxx.

◆ ExecuteSlot() [1/2]

void SfxShell::ExecuteSlot ( SfxRequest rReq,
bool  bAsync 
)

Asynchronous ExecuteSlot for the RELOAD.

Definition at line 424 of file shell.cxx.

References ExecuteSlot(), pImpl, and ShellCall_Impl().

◆ ExecuteSlot() [2/2]

const SfxPoolItem * SfxShell::ExecuteSlot ( SfxRequest rReq,
const SfxInterface pIF = nullptr 
)

This method allows you to forward a <SfxRequest> to the specified base <SfxShell>.

[Example]

In a derived class of SfxViewShell the SID_PRINTDOCDIRECT will be intercepted. Under certain circumstances a query should appear before you print, and the request will be aborted if necessary.

Also in the IDL of this subclass of the above slot is entered. The status method will contain in outline:

void SubViewShell::Exec( SfxRequest &rReq ) { if ( rReq.GetSlot() == SID_PRINTDOCDIRECT ) { 'dialog' if ( 'condition' ) ExecuteSlot( rReq, SfxViewShell::GetInterface() ); } }

It usually takes no rReq.Done() to be called as that is already completed in implementation of the SfxViewShell, for instance it has been canceled.

[Cross-reference]

<SfxShell::GetSlotState(sal_uInt16,const SfxInterface*,SfxItemSet*)>

Definition at line 437 of file shell.cxx.

References DBG_ASSERT, SfxSlot::GetExecFnc(), GetInterface(), SfxRequest::GetReturnValue(), SfxRequest::GetSlot(), SfxInterface::GetSlot(), and GetVerbSlot_Impl().

Referenced by SfxViewFrame::AddDispatchMacroToBasic_Impl(), SfxViewFrame::Exec_Impl(), SfxObjectShell::ExecFile_Impl(), SfxViewFrame::ExecHistory_Impl(), ExecuteSlot(), SfxApplication::NewDocDirectExec_Impl(), SfxApplication::OfaExec_Impl(), and SfxObjectShell::PrintExec_Impl().

◆ GetDisableFlags()

SfxDisableFlags SfxShell::GetDisableFlags ( ) const

Definition at line 689 of file shell.cxx.

References pImpl.

Referenced by SfxDispatcher::FindServer_().

◆ GetDispatcher()

SfxDispatcher * SfxShell::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.

The returned pointer is only valid in the immediate context of the method call.

Definition at line 124 of file shell.cxx.

References pImpl.

Referenced by SfxApplication::MiscExec_Impl(), SfxApplication::MiscState_Impl(), SfxViewShell::PrepareClose(), PutItem(), SfxSecurityPage_Impl::Reset_Impl(), and SfxDispatcher::Update_Impl().

◆ GetFrame()

SfxViewFrame * SfxShell::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>.

A NULL pointer is returned if this SfxShell instance is not UI-active at the moment and also no SfxViewFrame is permanently assigned.

The returned pointer is only valid in the immediate context of the method call.

[Note]

Only instances of a subclass of SfxApplication and SfxObjectShell should here provide a NULL-pointer. Otherwise, there is an error in the application program (wrong constructor was called from SfxShell).

[Cross-reference]

<SfxViewShell::GetViewFrame()const>

Definition at line 134 of file shell.cxx.

References pImpl.

Referenced by BroadcastContextForActivation(), SfxObjectShell::CancelCheckOut(), SfxObjectShell::CheckIn(), SfxObjectShell::CheckOut(), SfxObjectShell::ExecFile_Impl(), SfxObjectShell::GetCmisVersions(), SfxObjectShell::GetState_Impl(), SfxApplication::NewDocDirectExec_Impl(), SfxViewShell::OutplaceActivated(), SfxObjectShell::SignSignatureLine(), and UIFeatureChanged().

◆ GetInterface()

SfxInterface * SfxShell::GetInterface ( ) const
virtual

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.

The class SfxShell itself has no own SfxInterface (no slots), therefore a NULL-pointer is returned.

Definition at line 198 of file shell.cxx.

References GetStaticInterface().

Referenced by DoActivate_Impl(), DoDeactivate_Impl(), SfxViewShell::ExecPrint_Impl(), SfxDispatcher::ExecutePopup(), ExecuteSlot(), SfxDispatcher::FillState_(), SfxDispatcher::FindServer_(), GetSlotState(), Invalidate_Impl(), SfxApplication::OfaExec_Impl(), SfxApplication::OpenDocExec_Impl(), SfxDispatcher::Pop(), and SfxDispatcher::Update_Impl_().

◆ GetItem() [1/2]

const SfxPoolItem * SfxShell::GetItem ( sal_uInt16  nSlotId) const

With this method any objects of <SfxPoolItemu> subclasses can be accessed.

This exchange method is needed if, for example special <SfxToolBoxControl> subclasses need access to certain data such as the <SfxObjectShell>.

The returned instance belongs to the particular SfxShell and may be used only in the immediate context of the method call.

[Cross-reference]

<SfxShell::PutItem(const SfxPoolItem&)> <SfxShell::RemoveItem(sal_uInt16)>

Definition at line 143 of file shell.cxx.

References pImpl.

Referenced by SfxModule::GetCurrentFieldUnit(), SfxModule::GetFieldUnit(), and SfxManageStyleSheetPage::SetDescriptionText_Impl().

◆ GetItem() [2/2]

template<class T >
const T * SfxShell::GetItem ( TypedWhichId< T >  nWhich) const
inline

Definition at line 410 of file shell.hxx.

References GetItem().

◆ GetName()

const OUString & SfxShell::GetName ( ) const

◆ GetObjectShell()

SfxObjectShell * SfxShell::GetObjectShell ( )
virtual

◆ GetPool()

SfxItemPool & SfxShell::GetPool ( ) const
inline

◆ GetRepeatTarget()

SfxRepeatTarget * SfxShell::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.

The return value can be NULL.

[Note]

A derivation of <SfxShell> or one of its subclasses of <SfxRepeatTarget> is not recommended, as compiler errors are provoked. (due to Call-to-Pointer-to-Member-Function to the subclass).

Definition at line 224 of file shell.cxx.

References pImpl.

Referenced by SfxViewFrame::ExecHistory_Impl(), and SfxViewFrame::StateHistory_Impl().

◆ GetSlotState()

const SfxPoolItem * SfxShell::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.

If the slot is disabled or in this SfxShell (and their parent shells) are not known, a Null-pointer is returned.

If the slot does not have a Status, a SfxVoidItem is returned.

The status is set directly in this Set when pStateSet != 0 , so that overridden Slots of the <SfxShell> Subclasses and also in the Status method of the base implementation can be called.

[Example]

In a derived class of SfxViewShell the SID_PRINTDOCDIRECT will be intercepted. Under certain circumstances a query should appear before you print, and the request will be aborted if necessary.

Also in the IDL of this subclass of the above slot is entered. The status method will contain in outline:

void SubViewShell::PrintState( SfxItemSet &rState ) { if ( rState.GetItemState( SID_PRINTDOCDIRECT ) != SfxItemState::UNKNOWN ) GetSlotState( SID_PRINTDOCDIRECT, SfxViewShell::GetInterface(), &rState ); ... }

[Cross-reference]

<SfxShell::ExecuteSlot(SfxRequest&)>

Definition at line 461 of file shell.cxx.

References SfxItemSet::ClearItem(), SfxPoolItem::Clone(), DeleteItemOnIdle(), SfxItemSet::DisableItem(), SfxItemSet::Get(), SfxItemPool::GetDefaultItem(), GetInterface(), SfxItemSet::GetItemState(), GetPool(), SfxInterface::GetSlot(), SfxSlot::GetStateFnc(), GetVerbSlot_Impl(), SfxSlot::GetWhich(), SfxItemPool::IsWhich(), SfxItemSet::Put(), and SfxPoolItem::Which().

Referenced by SfxObjectShell::ExecFile_Impl(), SfxDispatcher::QueryState(), and SfxViewFrame::StateHistory_Impl().

◆ GetStaticInterface()

static SfxInterface * SfxShell::GetStaticInterface ( )
inlinestatic

Definition at line 176 of file shell.hxx.

Referenced by GetInterface().

◆ GetUndoManager()

SfxUndoManager * SfxShell::GetUndoManager ( )
virtual

Each Subclass of SfxShell can have a <SfxUndoManager>.

This can be set in the derived class with <SfxShell:SetUndoManager()>.

The class SfxShell itself does not have a SfxUndoManager, a NULL-pointer is therefore returned.

Definition at line 203 of file shell.cxx.

References pUndoMgr.

Referenced by SfxViewFrame::ExecHistory_Impl(), sfx2::DocumentUndoManager_Impl::getImplUndoManager(), SfxObjectShell::GetState_Impl(), sfx2::DocumentUndoManager_Impl::impl_retrieveUndoManager(), and SfxViewFrame::StateHistory_Impl().

◆ GetVerbs()

const css::uno::Sequence< css::embed::VerbDescriptor > & SfxShell::GetVerbs ( ) const

Definition at line 597 of file shell.cxx.

References pImpl.

Referenced by SfxViewFrame::GetState_Impl(), and VerbExec().

◆ GetVerbSlot_Impl()

const SfxSlot * SfxShell::GetVerbSlot_Impl ( sal_uInt16  nId) const

Definition at line 635 of file shell.cxx.

References DBG_ASSERT, nId, nIndex, and pImpl.

Referenced by ExecuteSlot(), SfxDispatcher::FindServer_(), and GetSlotState().

◆ GetViewShell()

SfxViewShell * SfxShell::GetViewShell ( ) const

Returns the SfxViewShell in which they are located in the subshells.

Otherwise, and if not specified by the App developer, this method returns NULL.

Definition at line 129 of file shell.cxx.

References pImpl.

Referenced by SfxViewFrame::Activate(), SfxWorkWindow::ArrangeChildren_Impl(), SfxViewFrame::Close(), SfxObjectShell::CreatePreview_Impl(), SfxViewShell::Current(), SfxViewFrame::Deactivate(), SfxBaseController::dispose(), sfx2::sidebar::SidebarController::disposeDecks(), SfxViewFrame::Enable(), SfxFrameWindow_Impl::EventNotify(), SfxViewFrame::Exec_Impl(), SfxViewFrame::ExecHistory_Impl(), SfxViewFrame::ExecReload_Impl(), SfxViewFrame::ExecView_Impl(), StyleList::FillTreeBox(), SfxViewFrame::Get(), GetObjectShell(), SfxPrintHelper::getPrinter(), SfxViewFrame::GetState_Impl(), SfxBaseModel::getViewData(), SfxFrame::GetViewData_Impl(), SfxFrame::GrabFocusOnComponent_Impl(), IMPL_LINK_NOARG(), SfxPrintHelper::impl_setPrinter(), SfxDockingWindow::Initialize_Impl(), InterceptLOKStateChangeEvent(), Invalidate(), SfxViewFrame::InvalidateBorderImpl(), SfxViewFrame::MakeActive_Impl(), SfxApplication::OfaExec_Impl(), SfxApplication::OpenDocExec_Impl(), SfxFrameWindow_Impl::PreNotify(), SfxFrame::PrepareClose_Impl(), SfxPrintHelper::print(), SfxObjectShell::PrintExec_Impl(), SfxObjectShell::PrintState_Impl(), SfxViewFrame::ReleaseObjectShell_Impl(), SfxFrame::Resize(), SfxViewFrame::Resize(), SfxViewFrame::SaveCurrentViewData_Impl(), SfxApplication::SetViewFrame_Impl(), SfxBaseModel::setVisualAreaSize(), SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl(), SfxViewFrame::StateHistory_Impl(), SfxViewFrame::StateReload_Impl(), SfxViewFrame::StateView_Impl(), sfx2::sidebar::SidebarController::SwitchToDeck(), SfxViewFrame::SwitchToViewShell_Impl(), sfx2::sidebar::SidebarController::UpdateDeckOpenState(), StyleList::UpdateStyles(), and VerbExec().

◆ HandleOpenXmlFilterSettings()

void SfxShell::HandleOpenXmlFilterSettings ( SfxRequest rReq)
staticprotected

Definition at line 279 of file shell.cxx.

References SfxRequest::Ignore().

◆ HasUIFeature()

bool SfxShell::HasUIFeature ( SfxShellFeature  nFeature) const
virtual

Definition at line 657 of file shell.cxx.

Referenced by SfxDispatcher::Update_Impl_().

◆ Invalidate()

void SfxShell::Invalidate ( sal_uInt16  nId = 0)
virtual

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 in SfxApplication, SfxModule, and SfxObjectShell.

Definition at line 234 of file shell.cxx.

References GetBindings(), GetViewShell(), Invalidate_Impl(), and nId.

Referenced by SfxViewFrame::Exec_Impl().

◆ Invalidate_Impl()

void SfxShell::Invalidate_Impl ( SfxBindings rBindings,
sal_uInt16  nId 
)
protected

◆ IsActive()

bool SfxShell::IsActive ( ) const

Definition at line 354 of file shell.cxx.

References pImpl.

◆ IsConditionalFastCall()

bool SfxShell::IsConditionalFastCall ( const SfxRequest rReq)
virtual

This method determines whether we need to execute without checking the disabled state of the slot.

This is used for dynamic conditions while you can use SfxSlotMode::FASTCALL for a specific slotid in general.

Definition at line 404 of file shell.cxx.

References SfxRequest::GetArgs(), SfxRequest::GetSlot(), SfxItemSet::HasItem(), and nId.

Referenced by SfxDispatcher::Call_Impl().

◆ IsDesignMode()

virtual bool SfxShell::IsDesignMode ( ) const
inlinevirtual

Definition at line 337 of file shell.hxx.

Referenced by SfxViewFrame::Notify(), and SfxViewFrame::StateReload_Impl().

◆ operator=()

SfxShell & SfxShell::operator= ( const SfxShell )
privatedelete

◆ PutItem()

void SfxShell::PutItem ( const SfxPoolItem rItem)

With this method, any objects of subclasses of <SfxPoolItem> can be made available.

This exchange technology is needed if, for example, special <SfxToolBoxControl> Subclasses need access to certain data such as the <SfxObjectShell>

If a SfxPoolItem exists with the same slot ID, it is deleted automatically.

[Cross-reference]

<SfxShell::RemoveItem(sal_uInt16)> <SfxShell::GetItem(sal_uInt16)>

Definition at line 154 of file shell.cxx.

References SfxBroadcaster::Broadcast(), SfxPoolItem::Clone(), DBG_ASSERT, SfxDispatcher::GetBindings(), GetDispatcher(), SfxBindings::GetStateCache(), SfxItemPool::IsSlot(), pImpl, SfxStateCache::SetCachedState(), SfxStateCache::SetState(), and SfxPoolItem::Which().

◆ SetContextBroadcasterEnabled()

bool SfxShell::SetContextBroadcasterEnabled ( const bool  bIsEnabled)

Enabled or disable the context broadcaster.

Returns the old state.

Definition at line 731 of file shell.cxx.

References bIsEnabled, and pImpl.

◆ SetContextName()

void SfxShell::SetContextName ( const OUString &  rsContextName)

Set the name of the sidebar context that is broadcast on calls to Activation().

Definition at line 703 of file shell.cxx.

References pImpl.

◆ SetDisableFlags()

void SfxShell::SetDisableFlags ( SfxDisableFlags  nFlags)

Definition at line 684 of file shell.cxx.

References pImpl.

Referenced by SfxDispatcher::FlushImpl(), and SfxDispatcher::RemoveShell_Impl().

◆ SetName()

void SfxShell::SetName ( const OUString &  rName)

Sets the name of the Shell object.

With this name, the SfxShell instance of BASIC can be expressed.

Definition at line 114 of file shell.cxx.

References pImpl.

Referenced by SfxObjectShell::DoLoad(), SfxObjectShell::InvalidateName(), SfxApplication::OfaExec_Impl(), SfxObjectShell::SetNamedVisibility_Impl(), SfxObjectShell::SetTitle(), SfxApplication::SfxApplication(), and SfxViewFrame::UpdateTitle().

◆ SetPool()

void SfxShell::SetPool ( SfxItemPool pNewPool)
inline

With this method, the subclasses register their special <SfxItemPool> in the SfxShell.

Each SfxShell instance must have access to a SfxItemPool. Usually this is the SfxItemPool of the SfxDocumentShell. The SfxShell subclass does not take ownership of the orphaned pool. Before it is deleted it has to be deregistered with SetPool(0).

Definition at line 524 of file shell.hxx.

References pPool.

Referenced by SfxModule::Construct_Impl(), SfxViewFrame::Construct_Impl(), SfxApplication::Initialize_Impl(), and SfxViewShell::SfxViewShell().

◆ SetRepeatTarget()

void SfxShell::SetRepeatTarget ( SfxRepeatTarget *  pTarget)

Sets the <SfxRepeatTarget> instance that is used in SID_REPEAT as RepeatTarget, when the current supplied by this <SfxUndoManager> is addressed.

By 'pTarget==0' the SID_REPEAT is disabled for this SfxShell. The instance '*pTarget' must live as long as it is registered.

[Note]

A derivation of <SfxShell> or one of its subclasses of <SfxRepeatTarget> is not recommended, as compiler errors are provoked. (due to Call-to-Pointer-to-Member-Function to the subclass).

Definition at line 229 of file shell.cxx.

References pImpl.

◆ SetUndoManager()

void SfxShell::SetUndoManager ( SfxUndoManager pNewUndoMgr)

Sets a <SfxUndoManager> for this <SfxShell> Instance.

For the undo is only the undo-manager used for SfxShell at the top of the stack of each <SfxDispatcher>.

On the given <SfxUndoManager> is automatically the current Max-Undo-Action-Count setting set from the options.

'pNewUndoMgr' must exist until the Destructor of SfxShell instance is called or until the next 'SetUndoManager()'.

Definition at line 208 of file shell.cxx.

References utl::ConfigManager::IsFuzzing(), pUndoMgr, and SfxUndoManager::SetMaxUndoActionCount().

◆ SetVerbs()

void SfxShell::SetVerbs ( const css::uno::Sequence< css::embed::VerbDescriptor > &  aVerbs)

◆ SetViewShell_Impl()

void SfxShell::SetViewShell_Impl ( SfxViewShell pView)
protected

Definition at line 708 of file shell.cxx.

References pImpl.

Referenced by SfxViewFrame::SetViewShell_Impl().

◆ UIFeatureChanged()

void SfxShell::UIFeatureChanged ( )

◆ VerbExec()

void SfxShell::VerbExec ( SfxRequest rReq)

◆ VerbState()

void SfxShell::VerbState ( SfxItemSet )
static

Definition at line 631 of file shell.cxx.

Referenced by SetVerbs().

Friends And Related Function Documentation

◆ SfxObjectItem

friend class SfxObjectItem
friend

Definition at line 129 of file shell.hxx.

Referenced by SfxViewFrame::Exec_Impl(), and SfxObjectShell::ExecView_Impl().

Member Data Documentation

◆ pImpl

std::unique_ptr< SfxShell_Impl > SfxShell::pImpl
private

◆ pPool

SfxItemPool* SfxShell::pPool
private

Definition at line 132 of file shell.hxx.

Referenced by GetPool(), and SetPool().

◆ pUndoMgr

SfxUndoManager* SfxShell::pUndoMgr
private

Definition at line 133 of file shell.hxx.

Referenced by GetUndoManager(), and SetUndoManager().


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