Kaydet (Commit) cf6df180 authored tarafından Noel Grandin's avatar Noel Grandin

fix leak in SwDrawFrameFormat::GetDescription

and simplify.

ever since original code was committed in
    commit da12dc5a
    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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e00d5f21
...@@ -3393,12 +3393,7 @@ OUString SwDrawFrameFormat::GetDescription() const ...@@ -3393,12 +3393,7 @@ OUString SwDrawFrameFormat::GetDescription() const
{ {
if (pSdrObj != m_pSdrObjectCached) if (pSdrObj != m_pSdrObjectCached)
{ {
SdrObject * pSdrObjCopy(pSdrObj->CloneSdrObject(pSdrObj->getSdrModelFromSdrObject())); m_sSdrObjectCachedComment = SdrUndoNewObj::GetComment(*pSdrObj);
SdrUndoNewObj * pSdrUndo = new SdrUndoNewObj(*pSdrObjCopy);
m_sSdrObjectCachedComment = pSdrUndo->GetComment();
delete pSdrUndo;
m_pSdrObjectCached = pSdrObj; m_pSdrObjectCached = pSdrObj;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment