summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-23 20:47:00 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-08-24 12:19:48 +0200
commitb25007aa3df29ca1b2af19dc12079cdf14a558bd (patch)
tree704970ee8cde8020135bbf9e411f4b0c59bf75c0 /sw/source/filter/ww8
parent8f563f83a1cad52ba397fd7386690736fb891db6 (diff)
ofz#25169 insertion into set might find a duplicate
in which case pImpRec is deleted and pImpRecTmp is invalid Change-Id: I2a273a436ebd88cb53e329bbcb4f171dda6ed840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101155 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 17d30a0e9236..166df718c720 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1076,7 +1076,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if( pImpRec->nShapeId )
{
- auto pImpRecTmp = pImpRec.get();
+ auto nShapeId = pImpRec->nShapeId;
+ auto nShapeOrder = (static_cast<sal_uLong>(pImpRec->aTextId.nTxBxS) << 16)
+ + pImpRec->aTextId.nSequence;
// Complement Import Record List
pImpRec->pObj = pObj;
rImportData.insert(std::move(pImpRec));
@@ -1088,9 +1090,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
( (rObjData.nSpFlags & ShapeFlag::Group)
&& (rObjData.nCalledByGroup < 2) )
)
- StoreShapeOrder( pImpRecTmp->nShapeId,
- ( static_cast<sal_uLong>(pImpRecTmp->aTextId.nTxBxS) << 16 )
- + pImpRecTmp->aTextId.nSequence, pObj );
+ {
+ StoreShapeOrder(nShapeId, nShapeOrder, pObj);
+ }
}
else
pImpRec.reset();