summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/browser/brwctrlr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-29 09:32:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-03 15:55:06 +0200
commit3a36408b73d8a9be43cd9f4570537ff1d80c0114 (patch)
treef46fe36878b77836f9ef3606e162e87ab84bdcb2 /dbaccess/source/ui/browser/brwctrlr.cxx
parentfdo#46808, Adapt system::SystemShellExecute UNO service to new style (diff)
downloadcore-3a36408b73d8a9be43cd9f4570537ff1d80c0114.tar.gz
core-3a36408b73d8a9be43cd9f4570537ff1d80c0114.zip
fdo#46808, Adapt util::NumberFormatter UNO service to new style
Create a merged XNumberFormatter2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Change-Id: I57f35cde0a9dbbe91c1d2c3d068cb3a97c7245e3
Diffstat (limited to 'dbaccess/source/ui/browser/brwctrlr.cxx')
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index a3c21e902c41..348d33a4bb17 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -59,6 +59,7 @@
#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/uno/TypeClass.hpp>
+#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/util/XCancellable.hpp>
#include <comphelper/enumhelper.hxx>
@@ -83,6 +84,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::sdb;
@@ -775,10 +777,9 @@ void SbaXDataBrowserController::initFormatter()
if(xSupplier.is())
{
// create a new formatter
- m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter > (
- getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
- if (m_xFormatter.is())
- m_xFormatter->attachNumberFormatsSupplier(xSupplier);
+ m_xFormatter = Reference< util::XNumberFormatter > (
+ util::NumberFormatter::create(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
+ m_xFormatter->attachNumberFormatsSupplier(xSupplier);
}
else // clear the formatter
m_xFormatter = NULL;