summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/inc/linguistic/misc.hxx5
-rw-r--r--linguistic/source/misc.cxx23
2 files changed, 11 insertions, 17 deletions
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index 32637ab6c90c..3f17f045a705 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -46,7 +46,7 @@ namespace com { namespace sun { namespace star { namespace beans {
}}}}
namespace com { namespace sun { namespace star { namespace frame {
- class XDesktop;
+ class XDesktop2;
}}}}
class LocaleDataWrapper;
@@ -59,7 +59,6 @@ class LocaleDataWrapper;
#define SN_THESAURUS "com.sun.star.linguistic2.Thesaurus"
#define SN_LINGU_PROPERTIES "com.sun.star.linguistic2.LinguProperties"
#define SN_DICTIONARY_LIST "com.sun.star.linguistic2.DictionaryList"
-#define SN_DESKTOP "com.sun.star.frame.Desktop"
namespace linguistic
@@ -168,7 +167,7 @@ class AppExitListener :
>
{
::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XDesktop > xDesktop;
+ ::com::sun::star::frame::XDesktop2 > xDesktop;
public:
AppExitListener();
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 536daf4a933d..d5f237224972 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -12,7 +12,7 @@
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
+ * License, Version 2.0 (the "License"); you may not use this file754
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
@@ -30,7 +30,7 @@
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -743,20 +743,15 @@ AppExitListener::AppExitListener()
{
// add object to Desktop EventListeners in order to properly call
// the AtExit function at appliction exit.
- uno::Reference< XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory() );
+ uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
- if (xMgr.is())
+ try
{
- try
- {
- xDesktop = uno::Reference< frame::XDesktop >(
- xMgr->createInstance( A2OU( SN_DESKTOP ) ), UNO_QUERY );
- }
- catch (uno::Exception &)
- {
- DBG_ASSERT( 0, "createInstance failed" );
- }
+ xDesktop = frame::Desktop::create(xContext);
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_ASSERT( 0, "createInstance failed" );
}
}