summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-14 12:58:00 +0200
committerNoel Grandin <noel@peralex.com>2012-12-21 10:57:09 +0200
commitbb121c864cc3c101ef733a4088c7ba3e36eced14 (patch)
tree2d528ca830aace6e563b7cdc93eb8f8d6c4f70cf /linguistic
parent6d818ed651aaafcfb12ebc21449d35947d2e85a9 (diff)
fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface because it introduced method name conflicts (addEventListener). Shouldn't be an issue since it was scheduled to be dropped anyhow, and the service implementation still implements it, so existing clients will be fine. I dropped the interface XPropertySet from the combined IDL because nobody seems to be using it, and it's primary purpose appears to be to set weird flags. I dropped the optional interfaces XStatusIndicatorFactory XDispatchInformationProvider from the combined IDL because the service does not implement them, and nobody seems to be using them. I suspect they were mistakenly copied from XFrame. I also did not convert the Title, UserDefinedAttributes and LayoutManager properties to attributes, again because no-one is using them. Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
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" );
}
}