summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-21 08:07:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-08-27 15:40:07 +0200
commit8638f1e72a3fe830c0e8dcc1bd847d4fb9e599ee (patch)
treed398e9c43b4dd1570145210690a75762d81f4dc4 /sw
parent4381f3dd5ae9e042840a16f69d07267208160420 (diff)
fdo#46808, Adapt script::Converter service code to new style
Change-Id: I19b3ba7c978e02ce865360f0411007525012149c
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/fields/docufld.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index b634a72a7a8b..de0ca82641df 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -31,7 +31,7 @@
#include <hintids.hxx>
#include <com/sun/star/text/XText.hpp>
-#include <com/sun/star/script/XTypeConverter.hpp>
+#include <com/sun/star/script/Converter.hpp>
#include <com/sun/star/text/SetVariableType.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/UserDataPart.hpp>
@@ -954,8 +954,7 @@ String SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
uno::UNO_QUERY_THROW);
aAny = xSet->getPropertyValue( rName );
- uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory()
- ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY );
+ uno::Reference < script::XTypeConverter > xConverter( script::Converter::create(comphelper::getProcessComponentContext()) );
uno::Any aNew;
aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING );
aNew >>= sVal;
@@ -1105,8 +1104,7 @@ String SwDocInfoField::Expand() const
{
// if the field is "fixed" we don't update it from the property
::rtl::OUString sVal;
- uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory()
- ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY );
+ uno::Reference < script::XTypeConverter > xConverter( script::Converter::create(comphelper::getProcessComponentContext()) );
util::Date aDate;
util::DateTime aDateTime;
util::Duration aDuration;