diff options
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/eventdlg.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 8887adc4bbec..55381f5cefe1 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -29,6 +29,7 @@ #include <svtools/svmedit.hxx> #include <tools/diagnose_ex.h> #include <com/sun/star/document/XEventsSupplier.hpp> +#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> #include <com/sun/star/frame/XModuleManager.hpp> #include <comphelper/processfactory.hxx> @@ -91,20 +92,15 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, uno::Reference< document::XEventsSupplier > xSupplier; xSupplier = uno::Reference< document::XEventsSupplier > ( - ::comphelper::getProcessServiceFactory()->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.frame.GlobalEventBroadcaster" )) ), - uno::UNO_QUERY ); + frame::GlobalEventBroadcaster::create(::comphelper::getProcessComponentContext()), + uno::UNO_QUERY_THROW ); sal_uInt16 nPos(0); - if ( xSupplier.is() ) - { - m_xAppEvents = xSupplier->getEvents(); - nPos = aSaveInListBox.InsertEntry( - utl::ConfigManager::getProductName() ); - aSaveInListBox.SetEntryData( nPos, new bool(true) ); - aSaveInListBox.SelectEntryPos( nPos, sal_True ); - } + m_xAppEvents = xSupplier->getEvents(); + nPos = aSaveInListBox.InsertEntry( + utl::ConfigManager::getProductName() ); + aSaveInListBox.SetEntryData( nPos, new bool(true) ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); } // ----------------------------------------------------------------------- |