summaryrefslogtreecommitdiff
path: root/reportdesign
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 /reportdesign
parentbc00717bb7a2b48885ca356fb0a966acbe72dca9 (diff)
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 'reportdesign')
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index ea1d04cfb960..ad1074589e46 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -57,6 +57,7 @@
#include "rptui_slotid.hrc"
#include "reportformula.hxx"
+#include <comphelper/componentcontext.hxx>
#include <comphelper/documentconstants.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/property.hxx>
@@ -69,6 +70,7 @@
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/style/PageStyleLayout.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
@@ -1699,7 +1701,7 @@ void OReportController::impl_initialize( )
listen(true);
setEditable( !m_aReportModel->IsReadOnly() );
- m_xFormatter.set(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
+ m_xFormatter.set(util::NumberFormatter::create(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
m_xFormatter->attachNumberFormatsSupplier(Reference< XNumberFormatsSupplier>(m_xReportDefinition,uno::UNO_QUERY));
::comphelper::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() );