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 /forms | |
parent | Updated core (diff) | |
download | core-bb121c864cc3c101ef733a4088c7ba3e36eced14.tar.gz core-bb121c864cc3c101ef733a4088c7ba3e36eced14.zip |
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 'forms')
-rw-r--r-- | forms/source/xforms/submission/replace.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index 1ec494f91b88..f08b3f628a7e 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/xml/dom/XDocument.hpp> #include <com/sun/star/xml/dom/DocumentBuilder.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -49,7 +50,6 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla return CSubmission::UNKNOWN_ERROR; try { - Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); if (aReplace.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("all")) || aReplace.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("document"))) { @@ -58,8 +58,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla xLoader = Reference< XComponentLoader >(aFrame, UNO_QUERY); if (!xLoader.is()) - xLoader = Reference< XComponentLoader >(xFactory->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop") ) ), UNO_QUERY_THROW); + xLoader = Reference< XComponentLoader >( Desktop::create(xContext), UNO_QUERY_THROW); // open the stream from the result... // build media descriptor |