LibreOffice Module framework (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
framework::Desktop Class Referencefinal

#include <desktop.hxx>

Inheritance diagram for framework::Desktop:
[legend]
Collaboration diagram for framework::Desktop:
[legend]

Public Member Functions

 Desktop (css::uno::Reference< css::uno::XComponentContext > xContext)
 
virtual ~Desktop () override
 
void constructorInit ()
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (OUString const &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &type) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual sal_Bool SAL_CALL terminate () override
 
virtual void SAL_CALL addTerminateListener (const css::uno::Reference< css::frame::XTerminateListener > &xListener) override
 
virtual void SAL_CALL removeTerminateListener (const css::uno::Reference< css::frame::XTerminateListener > &xListener) override
 
virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getComponents () override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL getCurrentComponent () override
 
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getCurrentFrame () override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL loadComponentFromURL (const OUString &sURL, const OUString &sTargetFrameName, sal_Int32 nSearchFlags, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
 
virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTasks () override
 
virtual css::uno::Reference< css::frame::XTask > SAL_CALL getActiveTask () override
 
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch (const css::util::URL &aURL, const OUString &sTargetFrameName, sal_Int32 nSearchFlags) override
 
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches (const css::uno::Sequence< css::frame::DispatchDescriptor > &lQueries) override
 
virtual void SAL_CALL registerDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &xInterceptor) override
 
virtual void SAL_CALL releaseDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &xInterceptor) override
 
virtual css::uno::Reference< css::frame::XFrames > SAL_CALL getFrames () override
 
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getActiveFrame () override
 
virtual void SAL_CALL setActiveFrame (const css::uno::Reference< css::frame::XFrame > &xFrame) override
 
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL findFrame (const OUString &sTargetFrameName, sal_Int32 nSearchFlags) override
 
virtual void SAL_CALL initialize (const css::uno::Reference< css::awt::XWindow > &xWindow) override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getContainerWindow () override
 
virtual void SAL_CALL setCreator (const css::uno::Reference< css::frame::XFramesSupplier > &xCreator) override
 
virtual css::uno::Reference< css::frame::XFramesSupplier > SAL_CALL getCreator () override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &sName) override
 
virtual sal_Bool SAL_CALL isTop () override
 
virtual void SAL_CALL activate () override
 
virtual void SAL_CALL deactivate () override
 
virtual sal_Bool SAL_CALL isActive () override
 
virtual sal_Bool SAL_CALL setComponent (const css::uno::Reference< css::awt::XWindow > &xComponentWindow, const css::uno::Reference< css::frame::XController > &xController) override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getComponentWindow () override
 
virtual css::uno::Reference< css::frame::XController > SAL_CALL getController () override
 
virtual void SAL_CALL contextChanged () override
 
virtual void SAL_CALL addFrameActionListener (const css::uno::Reference< css::frame::XFrameActionListener > &xListener) override
 
virtual void SAL_CALL removeFrameActionListener (const css::uno::Reference< css::frame::XFrameActionListener > &xListener) override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL dispatchFinished (const css::frame::DispatchResultEvent &aEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &aSource) override
 
virtual void SAL_CALL handle (const css::uno::Reference< css::task::XInteractionRequest > &xRequest) override
 
virtual ::sal_Int32 SAL_CALL leaseNumber (const css::uno::Reference< css::uno::XInterface > &xComponent) override
 
virtual void SAL_CALL releaseNumber (::sal_Int32 nNumber) override
 
virtual void SAL_CALL releaseNumberForComponent (const css::uno::Reference< css::uno::XInterface > &xComponent) override
 
virtual OUString SAL_CALL getUntitledPrefix () override
 
bool terminateQuickstarterToo ()
 
void shutdown ()
 
- Public Member Functions inherited from cppu::OPropertySetHelper
 OPropertySetHelper (OBroadcastHelper &rBHelper)
 
 OPropertySetHelper (OBroadcastHelper &rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring)
 
 OPropertySetHelper (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents, bool bIgnoreRuntimeExceptionsWhileFiring=false)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
