diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-05-04 22:16:47 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-05-09 14:53:52 +0000 |
commit | a75aa73b2bf793faac1adb3b5f67e09d252d5fe9 (patch) | |
tree | a251ac1f877317ee8204dd5cd226c3731564dbb6 /xmloff | |
parent | 8f8fa5674d3853ed8ca6762b512e6b63c53f1039 (diff) |
tdf#38097 min numerator/denominator at least 1
In <number:fraction> attributes min-denominator-digits and
min-numerator-digits should be at least 1.
Gnumeric can create file with 0 values
Change-Id: I08ef51c23ce686136f51277671bf630807353484
Reviewed-on: https://gerrit.libreoffice.org/24670
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 5d71222e0c96..b3808e96d07f 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -965,11 +965,11 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport, aNumInfo.bExpSign = bAttrBool; break; case XML_TOK_ELEM_ATTR_MIN_NUMERATOR_DIGITS: - if (::sax::Converter::convertNumber( nAttrVal, sValue, 0 )) + if (::sax::Converter::convertNumber( nAttrVal, sValue, 1 )) // at least one '?' (tdf#38097) aNumInfo.nNumerDigits = nAttrVal; break; - case XML_TOK_ELEM_ATTR_MIN_DENOMINATOR_DIGITS: - if (::sax::Converter::convertNumber( nAttrVal, sValue, 0 )) + case XML_TOK_ELEM_ATTR_MIN_DENOMINATOR_DIGITS: // while max-denominator-digits not treated (tdf#99661) + if (::sax::Converter::convertNumber( nAttrVal, sValue, 1 )) // at least one '?' (tdf#38097) aNumInfo.nDenomDigits = nAttrVal; break; case XML_TOK_ELEM_ATTR_DENOMINATOR_VALUE: |