diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-22 17:49:31 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-11 11:28:55 +0100 |
commit | 72139db6b421fea2980e9c8df96bc70463777623 (patch) | |
tree | 91f250ac48c73f9a4dbe308fff4049058af3483e /desktop/source | |
parent | 0d0abfaae9feadf9c4c4c4232f888ba0a1883029 (diff) |
fwk: Constructor feature for one instance SessionListener.
Converted as usual service implementation.
Change-Id: I37c2f25e8a463abb236753c1299cc0aeb3007cd9
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/app.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 74f965054d29..d09e22baf9c8 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2358,23 +2358,15 @@ void Desktop::OpenClients() try { // specifies whether the UI-interaction on Session shutdown is allowed - sal_Bool bAllowUI = isUIOnSessionShutdownAllowed(); - - xSessionListener = SessionListener::createWithOnQuitFlag(::comphelper::getProcessComponentContext(), bAllowUI); - -// css::beans::NamedValue aProperty( OUString( "AllowUserInteractionOnQuit" ), - // css::uno::makeAny( bAllowUI ) ); - // css::uno::Sequence< css::uno::Any > aArgs( 1 ); - // aArgs[0] <<= aProperty; - - // xSessionListener->initialize( aArgs ); + xSessionListener = SessionListener::createWithOnQuitFlag( + ::comphelper::getProcessComponentContext(), isUIOnSessionShutdownAllowed()); } catch(const com::sun::star::uno::Exception& e) { SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message); } - if ( !bExistsRecoveryData ) + if ( !bExistsRecoveryData && xSessionListener.is() ) { // session management try |