summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-07-10 23:20:28 +0200
committerEike Rathke <erack@redhat.com>2015-07-11 03:08:35 +0200
commitb3c11e2b3ef4bad8c2b5f92ba00ac805fb68786f (patch)
tree08c5a35ef2b2cdc95a038753e05c8c942024d5eb /xmloff
parent728b7f18c989954912a4b2ad2778c9eeba181f2c (diff)
the last condition is "all other numbers", not the third, tdf#92457
Change-Id: Ic9571d938c4a8837c5712bafbfb2ebf9f32011df
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 0c59c7e1217f..b1a59ae7e4d3 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2129,10 +2129,10 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
if ( aConditions.isEmpty() && aMyConditions.size() == 1 && sRealCond == ">=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;
}