diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-28 13:50:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:04 +0200 |
commit | 278379697d82e4b4a3204e82fcdababebe2340f3 (patch) | |
tree | ee847794cdd14bbb11e11c5d2269213cdb2719aa /forms | |
parent | 9b07288138228af56e58f50dc6ba50865b52fdfb (diff) |
fdo#46808, Adapt io::Pipe UNO service to new style
Create a merged XPipe interface for this service to implement.
Which is backwards-compatible, but does not require creating a new service.
Change-Id: I682633c6252aab503eb2469c9bd2ba771f10bc4b
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/submission/serialization_app_xml.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/submission/serialization_urlencoded.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/submission/submission_get.cxx | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/forms/source/xforms/submission/serialization_app_xml.cxx b/forms/source/xforms/submission/serialization_app_xml.cxx index 95df07905e7c..6b9e2fb266c7 100644 --- a/forms/source/xforms/submission/serialization_app_xml.cxx +++ b/forms/source/xforms/submission/serialization_app_xml.cxx @@ -31,6 +31,7 @@ #include "serialization_app_xml.hxx" #include <comphelper/processfactory.hxx> +#include <com/sun/star/io/Pipe.hpp> #include <com/sun/star/xml/dom/XNode.hpp> #include <com/sun/star/xml/dom/XDocument.hpp> #include <com/sun/star/xml/dom/XNodeList.hpp> @@ -42,8 +43,7 @@ CSerializationAppXML::CSerializationAppXML() : m_aFactory(comphelper::getProcessServiceFactory()) - , m_aPipe(CSS::uno::Reference< CSS::io::XOutputStream > (m_aFactory->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ), CSS::uno::UNO_QUERY)) + , m_aPipe(CSS::io::Pipe::create(comphelper::getProcessComponentContext()), CSS::uno::UNO_QUERY_THROW) { OSL_ENSURE(m_aPipe.is(), "cannot create Pipe"); } diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index c7866f501bcc..8ba1be433991 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -27,6 +27,7 @@ ************************************************************************/ +#include <com/sun/star/io/Pipe.hpp> #include <com/sun/star/xml/xpath/XPathObjectType.hpp> #include <com/sun/star/xml/dom/XNode.hpp> #include <com/sun/star/xml/dom/XText.hpp> @@ -49,8 +50,7 @@ using namespace CSS::xml::dom; CSerializationURLEncoded::CSerializationURLEncoded() : m_aFactory(comphelper::getProcessServiceFactory()) - , m_aPipe(Reference< XOutputStream > (m_aFactory->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ), UNO_QUERY)) + , m_aPipe(Pipe::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW) { } diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 5dc9194bec66..ed515834bfab 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -36,7 +36,9 @@ #include <rtl/strbuf.hxx> #include <rtl/string.hxx> #include <osl/file.hxx> +#include <comphelper/componentcontext.hxx> #include <ucbhelper/content.hxx> +#include <com/sun/star/io/Pipe.hpp> using namespace CSS::uno; using namespace CSS::ucb; @@ -97,8 +99,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< } OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8); ucbhelper::Content aContent(aQueryURL, aEnvironment); - CSS::uno::Reference< XOutputStream > aPipe(m_aFactory->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))), UNO_QUERY_THROW); + CSS::uno::Reference< XOutputStream > aPipe( CSS::io::Pipe::create(comphelper::ComponentContext(m_aFactory).getUNOContext()), UNO_QUERY_THROW ); aContent.openStream(aPipe); // get reply try { |