class FWK_DLLPUBLIC Desktop final : private cppu::BaseMutex, public Desktop_BASE, public cppu::OPropertySetHelper
{ // internal used types, const etcpp. private:
/** used temporary to know which listener was already called or not. */ typedef ::std::vector< css::uno::Reference< css::frame::XTerminateListener > > TTerminateListenerList;
// we need this wrapped terminate()-call to terminate even the QuickStarter // non-virtual and non-UNO for now /// @throws css::uno::RuntimeException bool terminateQuickstarterToo();
/** calls notifyTermination() on the clipboard listener * *Thesystemclipboardmaydecidethatitwantscopies *inseveralformatsoftheclipboardcontentrequiring *nearlyalltheservices *
*/ void impl_sendTerminateToClipboard();
/** calls notifyTermination() on every registered termination listener. * *Note:Onlynormalterminationlistener(registeredinlistm_aListenerContainer *willberecognizedhere.Speciallistenerlikequickstarter,pipeorothers *hastobehandledexplicitly!
*/ void impl_sendNotifyTerminationEvent();
/** try to close all open frames. * *Iteratesoverallchildframesandtrytoclosethem. *GivenparameterbAllowUIenable/disableshowinganyUI *(whichmostlyoccuroncallingXController->suspend()). * *Thismethoddoesn'tstopifoneframecouldnotbeclosed. *Itwillignoresuchframesandtryallotherones. *Butitreturnsfalseinsuchcase-trueotherwise. * *@parambAllowUI *enable/disableshowingofUI. * *@returntrueifallframescouldbeclosed;falseotherwise.
*/ bool impl_closeFrames(bool bAllowUI);
private:
mutable TransactionManager m_aTransactionManager;
/** check flag to protect against multiple terminate runs
*/ bool m_bIsTerminated;
/** check flag to protect us against dispose before terminate! *seedispose()forfurtherinformation!
*/ bool m_bIsShutdown;
/** when true, the call came from session manager *themethodisDesktop::terminateQuickstarterToo() *thistheonlyoneplacewheresetthistotrue *Inthiscase,whenoneframebreak,notmake *questionforother,thebreakofshutdownorlogout *canbeonlyonce. *InDesktop::impl_closeFrameswouldbetestandbreak *theloopandresettofalse
*/ bool m_bSession;
css::uno::Reference< css::uno::XComponentContext > m_xContext; /// reference to factory, which has create this instance
FrameContainer m_aChildTaskContainer; /// array of child tasks (children of desktop are tasks; and tasks are also frames - But pure frames are not accepted!)
comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer; /// container for ALL Listener
rtl::Reference< OFrames > m_xFramesHelper; /// helper for XFrames, XIndexAccess, XElementAccess and implementation of a childcontainer!
rtl::Reference< InterceptionHelper > m_xDispatchHelper; /// helper to dispatch something for new tasks, created by "_blank"!
ELoadState m_eLoadState; /// hold information about state of asynchron loading of component for loadComponentFromURL()! bool m_bSuspendQuickstartVeto; /// don't ask quickstart for a veto
std::unique_ptr<SvtCommandOptions> m_xCommandOptions; /// ref counted class to support disabling commands defined by configuration file
OUString m_sName;
OUString m_sTitle;
css::uno::Reference< css::frame::XDispatchRecorderSupplier > m_xDispatchRecorderSupplier;
/** special terminate listener to close pipe and block external requests *during/afterterminationprocessis/wasrunning
*/
css::uno::Reference< css::frame::XTerminateListener > m_xPipeTerminator;
/** special terminate listener shown inside system tray (quick starter) *Willhindertheofficeonshutdown...butwishtoallowclosing *ofopendocuments.Andbecausethat'sdifferenttoanormalterminatelistener *ithastobehandledspecial.-)
*/
css::uno::Reference< css::frame::XTerminateListener > m_xQuickLauncher;
/** special terminate listener which loads images asynchronous for current open documents. *BecauseinternallyitusesblockingsystemAPIs...itcan'tbeguaranteedthat *runningjobscanbecancelledsuccessfullyifthecorrespondingdocumentwillbeclosed... *itwillnothinderthosedocumentsonclosing.Insteaditletalljobsrunning... *butatleastonterminatewehavetowaitforallthoseblockedrequests. *Sotheseimplementationmustbeaspecialterminatelistenertoo.-(
*/
css::uno::Reference< css::frame::XTerminateListener > m_xSWThreadManager;
/** special terminate listener shutting down the SfxApplication. *Becausethesedesktopinstanceclosesdocumentsandinformslistener *only...itdoesnotreallyshutdownthewholeapplication. * *Btw:thatwouldn'tbepossiblebydesign...becauseDesktop.terminate() *hastoreturnabooleanvalueaboutsuccess...itcan'treallyshutdownthe *process.-) * *Soweusesatrick:aspeciallistener(exactlytheseonehere)listenfornotifyTermination() *andshutdowntheprocessasynchronous.Butdesktophastomakethisspecial *notificationasreallylastone...Otherwiseitcanhappenthatasynchronous *shutdownwillbefasterthenallothercodearoundDesktop.terminate().-))
*/
css::uno::Reference< css::frame::XTerminateListener > m_xSfxTerminator;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.