css::uno::Sequence< css::uno::Type > getTypes ()
 
void SAL_CALL disposing ()
 
virtual void SAL_CALL setPropertyValue (const ::rtl::OUString &rPropertyName, const css::uno::Any &aValue) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getPropertyValue (const ::rtl::OUString &aPropertyName) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removePropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL addVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removeVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) SAL_OVERRIDE
 
virtual void SAL_CALL setPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
virtual void SAL_CALL firePropertiesChangeEvent (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 

Private Types

typedef ::std::vector< css::uno::Reference< css::frame::XTerminateListener > > TTerminateListenerList
 used temporary to know which listener was already called or not. More...
 

Private Member Functions

virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &aConvertedValue, css::uno::Any &aOldValue, sal_Int32 nHandle, const css::uno::Any &aValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &aValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &aValue, sal_Int32 nHandle) const override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
css::uno::Reference< css::lang::XComponent > impl_getFrameComponent (const css::uno::Reference< css::frame::XFrame > &xFrame) const
 
bool impl_sendQueryTerminationEvent (TTerminateListenerList &lCalledListener)
 calls queryTermination() on every registered termination listener. More...
 
void impl_sendCancelTerminationEvent (const TTerminateListenerList &lCalledListener)
 calls cancelTermination() on every termination listener where queryTermination() was called before. More...
 
void impl_sendTerminateToClipboard ()
 calls notifyTermination() on the clipboard listener More...
 
void impl_sendNotifyTerminationEvent ()
 calls notifyTermination() on every registered termination listener. More...
 
bool impl_closeFrames (bool bAllowUI)
 try to close all open frames. More...
 

Private Attributes

TransactionManager m_aTransactionManager
 
bool m_bIsTerminated
 check flag to protect against multiple terminate runs More...
 
bool m_bIsShutdown
 check flag to protect us against dispose before terminate! see dispose() for further information! More...
 
bool m_bSession
 when true, the call came from session manager the method is Desktop::terminateQuickstarterToo() this the only one place where set this to true In this case, when one frame break, not make question for other, the break of shutdown or logout can be only once. More...
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
FrameContainer m_aChildTaskContainer
 reference to factory, which has create this instance More...
 
comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer
 array of child tasks (children of desktop are tasks; and tasks are also frames - But pure frames are not accepted!) More...
 
css::uno::Reference< css::frame::XFrames > m_xFramesHelper
 container for ALL Listener More...
 
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchHelper
 helper for XFrames, XIndexAccess, XElementAccess and implementation of a childcontainer! More...
 
ELoadState m_eLoadState
 helper to dispatch something for new tasks, created by "_blank"! More...
 
bool m_bSuspendQuickstartVeto
 hold information about state of asynchron loading of component for loadComponentFromURL()! More...
 
std::unique_ptr< SvtCommandOptionsm_xCommandOptions
 don't ask quickstart for a veto More...
 
OUString m_sName
 ref counted class to support disabling commands defined by configuration file More...
 
OUString m_sTitle
 
css::uno::Reference< css::frame::XDispatchRecorderSupplier > m_xDispatchRecorderSupplier
 
css::uno::Reference< css::frame::XTerminateListener > m_xPipeTerminator
 special terminate listener to close pipe and block external requests during/after termination process is/was running More...
 
css::uno::Reference< css::frame::XTerminateListener > m_xQuickLauncher
 special terminate listener shown inside system tray (quick starter) Will hinder the office on shutdown ... but wish to allow closing of open documents. More...
 
css::uno::Reference< css::frame::XTerminateListener > m_xSWThreadManager
 special terminate listener which loads images asynchronous for current open documents. More...
 
css::uno::Reference< css::frame::XTerminateListener > m_xSfxTerminator
 special terminate listener shutting down the SfxApplication. More...
 
css::uno::Reference< css::frame::XUntitledNumbers > m_xTitleNumberGenerator
 
std::vector< css::uno::Reference< css::frame::XTerminateListener > > m_xComponentDllListeners
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Additional Inherited Members

