diff options
author | Eike Rathke <erack@redhat.com> | 2015-07-10 23:20:28 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-13 11:50:32 +0000 |
commit | cdb2d6aa33a409994c3033cf621847d1552ce8cd (patch) | |
tree | 3a5c2ffdd08fae0c308863a1b6ae3ce1329cf523 | |
parent | 5ef9b838791ebb7c4d5695dce5e5fd12eddcab96 (diff) |
the last condition is "all other numbers", not the third, tdf#92457 related
(cherry picked from commit b3c11e2b3ef4bad8c2b5f92ba00ac805fb68786f)
So we'll properly strip the "value()<=1.79769313486232E+308"
condition that 5.1 will write.
This will not enable the handling of the style, but at least it is fed
correctly as intended to the number formatter.
Change-Id: Ic9571d938c4a8837c5712bafbfb2ebf9f32011df
Reviewed-on: https://gerrit.libreoffice.org/16990
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 6c84c5ab4ad8..99b030d2d47d 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2060,10 +2060,10 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex ) if ( aConditions.isEmpty() && aMyConditions.size() == 1 && sRealCond.equalsAscii( ">=0" ) ) bDefaultCond = true; - if ( nType == XML_TOK_STYLES_TEXT_STYLE && nIndex == 2 ) + if ( nType == XML_TOK_STYLES_TEXT_STYLE && static_cast<size_t>(nIndex) == aMyConditions.size() - 1 ) { - // The third condition in a number format with a text part can only be - // "all other numbers", the condition string must be empty. + // The last condition in a number format with a text part can only + // be "all other numbers", the condition string must be empty. bDefaultCond = true; } |