diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-14 12:58:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-21 10:57:09 +0200 |
commit | bb121c864cc3c101ef733a4088c7ba3e36eced14 (patch) | |
tree | 2d528ca830aace6e563b7cdc93eb8f8d6c4f70cf /framework/source/loadenv | |
parent | 6d818ed651aaafcfb12ebc21449d35947d2e85a9 (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 'framework/source/loadenv')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 78bc67c8c42f..0b5f95db11a1 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -50,6 +50,7 @@ #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/awt/XWindow2.hpp> #include <com/sun/star/awt/XTopWindow.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XFrameLoader.hpp> #include <com/sun/star/frame/XSynchronousFrameLoader.hpp> @@ -972,7 +973,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() aVal >>= nMaxOpenDocuments; css::uno::Reference< css::frame::XFramesSupplier > xDesktop( - xSMGR->createInstance(SERVICENAME_DESKTOP), + css::frame::Desktop::create( comphelper::getComponentContext(xSMGR)), css::uno::UNO_QUERY_THROW); FrameListAnalyzer aAnalyzer(xDesktop, @@ -1295,7 +1296,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // otherwhise - iterate through the tasks of the desktop container // to find out, which of them might contains the requested document - css::uno::Reference< css::frame::XFramesSupplier > xSupplier(m_xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY); + css::uno::Reference< css::frame::XDesktop2 > xSupplier = css::frame::Desktop::create( comphelper::getComponentContext(m_xSMGR) ); css::uno::Reference< css::container::XIndexAccess > xTaskList(xSupplier->getFrames() , css::uno::UNO_QUERY); if (!xTaskList.is()) @@ -1436,7 +1437,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() if (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN(), sal_False) == sal_True) return css::uno::Reference< css::frame::XFrame >(); - css::uno::Reference< css::frame::XFramesSupplier > xSupplier(m_xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY); + css::uno::Reference< css::frame::XFramesSupplier > xSupplier( css::frame::Desktop::create( comphelper::getComponentContext(m_xSMGR) ), css::uno::UNO_QUERY); FrameListAnalyzer aTasksAnalyzer(xSupplier, css::uno::Reference< css::frame::XFrame >(), FrameListAnalyzer::E_BACKINGCOMPONENT); if (aTasksAnalyzer.m_xBackingComponent.is()) { |