- Static Public Member Functions inherited from cppu::OPropertySetHelper
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo (IPropertyArrayHelper &rProperties)
 
- Protected Member Functions inherited from cppu::OPropertySetHelper
void SAL_CALL fire (sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable)
 
void SAL_CALL setFastPropertyValues (sal_Int32 nSeqLen, sal_Int32 *pHandles, const css::uno::Any *pValues, sal_Int32 nHitCount)
 
virtual IPropertyArrayHelper &SAL_CALL getInfoHelper ()=0
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)=0
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue)=0
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const=0
 
void setDependentFastPropertyValue (sal_Int32 i_handle, const css::uno::Any &i_value)
 
 ~OPropertySetHelper ()
 
- Protected Attributes inherited from cppu::OPropertySetHelper
OBroadcastHelperrBHelper
 
OMultiTypeInterfaceContainerHelperInt32 aBoundLC
 
OMultiTypeInterfaceContainerHelperInt32 aVetoableLC
 
Impl *const m_pReserved
 

Detailed Description

Definition at line 99 of file desktop.hxx.

Member Typedef Documentation

◆ TTerminateListenerList

typedef ::std::vector< css::uno::Reference< css::frame::XTerminateListener > > framework::Desktop::TTerminateListenerList
private

used temporary to know which listener was already called or not.

Definition at line 107 of file desktop.hxx.

Constructor & Destructor Documentation

◆ Desktop()

framework::Desktop::Desktop ( css::uno::Reference< css::uno::XComponentContext >  xContext)

Definition at line 143 of file desktop.cxx.

◆ ~Desktop()

framework::Desktop::~Desktop ( )
overridevirtual

Member Function Documentation

◆ acquire()

virtual void SAL_CALL framework::Desktop::acquire ( )
inlineoverridevirtualnoexcept

Definition at line 126 of file desktop.hxx.

◆ activate()

void SAL_CALL framework::Desktop::activate ( )
overridevirtual

Definition at line 841 of file desktop.cxx.

◆ addEventListener()

void SAL_CALL framework::Desktop::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

◆ addFrameActionListener()

void SAL_CALL framework::Desktop::addFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener > &  xListener)
overridevirtual

Definition at line 880 of file desktop.cxx.

◆ addTerminateListener()

void SAL_CALL framework::Desktop::addTerminateListener ( const css::uno::Reference< css::frame::XTerminateListener > &  xListener)
overridevirtual

◆ constructorInit()

void framework::Desktop::constructorInit ( )

◆ contextChanged()

void SAL_CALL framework::Desktop::contextChanged ( )
overridevirtual

Definition at line 876 of file desktop.cxx.

◆ convertFastPropertyValue()

sal_Bool SAL_CALL framework::Desktop::convertFastPropertyValue ( css::uno::Any &  aConvertedValue,
css::uno::Any &  aOldValue,
sal_Int32  nHandle,
const css::uno::Any &  aValue 
)
overrideprivatevirtual

◆ deactivate()

void SAL_CALL framework::Desktop::deactivate ( )
overridevirtual

Definition at line 848 of file desktop.cxx.

◆ dispatchFinished()

void SAL_CALL framework::Desktop::dispatchFinished ( const css::frame::DispatchResultEvent &  aEvent)
overridevirtual

last target of "loadComponentFromURL()"!

Definition at line 1154 of file desktop.cxx.

References aEvent, framework::E_FAILED, framework::E_HARDEXCEPTIONS, framework::E_INTERACTION, framework::E_SUCCESSFUL, m_aTransactionManager, and m_eLoadState.

◆ disposing() [1/2]

void SAL_CALL framework::Desktop::disposing ( )
overridevirtual

◆ disposing() [2/2]

void SAL_CALL framework::Desktop::disposing ( const css::lang::EventObject &  aSource)
overridevirtual

Definition at line 1181 of file desktop.cxx.

References SAL_WARN.

◆ findFrame()

