Kaydet (Commit) e4bc7227 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix crash on loading ooo32089-1.sxw

regression from

"
commit 11c94c17
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
üst 745105a4
...@@ -262,8 +262,8 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt ) ...@@ -262,8 +262,8 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
// determine frame formats of at-frame anchored objects // determine frame formats of at-frame anchored objects
const SwNodeIndex* pCntntIdx = 0; const SwNodeIndex* pCntntIdx = 0;
if (pFmt->Which() != RES_DRAWFRMFMT) if (pFmt->Which() != RES_DRAWFRMFMT)
pFmt->GetCntnt().GetCntntIdx(); pCntntIdx = pFmt->GetCntnt().GetCntntIdx();
if ( pCntntIdx ) if (pCntntIdx)
{ {
const SwFrmFmts* pTbl = pFmt->GetDoc()->GetSpzFrmFmts(); const SwFrmFmts* pTbl = pFmt->GetDoc()->GetSpzFrmFmts();
if ( pTbl ) if ( pTbl )
......
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