summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-08 08:18:58 +0200
committerNoel Grandin <noel@peralex.com>2013-01-15 09:56:01 +0200
commit54f141882400731e75d25ac137fa516d9093f4fc (patch)
treec79e464168f2faa59a561bbb670d8525df21763b /desktop
parent92f14ced5e6f613772792d863a8c2cfeddfdae04 (diff)
fdo#46808, Adapt frame::SessionListener UNO service to new style
The service already existed, it just did not have an IDL file. Change-Id: I88b914995eaa52708c1d51271455478fedb65a63
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index fc8248b65de9..96010c91bf9d 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -36,6 +36,7 @@
#include <svtools/javacontext.hxx>
#include <com/sun/star/frame/AutoRecovery.hpp>
#include <com/sun/star/frame/GlobalEventBroadcaster.hpp>
+#include <com/sun/star/frame/SessionListener.hpp>
#include <com/sun/star/frame/XSessionManagerListener.hpp>
#include <com/sun/star/frame/XSynchronousDispatch.hpp>
#include <com/sun/star/frame/PopupMenuControllerFactory.hpp>
@@ -2325,20 +2326,20 @@ void Desktop::OpenClients()
}
}
- Reference< XInitialization > xSessionListener;
+ Reference< XSessionManagerListener2 > xSessionListener;
try
{
- xSessionListener = Reference< XInitialization >(::comphelper::getProcessServiceFactory()->createInstance(
- OUString("com.sun.star.frame.SessionListener")), UNO_QUERY_THROW);
-
// specifies whether the UI-interaction on Session shutdown is allowed
sal_Bool bAllowUI = isUIOnSessionShutdownAllowed();
- css::beans::NamedValue aProperty( ::rtl::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(), bAllowUI);
+
+// css::beans::NamedValue aProperty( ::rtl::OUString( "AllowUserInteractionOnQuit" ),
+ // css::uno::makeAny( bAllowUI ) );
+ // css::uno::Sequence< css::uno::Any > aArgs( 1 );
+ // aArgs[0] <<= aProperty;
+
+ // xSessionListener->initialize( aArgs );
}
catch(const com::sun::star::uno::Exception& e)
{