css::uno::Reference< css::frame::XFrame > SAL_CALL framework::Desktop::findFrame ( const OUString &  sTargetFrameName,
sal_Int32  nSearchFlags 
)
overridevirtual

◆ getActiveFrame()

css::uno::Reference< css::frame::XFrame > SAL_CALL framework::Desktop::getActiveFrame ( )
overridevirtual

◆ getActiveTask()

css::uno::Reference< css::frame::XTask > SAL_CALL framework::Desktop::getActiveTask ( )
overridevirtual

Definition at line 639 of file desktop.cxx.

References SAL_INFO.

◆ getComponents()

css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL framework::Desktop::getComponents ( )
overridevirtual

Definition at line 469 of file desktop.cxx.

References framework::E_HARDEXCEPTIONS, and m_aTransactionManager.

◆ getComponentWindow()

css::uno::Reference< css::awt::XWindow > SAL_CALL framework::Desktop::getComponentWindow ( )
overridevirtual

Definition at line 866 of file desktop.cxx.

◆ getContainerWindow()

css::uno::Reference< css::awt::XWindow > SAL_CALL framework::Desktop::getContainerWindow ( )
overridevirtual

Definition at line 810 of file desktop.cxx.

◆ getController()

css::uno::Reference< css::frame::XController > SAL_CALL framework::Desktop::getController ( )
overridevirtual

Definition at line 871 of file desktop.cxx.

◆ getCreator()

css::uno::Reference< css::frame::XFramesSupplier > SAL_CALL framework::Desktop::getCreator ( )
overridevirtual

Definition at line 819 of file desktop.cxx.

◆ getCurrentComponent()

css::uno::Reference< css::lang::XComponent > SAL_CALL framework::Desktop::getCurrentComponent ( )
overridevirtual

◆ getCurrentFrame()

css::uno::Reference< css::frame::XFrame > SAL_CALL framework::Desktop::getCurrentFrame ( )
overridevirtual

Definition at line 527 of file desktop.cxx.

References framework::E_HARDEXCEPTIONS, getActiveFrame(), and m_aTransactionManager.

Referenced by getCurrentComponent().

◆ getFastPropertyValue()

void SAL_CALL framework::Desktop::getFastPropertyValue ( css::uno::Any &  aValue,
sal_Int32  nHandle 
) const
overrideprivatevirtual

◆ getFrames()

css::uno::Reference< css::frame::XFrames > SAL_CALL framework::Desktop::getFrames ( )
overridevirtual

Definition at line 743 of file desktop.cxx.

References framework::E_HARDEXCEPTIONS, m_aTransactionManager, and m_xFramesHelper.

◆ getImplementationName()

OUString SAL_CALL framework::Desktop::getImplementationName ( )
overridevirtual

Definition at line 73 of file desktop.cxx.

◆ getInfoHelper()

cppu::IPropertyArrayHelper &SAL_CALL framework::Desktop::getInfoHelper ( )
overrideprivatevirtual

Implements cppu::OPropertySetHelper.

Definition at line 1430 of file desktop.cxx.

References cppu::UnoType< typename T >::get().

Referenced by getPropertySetInfo().

◆ getName()

OUString SAL_CALL framework::Desktop::getName ( )
overridevirtual

Definition at line 824 of file desktop.cxx.

References m_sName.

◆ getPropertySetInfo()

css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL framework::Desktop::getPropertySetInfo ( )
overrideprivatevirtual

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL framework::Desktop::getSupportedServiceNames ( )
overridevirtual

Definition at line 83 of file desktop.cxx.

◆ getTasks()

css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL framework::Desktop::getTasks ( )
overridevirtual

Definition at line 617 of file desktop.cxx.

References SAL_INFO.

◆ getTypes()

css::uno::Sequence< css::uno::Type > SAL_CALL framework::Desktop::getTypes ( )
overridevirtual

◆ getUntitledPrefix()

OUString SAL_CALL framework::Desktop::getUntitledPrefix ( )
overridevirtual

◆ handle()

void SAL_CALL framework::Desktop::handle ( const css::uno::Reference< css::task::XInteractionRequest > &  xRequest)
overridevirtual

