From 8ba7657a9653f8ae5d1b865356d11138df7b2093 Mon Sep 17 00:00:00 2001 From: Laurent Balland Date: Mon, 2 Jan 2023 18:39:35 +0100 Subject: tdf#152722 Number Format: keep NatNum modifiers When modifying number format with UI (decimal places, negative in red...) NatNum modifiers must be preserved Implement an helper to get NatNum string As NatNum12 already inserts currency unit, do not treat it Change-Id: I38be1da08a44d75ef663eaf50fccb3820ff9ed5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144963 Tested-by: Jenkins Reviewed-by: Eike Rathke --- include/svl/zformat.hxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/svl') diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 43f6ad9775f4..ea08234e93a2 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -459,6 +459,9 @@ public: void GetNatNumXml( css::i18n::NativeNumberXmlAttributes2& rAttr, sal_uInt16 nNumFor ) const; + /** Return empty string if no NatNum modifier or unvalid nNumFor + otherwhise return "[NatNum1]" or "[NatNum12 ...]" */ + OUString GetNatNumModifierString( sal_uInt16 nNumFor = 0 ) const; /** Switches to the first non-"gregorian" calendar, but only if the current calendar is "gregorian"; original calendar name and date/time returned, -- cgit