[Libreoffice-commits] core.git: xmloff/source
Norbert Thiebaud
nthiebaud at gmail.com
Sun Feb 24 15:56:59 PST 2013
xmloff/source/chart/SchXMLTools.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit bbe02c2212a24a1984c951b0d32001b54cf307a0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Thu Feb 21 19:04:05 2013 -0600
coverity#705444 Improper use of negative value
Change-Id: Ie3b7634e099de5c8b9a4a77daf47c6038dade370
Reviewed-on: https://gerrit.libreoffice.org/2320
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 5752fad..9d95a61 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -96,9 +96,8 @@ sal_Int32 lcl_getBuildIDFromGenerator( const ::rtl::OUString& rGenerator )
//returns -1 if nothing found
sal_Int32 nBuildId = -1;
const OUString sBuildCompare( "$Build-" );
- sal_Int32 nEnd = -1;
- sal_Int32 nBegin = rGenerator.indexOf( sBuildCompare, nEnd );
- if( nBegin != -1 )
+ sal_Int32 nBegin = rGenerator.indexOf( sBuildCompare );
+ if( nBegin >= 0 )
{
OUString sBuildId( rGenerator.copy( nBegin + sBuildCompare.getLength() ) );
nBuildId = sBuildId.toInt32();
More information about the Libreoffice-commits
mailing list