◆ impl_closeFrames()

bool framework::Desktop::impl_closeFrames ( bool  bAllowUI)
private

try to close all open frames.

Iterates over all child frames and try to close them. Given parameter bAllowUI enable/disable showing any UI (which mostly occur on calling XController->suspend()).

This method doesn't stop if one frame could not be closed. It will ignore such frames and try all other ones. But it returns false in such case - true otherwise.

Parameters
bAllowUIenable/disable showing of UI.
Returns
true if all frames could be closed; false otherwise.

Definition at line 1661 of file desktop.cxx.

References framework::FrameContainer::getAllElements(), i, m_aChildTaskContainer, m_bSession, xController, and xFrame.

Referenced by terminate().

◆ impl_getFrameComponent()

css::uno::Reference< css::lang::XComponent > framework::Desktop::impl_getFrameComponent ( const css::uno::Reference< css::frame::XFrame > &  xFrame) const
private

Definition at line 1504 of file desktop.cxx.

References framework::E_HARDEXCEPTIONS, m_aTransactionManager, xController, xFrame, and xModel.

Referenced by getCurrentComponent().

◆ impl_sendCancelTerminationEvent()

void framework::Desktop::impl_sendCancelTerminationEvent ( const TTerminateListenerList lCalledListener)
private

calls cancelTermination() on every termination listener where queryTermination() was called before.

