diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-04-30 21:44:29 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-05-25 15:42:29 +0000 |
commit | f3de0caba189ff7d17a2f37495147673e68c2e7f (patch) | |
tree | 5fe0de4f9a4ca05f805df4bddbe17e693c4c383a /xmloff | |
parent | 700a6c6360c1c83433545d472511c48ac355a1d2 (diff) |
tdf#31449 Correctly test if fraction has no integer part
Test if fraction format has no integer part is modified
to take into account all cases: ??/?? or ##/##
and do not detect false positive like ? ??/??
Change-Id: Ia8677a5ad496e5df56ce6bf1290323555e46ba0a
Reviewed-on: https://gerrit.libreoffice.org/24540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 3beb146b34fa931e2d63f4738a3ae69fe286545f)
Reviewed-on: https://gerrit.libreoffice.org/25452
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 41c549db81b9..068ca832f3ab 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1457,9 +1457,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt case css::util::NumberFormat::FRACTION: { sal_Int32 nInteger = nLeading; - if ( pElemStr && (*pElemStr)[0] == '?' ) + if ( rFormat.GetNumForNumberElementCount( nPart ) == 3 ) { - // If the first digit character is a question mark, + // If there is only two numbers + fraction in format string // the fraction doesn't have an integer part, and no // min-integer-digits attribute must be written. nInteger = -1; |