diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-29 09:32:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:06 +0200 |
commit | 3a36408b73d8a9be43cd9f4570537ff1d80c0114 (patch) | |
tree | f46fe36878b77836f9ef3606e162e87ab84bdcb2 /svx | |
parent | fdo#46808, Adapt system::SystemShellExecute UNO service to new style (diff) | |
download | core-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 'svx')
-rw-r--r-- | svx/source/form/formcontroller.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 4fea777be024..d18e6bb1cc0d 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -66,7 +66,7 @@ #include <com/sun/star/form/runtime/FormFeature.hpp> #include <com/sun/star/container/XContainer.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> -#include <com/sun/star/util/XNumberFormatter.hpp> +#include <com/sun/star/util/NumberFormatter.hpp> #include <com/sun/star/sdb/SQLContext.hpp> #include <com/sun/star/sdb/XColumn.hpp> @@ -143,6 +143,7 @@ namespace svxform using ::com::sun::star::sdbc::XRowSet; using ::com::sun::star::sdbc::XDatabaseMetaData; using ::com::sun::star::util::XNumberFormatsSupplier; + using ::com::sun::star::util::NumberFormatter; using ::com::sun::star::util::XNumberFormatter; using ::com::sun::star::sdbcx::XColumnsSupplier; using ::com::sun::star::container::XNameAccess; @@ -845,7 +846,7 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons { Reference< XDatabaseMetaData> xMetaData(xConnection->getMetaData()); Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats( xConnection, sal_True ) ); - Reference< XNumberFormatter> xFormatter( m_aContext.createComponent( "com.sun.star.util.NumberFormatter" ), UNO_QUERY_THROW ); + Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); xFormatter->attachNumberFormatsSupplier(xFormatSupplier); Reference< XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY); @@ -3165,7 +3166,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) // need to parse criteria localized OStaticDataAccessTools aStaticTools; Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats(xConnection, sal_True)); - Reference< XNumberFormatter> xFormatter( m_aContext.createComponent( "com.sun.star.util.NumberFormatter" ), UNO_QUERY ); + Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); xFormatter->attachNumberFormatsSupplier(xFormatSupplier); Locale aAppLocale = Application::GetSettings().GetUILocale(); LocaleDataWrapper aLocaleWrapper( m_aContext.getLegacyServiceFactory(), aAppLocale ); @@ -3309,7 +3310,7 @@ void FormController::startFiltering() // the control we have to activate after replacement Reference< XDatabaseMetaData > xMetaData(xConnection->getMetaData()); Reference< XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats(xConnection, sal_True); - Reference< XNumberFormatter > xFormatter( m_aContext.createComponent( "com.sun.star.util.NumberFormatter" ), UNO_QUERY ); + Reference< XNumberFormatter > xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); xFormatter->attachNumberFormatsSupplier(xFormatSupplier); // structure for storing the field info |