summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 10:31:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 13:55:30 +0200
commit65e4a776e8315fd61fd67ad00d28985b11f0b79e (patch)
tree1ab7a2947d47807086e0477a8d3ad35c2e75dd48 /xmloff
parenta7b7614c7cab42cd0839752635db81e25e1e50a1 (diff)
simplify some OUString::copy calls
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-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