diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-01 15:15:25 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-06 10:53:34 +0200 |
commit | 0fcd1a73f0e1ec564f3c6da1ccd890183d3c18db (patch) | |
tree | 3895ecd6f804b8f3ef3a8f03f1739e17918feeef /forms | |
parent | 8a95074eaefd01621dc55db8567b19c8e6157f95 (diff) |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method URLTransformer::create
Change-Id: I3fd2e838497bcfd8fc949615c0e7d60a6ea47118
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 7 | ||||
-rw-r--r-- | forms/source/helper/urltransformer.cxx | 9 |
2 files changed, 6 insertions, 10 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 58d5f40d5c7c..d3dd3385fd56 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -60,9 +60,11 @@ #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/util/XCancellable.hpp> +#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/util/XModifiable2.hpp> +#include <comphelper/componentcontext.hxx> #include <comphelper/basicio.hxx> #include <comphelper/container.hxx> #include <comphelper/enumhelper.hxx> @@ -2239,10 +2241,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: if (!xFrame.is()) return; - Reference<XURLTransformer> - xTransformer(m_xServiceFactory->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer") ) ), UNO_QUERY); - DBG_ASSERT(xTransformer.is(), "ODatabaseForm::submit_impl : could not create an URL transformer !"); + Reference<XURLTransformer> xTransformer(URLTransformer::create(comphelper::ComponentContext(m_xServiceFactory).getUNOContext())); // URL encoding if( eSubmitEncoding == FormSubmitEncoding_URL ) diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx index 4fcfaeab92cc..f9d05378f838 100644 --- a/forms/source/helper/urltransformer.cxx +++ b/forms/source/helper/urltransformer.cxx @@ -29,8 +29,10 @@ #include "urltransformer.hxx" /** === begin UNO includes === **/ +#include <com/sun/star/util/URLTransformer.hpp> /** === end UNO includes === **/ #include <tools/debug.hxx> +#include <comphelper/componentcontext.hxx> //........................................................................ namespace frm @@ -60,12 +62,7 @@ namespace frm { if ( m_xORB.is() ) { - m_xTransformer = m_xTransformer.query( - m_xORB->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ) - ) - ); - DBG_ASSERT( m_xTransformer.is(), "UrlTransformer::getStrictURL: couldn't get an URL transformer!" ); + m_xTransformer.set(URLTransformer::create(comphelper::ComponentContext(m_xORB).getUNOContext())); } m_bTriedToCreateTransformer = true; |