diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-30 17:06:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-06 10:01:22 +0200 |
commit | 8a95074eaefd01621dc55db8567b19c8e6157f95 (patch) | |
tree | e7558360206acbce87718207ee8b7f4aaab69991 /filter | |
parent | fdo#46808, Adapt UNO services to new style, Part 7, updating ::create (diff) | |
download | core-8a95074eaefd01621dc55db8567b19c8e6157f95.tar.gz core-8a95074eaefd01621dc55db8567b19c8e6157f95.zip |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method TextSearch::create
Change-Id: I7a8b607ed397158ca1e2b834ce61b8b196c8019a
Diffstat (limited to 'filter')
-rw-r--r-- | filter/Library_filtertracer.mk | 1 | ||||
-rw-r--r-- | filter/source/filtertracer/filtertracer.cxx | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/filter/Library_filtertracer.mk b/filter/Library_filtertracer.mk index 58b451bdff7e..264ca0120e00 100644 --- a/filter/Library_filtertracer.mk +++ b/filter/Library_filtertracer.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_set_include,filtertracer,\ $(eval $(call gb_Library_use_libraries,filtertracer,\ utl \ tl \ + comphelper \ cppuhelper \ cppu \ sal \ diff --git a/filter/source/filtertracer/filtertracer.cxx b/filter/source/filtertracer/filtertracer.cxx index 72781252dc6e..2b7ec476f254 100644 --- a/filter/source/filtertracer/filtertracer.cxx +++ b/filter/source/filtertracer/filtertracer.cxx @@ -30,10 +30,14 @@ #include <uno/mapping.hxx> #include <unotools/streamwrap.hxx> #include <unotools/ucbstreamhelper.hxx> +#include <com/sun/star/util/TextSearch.hpp> +#include <comphelper/componentcontext.hxx> // ---------------- // - FILTERTRACER - // ---------------- +using namespace ::com::sun::star; + rtl::OUString FilterTracer_getImplementationName() throw( NMSP_UNO::RuntimeException ) { @@ -60,8 +64,8 @@ FilterTracer::FilterTracer( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr mpStream ( NULL ), mnLogLevel ( NMSP_LOGGING::LogLevel::ALL ) { - REF( NMSP_UNO::XInterface ) xObj( rxMgr->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.TextSearch" )) ) ); - mxTextSearch = REF( NMSP_UTIL::XTextSearch )( xObj, ::com::sun::star::uno::UNO_QUERY ); + uno::Reference< uno::XComponentContext > xContext( comphelper::ComponentContext(rxMgr).getUNOContext() ); + mxTextSearch = com::sun::star::util::TextSearch::create(xContext); } FilterTracer::~FilterTracer() { |