From 8493c54bdde03bdc793b83402b9c341a5a97efac Mon Sep 17 00:00:00 2001 From: Pierre F Date: Tue, 29 Oct 2024 18:08:22 +0200 Subject: tdf#143846 split DECIMAL() + DOLLAR() Change-Id: Iba787b44ad846fd2e7ec129fbb72bf916b23e2e9 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/175756 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- AllLangHelp_scalc.mk | 2 ++ source/text/scalc/01/04060110.xhp | 47 +++-------------------------------- source/text/scalc/01/func_decimal.xhp | 44 ++++++++++++++++++++++++++++++++ source/text/scalc/01/func_dollar.xhp | 39 +++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 44 deletions(-) create mode 100644 source/text/scalc/01/func_decimal.xhp create mode 100644 source/text/scalc/01/func_dollar.xhp diff --git a/AllLangHelp_scalc.mk b/AllLangHelp_scalc.mk index 756a58e757..03497e25cc 100644 --- a/AllLangHelp_scalc.mk +++ b/AllLangHelp_scalc.mk @@ -217,6 +217,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,scalc,\ helpcontent2/source/text/scalc/01/func_day \ helpcontent2/source/text/scalc/01/func_days \ helpcontent2/source/text/scalc/01/func_days360 \ + helpcontent2/source/text/scalc/01/func_decimal \ + helpcontent2/source/text/scalc/01/func_dollar \ helpcontent2/source/text/scalc/01/func_eastersunday \ helpcontent2/source/text/scalc/01/func_edate \ helpcontent2/source/text/scalc/01/func_eomonth \ diff --git a/source/text/scalc/01/04060110.xhp b/source/text/scalc/01/04060110.xhp index 1588ef8454..f80f36f8f2 100644 --- a/source/text/scalc/01/04060110.xhp +++ b/source/text/scalc/01/04060110.xhp @@ -106,50 +106,9 @@
-
- - DECIMAL function - - - - -

DECIMAL

-Converts text that represents a number in a numeral system with the given base radix to a positive integer. The radix must be in the range 2 to 36. Spaces and tabs are ignored. The Text field is not case-sensitive. -If the radix is 16, a leading x or X or 0x or 0X, and an appended h or H, are disregarded. If the radix is 2, an appended b or B is disregarded. Other characters that do not belong to the numeral system generate an error. - - -DECIMAL("Text"; Radix) - Text is the text to be converted. - Radix indicates the base of the numeral system. It may be any positive integer between 2 and 36. - - - =DECIMAL("17";10) returns 17. - =DECIMAL("FACE";16) returns 64206. - =DECIMAL("0101";2) returns 5. - -BASE -
+
-
- - DOLLAR function - - - - -

DOLLAR

-Converts a number to a string representing the amount in the currency format, rounded to a specified decimal places, using the decimal separator that corresponds to the current locale setting. In the Value field enter the number to be converted. Optionally, you may enter the number of decimal places in the Decimals field. If no value is specified, all numbers in currency format will be displayed with two decimal places. -You set the currency format in your system settings. - - -DOLLAR(Value [; Decimals]) - Value is a number, a reference to a cell containing a number, or a formula which returns a number. - Decimals is the optional number of decimal places. - - - =DOLLAR(255) returns $255.00 for the English (USA) locale and USD (dollar) currency; ¥255.00 for the Japanese locale and JPY (yen) currency; or 255,00 € for the German (Germany) locale and EUR (euro) currency. - =DOLLAR(367.456;2) returns $367.46. -
+
@@ -658,4 +617,4 @@
- \ No newline at end of file + diff --git a/source/text/scalc/01/func_decimal.xhp b/source/text/scalc/01/func_decimal.xhp new file mode 100644 index 0000000000..f136e7c968 --- /dev/null +++ b/source/text/scalc/01/func_decimal.xhp @@ -0,0 +1,44 @@ + + + + + + DECIMAL Function + /text/scalc/01/func_decimal.xhp + + + + + DECIMAL function + + +
+

+ + DECIMAL + +

+ Converts text that represents a number in a numeral system with the given base radix to a positive integer. The radix must be in the range 2 to 36. Spaces and tabs are ignored. The Text field is not case-sensitive. +
+ If the radix is 16, a leading x or X or 0x or 0X, and an appended h or H, are disregarded. If the radix is 2, an appended b or B is disregarded. Other characters that do not belong to the numeral system generate an error. + + DECIMAL("Text"; Radix) + Text is the text to be converted. + Radix indicates the base of the numeral system. It may be any positive integer between 2 and 36. + + =DECIMAL("17";10) returns 17. + =DECIMAL("FACE";16) returns 64206. + =DECIMAL("0101";2) returns 5. + + + BASE + + +
diff --git a/source/text/scalc/01/func_dollar.xhp b/source/text/scalc/01/func_dollar.xhp new file mode 100644 index 0000000000..fd5aabb598 --- /dev/null +++ b/source/text/scalc/01/func_dollar.xhp @@ -0,0 +1,39 @@ + + + + + + DOLLAR Function + /text/scalc/01/func_dollar.xhp + + + + + DOLLAR function + + +
+

+ + DOLLAR + +

+ Converts a number to a string representing the amount in the currency format, rounded to a specified decimal places, using the decimal separator that corresponds to the current locale setting. In the Value field enter the number to be converted. Optionally, you may enter the number of decimal places in the Decimals field. If no value is specified, all numbers in currency format will be displayed with two decimal places. +
+ You set the currency format in your system settings. + + DOLLAR(Value [; Decimals]) + Value is a number, a reference to a cell containing a number, or a formula which returns a number. + Decimals is the optional number of decimal places. + + =DOLLAR(255) returns $255.00 for the English (USA) locale and USD (dollar) currency; ¥255.00 for the Japanese locale and JPY (yen) currency; or 255,00 € for the German (Germany) locale and EUR (euro) currency. + =DOLLAR(367.456;2) returns $367.46. + +
-- cgit