From bb121c864cc3c101ef733a4088c7ba3e36eced14 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 14 Dec 2012 12:58:00 +0200 Subject: 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 --- linguistic/inc/linguistic/misc.hxx | 5 ++--- linguistic/source/misc.cxx | 23 +++++++++-------------- 2 files changed, 11 insertions(+), 17 deletions(-) (limited to 'linguistic') 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 #include #include -#include +#include #include #include @@ -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" ); } } -- cgit