summaryrefslogtreecommitdiff
path: root/svl/qa
diff options
context:
space:
mode:
authorLaurent Balland <laurent.balland@mailo.fr>2024-06-08 17:14:31 +0200
committerEike Rathke <erack@redhat.com>2024-06-13 15:34:33 +0200
commitbd2ffb6f33e549483b41f6235ba64fa735205d38 (patch)
treed1902e9c58b4444e514da9d4380a3af5dadea12d /svl/qa
parent542e590f6a35a350cb6bc53645462a273017258d (diff)
tdf#159930 Treat special case with no integer digit
Number format with no integer digit, such as "+.##;-.##" was placing string with the decimal separator. This change insert string at the begining of the number string as expected. This format code is saved as "+#.##;-#.##" in ODF, but display is the same; so no change is made on this side. Add unit test for this format Change-Id: I74fbe0e9a5303672ac7927d37922c06a762feba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168577 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'svl/qa')
-rw-r--r--svl/qa/unit/svl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 389195ec1728..3a8f5f51b43e 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1823,6 +1823,11 @@ void Test::testUserDefinedNumberFormats()
sExpected = "Value= 12,345.00";
checkPreviewString(aFormatter, sCode, 12345, LANGUAGE_ENGLISH_US, sExpected);
}
+ { // tdf#159930 no digit in integer part
+ sCode = "+.000;-.000";
+ sExpected = "+3.142"; // without the patch is would display "3+.142"
+ checkPreviewString(aFormatter, sCode, M_PI, LANGUAGE_ENGLISH_US, sExpected);
+ }
}
void Test::testNfEnglishKeywordsIntegrity()