[PATCH 05/12] RTL_CONSTASCII_USTRINGPARAM in components .. submission
pjacquod
pjacquod at alumni.ethz.ch
Mon Nov 15 14:52:56 PST 2010
components/forms/source/xforms/submission should be OK now
---
forms/source/xforms/submission/replace.cxx | 18 ++++++++----------
.../xforms/submission/serialization_app_xml.cxx | 2 +-
.../xforms/submission/serialization_urlencoded.cxx | 2 +-
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index 3523059..dc0f0d0 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -67,19 +67,18 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
if (!xLoader.is())
xLoader = Reference< XComponentLoader >(xFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY_THROW);
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop") ) ), UNO_QUERY_THROW);
// open the stream from the result...
// build media descriptor
Sequence< PropertyValue > descriptor(2);
- descriptor[0] = PropertyValue(::rtl::OUString::createFromAscii(
- "InputStream"), -1, makeAny(m_aResultStream), PropertyState_DIRECT_VALUE);
- descriptor[1] = PropertyValue(::rtl::OUString::createFromAscii(
- "ReadOnly"), -1, makeAny(sal_True), PropertyState_DIRECT_VALUE);
+ descriptor[0] = PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream") ),
+ -1, makeAny(m_aResultStream), PropertyState_DIRECT_VALUE);
+ descriptor[1] = PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ),
+ -1, makeAny(sal_True), PropertyState_DIRECT_VALUE);
- //::rtl::OUString aURL = ::rtl::OUString::createFromAscii("private:stream");
::rtl::OUString aURL = m_aURLObj.GetMainURL(INetURLObject::NO_DECODE);
- ::rtl::OUString aTarget = ::rtl::OUString::createFromAscii("_default");
+ ::rtl::OUString aTarget = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default") );
xLoader->loadComponentFromURL(aURL, aTarget, FrameSearchFlag::ALL, descriptor);
return CSubmission::SUCCESS;
@@ -88,7 +87,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
if (aDocument.is()) {
// parse the result stream into a new document
Reference< XDocumentBuilder > xBuilder(xFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), UNO_QUERY_THROW);
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder") ) ), UNO_QUERY_THROW);
Reference< XDocument > aNewDocument = xBuilder->parse(m_aResultStream);
if (aNewDocument.is()) {
@@ -96,7 +95,6 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
Reference< XElement > oldRoot = aDocument->getDocumentElement();
Reference< XElement > newRoot = aNewDocument->getDocumentElement();
- // aDocument->removeChild(Reference< XNode >(oldRoot, UNO_QUERY_THROW));
Reference< XNode > aImportedNode = aDocument->importNode(Reference< XNode >(newRoot, UNO_QUERY_THROW), sal_True);
Reference< XNode >(aDocument, UNO_QUERY_THROW)->replaceChild(aImportedNode, Reference< XNode >(oldRoot, UNO_QUERY_THROW));
return CSubmission::SUCCESS;
@@ -131,7 +129,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
pHelper->m_aInteractionHandler = _xHandler;
else
pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(m_aFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler")), UNO_QUERY);
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY);
OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler");
CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper;
diff --git a/forms/source/xforms/submission/serialization_app_xml.cxx b/forms/source/xforms/submission/serialization_app_xml.cxx
index 2e90215..2f96295 100644
--- a/forms/source/xforms/submission/serialization_app_xml.cxx
+++ b/forms/source/xforms/submission/serialization_app_xml.cxx
@@ -45,7 +45,7 @@
CSerializationAppXML::CSerializationAppXML()
: m_aFactory(utl::getProcessServiceFactory())
, m_aPipe(CSS::uno::Reference< CSS::io::XOutputStream > (m_aFactory->createInstance(
- rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), CSS::uno::UNO_QUERY))
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ), CSS::uno::UNO_QUERY))
{
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 9220e9c..6dcf8a1 100644
--- a/forms/source/xforms/submission/serialization_urlencoded.cxx
+++ b/forms/source/xforms/submission/serialization_urlencoded.cxx
@@ -52,7 +52,7 @@ using namespace CSS::xml::dom;
CSerializationURLEncoded::CSerializationURLEncoded()
: m_aFactory(getProcessServiceFactory())
, m_aPipe(Reference< XOutputStream > (m_aFactory->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY))
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ), UNO_QUERY))
{
}
--
1.7.1
--------------020506000105070309020305--
More information about the LibreOffice
mailing list