summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumfi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style/xmlnumfi.cxx')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index b8727681a3da..c658de6d3a04 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2151,16 +2151,14 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
OUString rCondition = aMyConditions[nIndex].sCondition;
SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
sal_uInt32 l_nKey = pData->GetKeyForName( rApplyName );
- OUString sValue("value()"); //! define constant
- sal_Int32 nValLen = sValue.getLength();
+ OUString sRealCond;
if ( pFormatter && l_nKey != NUMBERFORMAT_ENTRY_NOT_FOUND &&
- rCondition.copy( 0, nValLen ) == sValue )
+ rCondition.startsWith("value()", &sRealCond) )
{
//! test for valid conditions
//! test for default conditions
- OUString sRealCond = rCondition.copy( nValLen, rCondition.getLength() - nValLen );
bool bDefaultCond = false;
//! collect all conditions first and adjust default to >=0, >0 or <0 depending on count