diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 16:48:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 16:48:42 +0100 |
commit | e4bc7227a7bc7e544b1c89b14ce4c6d318b7d5ff (patch) | |
tree | ae152c64fd704f97091e651fc9054b87a9afe8a3 | |
parent | 745105a4828ca7d82a626792012c379cdd82228a (diff) |
fix crash on loading ooo32089-1.sxw
regression from
"
commit 11c94c170500e0bc147ff512789130c770843b1e
SwDoc::DelLayoutFmt: don't delete content of a draw format
In case a shape (has a draw format) has a textbox (RES_CNTNT of the draw
format), then that's just a pointer to that content, but the draw format
doesn't own it: the matching fly format does. So ignore that content
when deleting the layout format in case of draw formats: that ensures
when both the draw and the fly format is deleted, deletion is only
performed once.
"
Change-Id: Id374c6afe66eb0bd665c442ba8d1dc7e39679555
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index bf97e7cf144d..bf17f3eaffd7 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -262,8 +262,8 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt ) // determine frame formats of at-frame anchored objects const SwNodeIndex* pCntntIdx = 0; if (pFmt->Which() != RES_DRAWFRMFMT) - pFmt->GetCntnt().GetCntntIdx(); - if ( pCntntIdx ) + pCntntIdx = pFmt->GetCntnt().GetCntntIdx(); + if (pCntntIdx) { const SwFrmFmts* pTbl = pFmt->GetDoc()->GetSpzFrmFmts(); if ( pTbl ) |