Note: Only normal termination listener (registered in list m_aListenerContainer will be recognized here. Special listener like quick starter, pipe or others has to be handled explicitly !

Parameters
[in]lCalledListenerevery listener in this list was called within its method queryTermination() before.
See also
impl_sendQueryTerminationEvent()

Definition at line 1576 of file desktop.cxx.

References aEvent, framework::E_HARDEXCEPTIONS, and m_aTransactionManager.

Referenced by terminate().

◆ impl_sendNotifyTerminationEvent()

void framework::Desktop::impl_sendNotifyTerminationEvent ( )
private

calls notifyTermination() on every registered termination listener.

Note: Only normal termination listener (registered in list m_aListenerContainer will be recognized here. Special listener like quick starter, pipe or others has to be handled explicitly !

Definition at line 1634 of file desktop.cxx.

References aEvent, framework::E_HARDEXCEPTIONS, comphelper::OMultiTypeInterfaceContainerHelper2::getContainer(), comphelper::OInterfaceIteratorHelper2::hasMoreElements(), m_aListenerContainer, m_aTransactionManager, comphelper::OInterfaceIteratorHelper2::next(), and comphelper::OInterfaceIteratorHelper2::remove().

Referenced by terminate().

◆ impl_sendQueryTerminationEvent()

bool framework::Desktop::impl_sendQueryTerminationEvent ( Desktop::TTerminateListenerList lCalledListener)
private

calls queryTermination() on every registered termination listener.

Note: Only normal termination listener (registered in list m_aListenerContainer will be recognized here. Special listener like quick starter, pipe or others has to be handled explicitly !

Parameters
[out]lCalledListenerevery called listener will be returned here. Those list will be used to inform all called listener about cancel this termination request.
Returns
true if no one vetoed the termination.
See also
impl_sendCancelTerminationEvent()

Definition at line 1538 of file desktop.cxx.

References aEvent, framework::E_HARDEXCEPTIONS, comphelper::OMultiTypeInterfaceContainerHelper2::getContainer(), comphelper::OInterfaceIteratorHelper2::hasMoreElements(), m_aListenerContainer, m_aTransactionManager, comphelper::OInterfaceIteratorHelper2::next(), and comphelper::OInterfaceIteratorHelper2::remove().

Referenced by terminate().

◆ impl_sendTerminateToClipboard()

void framework::Desktop::impl_sendTerminateToClipboard ( )
private

calls notifyTermination() on the clipboard listener

The system clipboard may decide that it wants copies in several formats of the clipboard content requiring nearly all the services

Definition at line 1596 of file desktop.cxx.

References aEvent, framework::E_HARDEXCEPTIONS, comphelper::OMultiTypeInterfaceContainerHelper2::getContainer(), comphelper::OInterfaceIteratorHelper2::hasMoreElements(), m_aListenerContainer, m_aTransactionManager, comphelper::OInterfaceIteratorHelper2::next(), and comphelper::OInterfaceIteratorHelper2::remove().

Referenced by terminate().

◆ initialize()

void SAL_CALL framework::Desktop::initialize ( const css::uno::Reference< css::awt::XWindow > &  xWindow)
overridevirtual

Definition at line 806 of file desktop.cxx.

◆ isActive()

sal_Bool SAL_CALL framework::Desktop::isActive ( )
overridevirtual

Definition at line 855 of file desktop.cxx.

◆ isTop()

sal_Bool SAL_CALL framework::Desktop::isTop ( )
overridevirtual

Definition at line 836 of file desktop.cxx.

◆ leaseNumber()

sal_Int32 SAL_CALL framework::Desktop::leaseNumber ( const css::uno::Reference< css::uno::XInterface > &  xComponent)
override

◆ loadComponentFromURL()

css::uno::Reference< css::lang::XComponent > SAL_CALL framework::Desktop::loadComponentFromURL ( const OUString &  sURL,
const OUString &  sTargetFrameName,
sal_Int32  nSearchFlags,
const css::uno::Sequence< css::beans::PropertyValue > &  lArguments 
)
overridevirtual

◆ queryDispatch()

css::uno::Reference< css::frame::XDispatch > SAL_CALL framework::Desktop::queryDispatch ( const css::util::URL &  aURL,
const OUString &  sTargetFrameName,
sal_Int32  nSearchFlags 
)
overridevirtual

◆ queryDispatches()

css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL framework::Desktop::queryDispatches ( const css::uno::Sequence< css::frame::DispatchDescriptor > &  lQueries)
overridevirtual

◆ queryInterface()

css::uno::Any SAL_CALL framework::Desktop::queryInterface ( const css::uno::Type &  type)
overridevirtual

Reimplemented from cppu::OPropertySetHelper.

Definition at line 169 of file desktop.cxx.

◆ registerDispatchProviderInterceptor()

void SAL_CALL framework::Desktop::registerDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  xInterceptor)
overridevirtual

◆ release()

virtual void SAL_CALL framework::Desktop::release ( )
inlineoverridevirtualnoexcept

Definition at line 128 of file desktop.hxx.

◆ releaseDispatchProviderInterceptor()

void SAL_CALL framework::Desktop::releaseDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  xInterceptor)
overridevirtual

◆ releaseNumber()

void SAL_CALL framework::Desktop::releaseNumber ( ::sal_Int32  nNumber)
overridevirtual

◆ releaseNumberForComponent()

void SAL_CALL framework::Desktop::releaseNumberForComponent ( const css::uno::Reference< css::uno::XInterface > &  xComponent)
overridevirtual

◆ removeEventListener()

void SAL_CALL framework::Desktop::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

◆ removeFrameActionListener()

void SAL_CALL framework::Desktop::removeFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener > &  xListener)
overridevirtual

Definition at line 885 of file desktop.cxx.

◆ removeTerminateListener()

void SAL_CALL framework::Desktop::removeTerminateListener ( const css::uno::Reference< css::frame::XTerminateListener > &  xListener)
overridevirtual

◆ setActiveFrame()

void SAL_CALL framework::Desktop::setActiveFrame ( const css::uno::Reference< css::frame::XFrame > &  xFrame)
overridevirtual

◆ setComponent()

sal_Bool SAL_CALL framework::Desktop::setComponent ( const css::uno::Reference< css::awt::XWindow > &  xComponentWindow,
const css::uno::Reference< css::frame::XController > &  xController 
)
overridevirtual

Definition at line 860 of file desktop.cxx.

◆ setCreator()

void SAL_CALL framework::Desktop::setCreator ( const css::uno::Reference< css::frame::XFramesSupplier > &  xCreator)
overridevirtual

