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 /connectivity/source/drivers/flat | |
parent | 584cd8d1c23d47becb776e382f853ffe77ce9fc2 (diff) |
fdo#46808, Adapt util::NumberFormatsSupplier UNO service to new style
Change-Id: I58436d9eea0c38d14cde2dc01aa463d5d71912e9
Diffstat (limited to 'connectivity/source/drivers/flat')
-rw-r--r-- | connectivity/source/drivers/flat/ETable.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 9fe48f0abe24..87e2d6679581 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -38,6 +38,7 @@ #include "flat/EDriver.hxx" #include <com/sun/star/util/NumberFormat.hpp> #include <com/sun/star/util/NumberFormatter.hpp> +#include <com/sun/star/util/NumberFormatsSupplier.hpp> #include <unotools/configmgr.hxx> #include <i18npool/languagetag.hxx> #include "connectivity/dbconversion.hxx" @@ -58,6 +59,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::util; // ------------------------------------------------------------------------- void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) @@ -419,12 +421,9 @@ void OFlatTable::construct() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen@sun.com", "OFlatTable::construct" ); SvtSysLocale aLocale; ::com::sun::star::lang::Locale aAppLocale(aLocale.GetLanguageTag().getLocale()); - Sequence< ::com::sun::star::uno::Any > aArg(1); - aArg[0] <<= aAppLocale; - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString("com.sun.star.util.NumberFormatsSupplier"),aArg),UNO_QUERY); - m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >( - ::com::sun::star::util::NumberFormatter::create( + Reference< XNumberFormatsSupplier > xSupplier = NumberFormatsSupplier::createWithLocale( getComponentContext(m_pConnection->getDriver()->getFactory()), aAppLocale ); + m_xNumberFormatter = Reference< XNumberFormatter >( NumberFormatter::create( comphelper::getComponentContext(m_pConnection->getDriver()->getFactory())), UNO_QUERY_THROW); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); |