diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-04 13:18:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-06 13:20:31 +0200 |
commit | 773ad75b0dbc4dac1cae704c726b5a2d67ae1146 (patch) | |
tree | b95386a6639835d7751a6b3aa7bcdfb114f026f8 /svtools | |
parent | Fix: <errno.h> needs to be included under Linux (diff) | |
download | core-773ad75b0dbc4dac1cae704c726b5a2d67ae1146.tar.gz core-773ad75b0dbc4dac1cae704c726b5a2d67ae1146.zip |
fdo#46808, Adapt util::NumberFormatsSupplier UNO service to new style
Change-Id: I58436d9eea0c38d14cde2dc01aa463d5d71912e9
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/table/cellvalueconversion.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx index d47210bb9edf..86a84bdb1246 100644 --- a/svtools/source/table/cellvalueconversion.cxx +++ b/svtools/source/table/cellvalueconversion.cxx @@ -20,7 +20,7 @@ #include "cellvalueconversion.hxx" #include <com/sun/star/util/NumberFormatter.hpp> -#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#include <com/sun/star/util/NumberFormatsSupplier.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/Date.hpp> #include <com/sun/star/util/Time.hpp> @@ -50,7 +50,9 @@ namespace svt using ::com::sun::star::util::NumberFormatter; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::util::XNumberFormatsSupplier; + using ::com::sun::star::util::NumberFormatsSupplier; using ::com::sun::star::beans::XPropertySet; + using ::com::sun::star::lang::Locale; using ::com::sun::star::uno::UNO_SET_THROW; using ::com::sun::star::uno::Exception; using ::com::sun::star::util::DateTime; @@ -340,13 +342,10 @@ namespace svt Reference< XNumberFormatter > const xFormatter( NumberFormatter::create( io_data.aContext.getUNOContext() ), UNO_QUERY_THROW ); // a supplier of number formats - Sequence< Any > aInitArgs(1); - aInitArgs[0] <<= SvtSysLocale().GetLanguageTag().getLocale(); + Locale aLocale = SvtSysLocale().GetLanguageTag().getLocale(); - Reference< XNumberFormatsSupplier > const xSupplier( - io_data.aContext.createComponentWithArguments( "com.sun.star.util.NumberFormatsSupplier", aInitArgs ), - UNO_QUERY_THROW - ); + Reference< XNumberFormatsSupplier > const xSupplier = + NumberFormatsSupplier::createWithLocale( io_data.aContext.getUNOContext(), aLocale ); // ensure a NullDate we will assume later on UnoDate const aNullDate( 1, 1, 1900 ); |