summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-06 12:09:27 +0000
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-29 07:51:47 +0100
commit863c8c5e0488d5e69ff5ea14adee33990f4e2bfd (patch)
tree0984f64123448f81e62d426d84b6f25103467b51
parent87bf0b3062d6f678f9f8ae38645fe9bc02a5adc9 (diff)
fix assert seen on opening attachment from tdf#123163
I imagine it should have been seqPos-(idPos+2) seems to be like this since the initial commit of commit 091fe76b6329b4bb974987554369cbfadd8f2401 Date: Tue Jun 30 12:55:18 2015 +0300 tdf#87348 implement mso-next-textbox vml-style textbox chaining import Change-Id: Ic2f527ede2102c01c8589d58d8c705d59b0a6ffe Reviewed-on: https://gerrit.libreoffice.org/67454 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 45510866fedac63014a3120a1130dbea9fd803ee)
-rw-r--r--oox/source/vml/vmlshape.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 45e7e40ab831..66facd3da275 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -350,7 +350,8 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
sal_Int32 seqPos = sLinkChainName.indexOf("_s",idPos);
if (idPos < seqPos)
{
- id = sLinkChainName.copy(idPos+2,seqPos-idPos+2).toInt32();
+ auto idPosEnd = idPos+2;
+ id = sLinkChainName.copy(idPosEnd, seqPos - idPosEnd).toInt32();
seq = sLinkChainName.copy(seqPos+2).toInt32();
}
}