Definition at line 815 of file desktop.cxx.

◆ setFastPropertyValue_NoBroadcast()

void SAL_CALL framework::Desktop::setFastPropertyValue_NoBroadcast ( sal_Int32  nHandle,
const css::uno::Any &  aValue 
)
overrideprivatevirtual

◆ setName()

void SAL_CALL framework::Desktop::setName ( const OUString &  sName)
overridevirtual

Definition at line 830 of file desktop.cxx.

References m_sName, and sName.

◆ shutdown()

void framework::Desktop::shutdown ( )

◆ supportsService()

sal_Bool SAL_CALL framework::Desktop::supportsService ( OUString const &  ServiceName)
overridevirtual

Definition at line 78 of file desktop.cxx.

References ServiceName, and cppu::supportsService().

◆ terminate()

sal_Bool SAL_CALL framework::Desktop::terminate ( )
overridevirtual

◆ terminateQuickstarterToo()

bool framework::Desktop::terminateQuickstarterToo ( )
Exceptions
css::uno::RuntimeException

Definition at line 361 of file desktop.cxx.

References m_bSession, m_xQuickLauncher, and terminate().

Member Data Documentation

◆ m_aChildTaskContainer

FrameContainer framework::Desktop::m_aChildTaskContainer
private

reference to factory, which has create this instance

Definition at line 397 of file desktop.hxx.

Referenced by constructorInit(), disposing(), findFrame(), getActiveFrame(), getFastPropertyValue(), impl_closeFrames(), and setActiveFrame().

◆ m_aListenerContainer

comphelper::OMultiTypeInterfaceContainerHelper2 framework::Desktop::m_aListenerContainer
private

array of child tasks (children of desktop are tasks; and tasks are also frames - But pure frames are not accepted!)

Definition at line 398 of file desktop.hxx.

Referenced by addEventListener(), addTerminateListener(), disposing(), impl_sendNotifyTerminationEvent(), impl_sendQueryTerminationEvent(), impl_sendTerminateToClipboard(), removeEventListener(), and removeTerminateListener().

◆ m_aTransactionManager

TransactionManager framework::Desktop::m_aTransactionManager
mutableprivate

◆ m_bIsShutdown

bool framework::Desktop::m_bIsShutdown
private

check flag to protect us against dispose before terminate! see dispose() for further information!

Definition at line 383 of file desktop.hxx.

Referenced by disposing(), shutdown(), terminate(), and ~Desktop().

◆ m_bIsTerminated

bool framework::Desktop::m_bIsTerminated
private

check flag to protect against multiple terminate runs

Definition at line 378 of file desktop.hxx.

Referenced by terminate().

◆ m_bSession

bool framework::Desktop::m_bSession
private

when true, the call came from session manager the method is Desktop::terminateQuickstarterToo() this the only one place where set this to true In this case, when one frame break, not make question for other, the break of shutdown or logout can be only once.

In Desktop::impl_closeFrames would be test and break the loop and reset to false

Definition at line 394 of file desktop.hxx.

Referenced by impl_closeFrames(), and terminateQuickstarterToo().

◆ m_bSuspendQuickstartVeto

bool framework::Desktop::m_bSuspendQuickstartVeto
private

hold information about state of asynchron loading of component for loadComponentFromURL()!

Definition at line 402 of file desktop.hxx.

Referenced by convertFastPropertyValue(), getFastPropertyValue(), setFastPropertyValue_NoBroadcast(), and terminate().

◆ m_eLoadState

ELoadState framework::Desktop::m_eLoadState
private

helper to dispatch something for new tasks, created by "_blank"!

Definition at line 401 of file desktop.hxx.

Referenced by dispatchFinished(), and handle().

◆ m_sName

OUString framework::Desktop::m_sName
private

ref counted class to support disabling commands defined by configuration file

Definition at line 404 of file desktop.hxx.

Referenced by findFrame(), getName(), and setName().

◆ m_sTitle

OUString framework::Desktop::m_sTitle
private

◆ m_xCommandOptions

