sc/source/ui/view/output2.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 68bbbfd3b93c546c8004e916ea58a4c16f95c648 Author: Czeber László Ádám <czeber.laszloa...@nisz.hu> AuthorDate: Mon Jun 12 16:12:05 2023 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Fri Jun 23 10:23:59 2023 +0200 tdf#122676 sc: fix format with * (filling) and NBSP thousand separator Numbers containing no-break space (NBSP) thousand separator enabled the EditEngine layout, losing filling e.g. for stretching spaces. Enable EditEngine for NBSP characters only if there is no filling in the number format code, fixing MSO interoperability, too. In number format codes, asterisk (*) followed by a character is used to fill the available space in the column with that character, e.g. format code [>0]" "* # ##0" € ";[<0]-* # ##0" € ";" "* -#" € ";" "@" " put the minus sign at the left side of the column, while the number at the right side of the column. Because of the NBSP thousand separator, bigger numbers got different layout previously, i.e. minus signs right next to the numbers. Note: there is a better solution for the layout problem: using narrow no-break space (U-202F), which is the proposed thousand separator in typography, and it's back-compatible, because it doesn't enable the different layout. Change-Id: Ia35f01733687ee6005f06ff3ab999b7a4b712ad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152901 Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: László Németh <nem...@numbertext.org> (cherry picked from commit c60700711caff1fc61e5219abdb17c535ea4459d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153336 Tested-by: Jenkins diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 46d26860976e..d8dfb064e605 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -815,6 +815,11 @@ bool ScDrawStringsVars::HasEditCharacters() const switch(aString[nIdx]) { case CHAR_NBSP: + // tdf#122676: Ignore CHAR_NBSP (this is thousand separator in any number) + // if repeat character is set + if (nRepeatPos < 0) + return true; + break; case CHAR_SHY: case CHAR_ZWSP: case CHAR_LRM: