summaryrefslogtreecommitdiffstats
path: root/i18npool/inc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-05-13 03:09:43 +0300
committerLászló Németh <nemeth@numbertext.org>2018-06-08 15:08:33 +0200
commit90d233b0311a208967a3e264820e00395bf057fb (patch)
tree62ce991f6a6f2829a068a5cfe8279a28de80c28e /i18npool/inc
parentsync tristate/inconsistent feature (diff)
downloadcore-90d233b0311a208967a3e264820e00395bf057fb.tar.gz
core-90d233b0311a208967a3e264820e00395bf057fb.zip
tdf#115007: Use [NatNum12 params...] syntax
This allows using all the libnumbertext library functions. [NatNum12] gives cardinal number names (one, two, three, ...) [NatNum12 ordinal] gives ordinal number names (first, second, third, ...) [NatNum12 ordinal-number] gives ordinal indicators (1st, 2nd, 3rd, ...) [NatNum12 money USD][$-409] gives formal English (US) money text ... etc (see numbertext.org for syntax). Change-Id: I16dbb44d8d4bdb82a1b950de6d438c8311b554ff Reviewed-on: https://gerrit.libreoffice.org/54366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/nativenumbersupplier.hxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/i18npool/inc/nativenumbersupplier.hxx b/i18npool/inc/nativenumbersupplier.hxx
index e248a1812004..d17c39fe7490 100644
--- a/i18npool/inc/nativenumbersupplier.hxx
+++ b/i18npool/inc/nativenumbersupplier.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_I18NPOOL_INC_NATIVENUMBERSUPPLIER_HXX
#define INCLUDED_I18NPOOL_INC_NATIVENUMBERSUPPLIER_HXX
-#include <com/sun/star/i18n/XNativeNumberSupplier.hpp>
+#include <com/sun/star/i18n/XNativeNumberSupplier2.hpp>
#include <com/sun/star/i18n/NativeNumberMode.hpp>
#include <com/sun/star/i18n/NativeNumberXmlAttributes.hpp>
#include <cppuhelper/implbase.hxx>
@@ -32,7 +32,7 @@ namespace i18npool {
// ----------------------------------------------------
class NativeNumberSupplierService : public cppu::WeakImplHelper
<
- css::i18n::XNativeNumberSupplier,
+ css::i18n::XNativeNumberSupplier2,
css::lang::XServiceInfo
>
{
@@ -52,6 +52,11 @@ public:
virtual sal_Int16 SAL_CALL convertFromXmlAttributes(
const css::i18n::NativeNumberXmlAttributes& aAttr ) override;
+ // XNativeNumberSupplier2
+ virtual OUString SAL_CALL getNativeNumberStringParams(
+ const OUString& rNumberString, const css::lang::Locale& rLocale,
+ sal_Int16 nNativeNumberMode, const OUString& rNativeNumberParams) override;
+
//XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
@@ -59,9 +64,11 @@ public:
// following methods are not for XNativeNumberSupplier, they are for calling from transliterations
/// @throws css::uno::RuntimeException
- OUString getNativeNumberString( const OUString& aNumberString,
- const css::lang::Locale& aLocale, sal_Int16 nNativeNumberMode,
- css::uno::Sequence< sal_Int32 >& offset );
+ OUString getNativeNumberString(const OUString& rNumberString,
+ const css::lang::Locale& rLocale,
+ sal_Int16 nNativeNumberMode,
+ css::uno::Sequence<sal_Int32>& offset,
+ const OUString& rNativeNumberParams = OUString());
/// @throws css::uno::RuntimeException
sal_Unicode getNativeNumberChar( const sal_Unicode inChar,
const css::lang::Locale& aLocale, sal_Int16 nNativeNumberMode ) ;