reports: Correct use of NumberPattern.grouping.

The 2-tuple represents min/max grouping, not positive/negative.
This commit is contained in:
Brett Smith 2020-09-04 14:46:18 -04:00
parent 44ac5e61f7
commit 21383d2355

View file

@ -752,9 +752,6 @@ class BaseODS(BaseSpreadsheet[RT, ST], metaclass=abc.ABCMeta):
fmt = fmts[fmt_index]
except IndexError:
fmt = fmts[0]
grouping = pattern.grouping[0]
else:
grouping = pattern.grouping[fmt_index]
style = self.replace_child(
root,
odf.number.CurrencyStyle,
@ -769,7 +766,7 @@ class BaseODS(BaseSpreadsheet[RT, ST], metaclass=abc.ABCMeta):
elif not part.strip('#0,.'):
style.addElement(odf.number.Number(
decimalplaces=str(pattern.frac_prec[0]),
grouping='true' if grouping else 'false',
grouping='true' if pattern.grouping[0] else 'false',
minintegerdigits=str(minintegerdigits),
))
elif part == '¤':