diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-04 20:13:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-04 20:13:28 +0100 |
commit | a3f8a1c1df3e57b541e76156179f81972e845814 (patch) | |
tree | 62fefb8c21907a8e6283e31cf99c58f07415a5ec /oox/source | |
parent | 062fe87952c46217e46cbb14b9a6d4c0529fa943 (diff) |
coverity#1309263 Improper use of negative value
and
coverity#1309264 Improper use of negative value
Change-Id: I496e92211b9ca0a7a27a7f00d17cff428cb3b42b
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 2c2f6eb4a685..41f4ebd6dd71 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -317,11 +317,14 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS sal_Int32 id = 0; sal_Int32 idPos = sLinkChainName.indexOf("_x"); sal_Int32 seq = 0; - sal_Int32 seqPos = sLinkChainName.indexOf("_s",idPos); - if( idPos >= 0 && idPos < seqPos ) + if (idPos >= 0) { - id = sLinkChainName.copy(idPos+2,seqPos-idPos+2).toInt32(); - seq = sLinkChainName.copy(seqPos+2).toInt32(); + sal_Int32 seqPos = sLinkChainName.indexOf("_s",idPos); + if (idPos < seqPos) + { + id = sLinkChainName.copy(idPos+2,seqPos-idPos+2).toInt32(); + seq = sLinkChainName.copy(seqPos+2).toInt32(); + } } OUString s_mso_next_textbox; |