diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-21 08:07:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-27 15:40:07 +0200 |
commit | 8638f1e72a3fe830c0e8dcc1bd847d4fb9e599ee (patch) | |
tree | d398e9c43b4dd1570145210690a75762d81f4dc4 /ucb | |
parent | 4381f3dd5ae9e042840a16f69d07267208160420 (diff) |
fdo#46808, Adapt script::Converter service code to new style
Change-Id: I19b3ba7c978e02ce865360f0411007525012149c
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/Library_cached1.mk | 1 | ||||
-rw-r--r-- | ucb/Library_ucpfile1.mk | 1 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrow.cxx | 5 |
4 files changed, 8 insertions, 7 deletions
diff --git a/ucb/Library_cached1.mk b/ucb/Library_cached1.mk index e548fa710099..85b1fc29c596 100644 --- a/ucb/Library_cached1.mk +++ b/ucb/Library_cached1.mk @@ -32,6 +32,7 @@ $(eval $(call gb_Library_set_componentfile,cached1,ucb/source/cacher/cached1)) $(eval $(call gb_Library_use_sdk_api,cached1)) $(eval $(call gb_Library_use_libraries,cached1,\ + comphelper \ cppu \ cppuhelper \ sal \ diff --git a/ucb/Library_ucpfile1.mk b/ucb/Library_ucpfile1.mk index d0b301e12d6a..ed68c8938fb1 100644 --- a/ucb/Library_ucpfile1.mk +++ b/ucb/Library_ucpfile1.mk @@ -32,6 +32,7 @@ $(eval $(call gb_Library_set_componentfile,ucpfile1,ucb/source/ucp/file/ucpfile1 $(eval $(call gb_Library_use_sdk_api,ucpfile1)) $(eval $(call gb_Library_use_libraries,ucpfile1,\ + comphelper \ cppu \ cppuhelper \ sal \ diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index e08b6572f530..d1cc70444721 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -32,10 +32,11 @@ #include <com/sun/star/ucb/FetchError.hpp> #include <com/sun/star/ucb/ResultSetException.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> -#include <com/sun/star/script/XTypeConverter.hpp> +#include <com/sun/star/script/Converter.hpp> #include <com/sun/star/sdbc/ResultSetType.hpp> #include <rtl/ustring.hxx> #include <osl/diagnose.h> +#include <comphelper/componentcontext.hxx> using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -2148,10 +2149,7 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter() if ( !m_bTriedToGetTypeConverter && !m_xTypeConverter.is() ) { m_bTriedToGetTypeConverter = sal_True; - m_xTypeConverter = Reference< XTypeConverter >( - m_xSMgr->createInstance( - OUString( "com.sun.star.script.Converter" ) ), - UNO_QUERY ); + m_xTypeConverter = Reference< XTypeConverter >( Converter::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()) ); OSL_ENSURE( m_xTypeConverter.is(), "PropertyValueSet::getTypeConverter() - " diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index 0c78507540af..90fe7c917ace 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -29,6 +29,8 @@ #include "filrow.hxx" #include "shell.hxx" #include "prov.hxx" +#include <com/sun/star/script/Converter.hpp> +#include <comphelper/componentcontext.hxx> using namespace fileaccess; using namespace com::sun::star; @@ -51,8 +53,7 @@ sal_Bool convert( shell* pShell, if( ! xConverter.is() ) { xConverter = uno::Reference< script::XTypeConverter >( - pShell->m_xMultiServiceFactory->createInstance( - rtl::OUString("com.sun.star.script.Converter") ), uno::UNO_QUERY ); + script::Converter::create(comphelper::ComponentContext(pShell->m_xMultiServiceFactory).getUNOContext()) ); } try |