std::unique_ptr<SvtCommandOptions> framework::Desktop::m_xCommandOptions
private

don't ask quickstart for a veto

Definition at line 403 of file desktop.hxx.

Referenced by disposing(), and queryDispatch().

◆ m_xComponentDllListeners

std::vector<css::uno::Reference<css::frame::XTerminateListener> > framework::Desktop::m_xComponentDllListeners
private

Definition at line 446 of file desktop.hxx.

Referenced by addTerminateListener(), disposing(), removeTerminateListener(), and shutdown().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > framework::Desktop::m_xContext
private

Definition at line 396 of file desktop.hxx.

Referenced by constructorInit(), disposing(), findFrame(), and loadComponentFromURL().

◆ m_xDispatchHelper

css::uno::Reference< css::frame::XDispatchProvider > framework::Desktop::m_xDispatchHelper
private

helper for XFrames, XIndexAccess, XElementAccess and implementation of a childcontainer!

Definition at line 400 of file desktop.hxx.

Referenced by constructorInit(), disposing(), queryDispatch(), queryDispatches(), registerDispatchProviderInterceptor(), and releaseDispatchProviderInterceptor().

◆ m_xDispatchRecorderSupplier

css::uno::Reference< css::frame::XDispatchRecorderSupplier > framework::Desktop::m_xDispatchRecorderSupplier
private

◆ m_xFramesHelper

css::uno::Reference< css::frame::XFrames > framework::Desktop::m_xFramesHelper
private

container for ALL Listener

Definition at line 399 of file desktop.hxx.

Referenced by constructorInit(), disposing(), and getFrames().

◆ m_xPipeTerminator

css::uno::Reference< css::frame::XTerminateListener > framework::Desktop::m_xPipeTerminator
private

special terminate listener to close pipe and block external requests during/after termination process is/was running

Definition at line 411 of file desktop.hxx.

Referenced by addTerminateListener(), disposing(), removeTerminateListener(), and terminate().

◆ m_xQuickLauncher

css::uno::Reference< css::frame::XTerminateListener > framework::Desktop::m_xQuickLauncher
private

special terminate listener shown inside system tray (quick starter) Will hinder the office on shutdown ... but wish to allow closing of open documents.

And because that's different to a normal terminate listener it has to be handled special .-)

Definition at line 418 of file desktop.hxx.

Referenced by addTerminateListener(), disposing(), removeTerminateListener(), terminate(), and terminateQuickstarterToo().

◆ m_xSfxTerminator

css::uno::Reference< css::frame::XTerminateListener > framework::Desktop::m_xSfxTerminator
private

special terminate listener shutting down the SfxApplication.

Because these desktop instance closes documents and informs listener only... it does not really shutdown the whole application.

Btw: that wouldn't be possible by design... because Desktop.terminate() has to return a boolean value about success... it can't really shutdown the process .-)

So we uses a trick: a special listener (exactly these one here) listen for notifyTermination() and shutdown the process asynchronous. But desktop has to make this special notification as really last one ... Otherwise it can happen that asynchronous shutdown will be faster then all other code around Desktop.terminate() .-))

Definition at line 442 of file desktop.hxx.

Referenced by addTerminateListener(), disposing(), removeTerminateListener(), shutdown(), and terminate().

◆ m_xSWThreadManager

css::uno::Reference< css::frame::XTerminateListener > framework::Desktop::m_xSWThreadManager
private

special terminate listener which loads images asynchronous for current open documents.

Because internally it uses blocking system APIs... it can't be guaranteed that running jobs can be cancelled successfully if the corresponding document will be closed... it will not hinder those documents on closing. Instead it let all jobs running... but at least on terminate we have to wait for all those blocked requests. So these implementation must be a special terminate listener too .-(

Definition at line 427 of file desktop.hxx.

Referenced by addTerminateListener(), disposing(), removeTerminateListener(), and terminate().

◆ m_xTitleNumberGenerator

css::uno::Reference< css::frame::XUntitledNumbers > framework::Desktop::m_xTitleNumberGenerator
private

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