summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-09 15:14:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-10 08:28:19 +0100
commitcf6df180efe821beb094eca5bf050e80eecc2d1b (patch)
treeb1d8ee1d037655571a18a32df24811ac701961ee /sw
parente00d5f21fe7be1ccf31d35c12dcdda289321590e (diff)
fix leak in SwDrawFrameFormat::GetDescription
and simplify. ever since original code was committed in commit da12dc5adf9086d418ff0d09abee23fdd8f68cda Date: Wed Sep 8 14:20:23 2004 +0000 INTEGRATION: CWS swundo03 (1.48.34); FILE MERGED Change-Id: I9aae40eade34051219f1fe838b373e0f3317d2c6 Reviewed-on: https://gerrit.libreoffice.org/66026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/atrfrm.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 2603eb7fb400..8e087c038b28 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3393,12 +3393,7 @@ OUString SwDrawFrameFormat::GetDescription() const
{
if (pSdrObj != m_pSdrObjectCached)
{
- SdrObject * pSdrObjCopy(pSdrObj->CloneSdrObject(pSdrObj->getSdrModelFromSdrObject()));
- SdrUndoNewObj * pSdrUndo = new SdrUndoNewObj(*pSdrObjCopy);
- m_sSdrObjectCachedComment = pSdrUndo->GetComment();
-
- delete pSdrUndo;
-
+ m_sSdrObjectCachedComment = SdrUndoNewObj::GetComment(*pSdrObj);
m_pSdrObjectCached = pSdrObj;
}