diff options
Diffstat (limited to 'connectivity/source/drivers/flat/ETable.cxx')
-rw-r--r-- | connectivity/source/drivers/flat/ETable.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 4d9a6036a554..c874ccf8a0f0 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -36,6 +36,7 @@ #include <comphelper/types.hxx> #include "flat/EDriver.hxx" #include <com/sun/star/util/NumberFormat.hpp> +#include <com/sun/star/util/NumberFormatter.hpp> #include <unotools/configmgr.hxx> #include <i18npool/mslangid.hxx> #include "connectivity/dbconversion.hxx" @@ -49,6 +50,7 @@ using namespace connectivity::flat; using namespace connectivity::file; using namespace ::cppu; using namespace utl; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::beans; @@ -420,7 +422,10 @@ void OFlatTable::construct() 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 >(m_pConnection->getDriver()->getFactory()->createInstance(::rtl::OUString("com.sun.star.util.NumberFormatter")),UNO_QUERY); + m_xNumberFormatter = Reference< util::XNumberFormatter >( + util::NumberFormatter::create( + comphelper::ComponentContext(m_pConnection->getDriver()->getFactory()).getUNOContext()), + UNO_QUERY_THROW); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY); xProp->getPropertyValue(::rtl::OUString("NullDate")) >>= m_aNullDate; |