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

Resolves: ooo#119155 don't crash with odd content in footnotes

hit it with a large and simple hammer

Change-Id: Ib0e55ad64780efc7664ccd9a2684fbe7dba87498
üst 99e60d8d
...@@ -358,6 +358,7 @@ protected: ...@@ -358,6 +358,7 @@ protected:
bool mbColLocked : 1; // lock Grow/Shrink for column-wise section bool mbColLocked : 1; // lock Grow/Shrink for column-wise section
// or fly frames, will be set in Format // or fly frames, will be set in Format
bool m_isInDestroy : 1; bool m_isInDestroy : 1;
bool mbForbidDelete : 1;
void ColLock() { mbColLocked = true; } void ColLock() { mbColLocked = true; }
void ColUnlock() { mbColLocked = false; } void ColUnlock() { mbColLocked = false; }
...@@ -808,6 +809,7 @@ public: ...@@ -808,6 +809,7 @@ public:
bool IsProtected() const; bool IsProtected() const;
bool IsColLocked() const { return mbColLocked; } bool IsColLocked() const { return mbColLocked; }
bool IsDeleteForbidden() const { return mbForbidDelete; }
/// this is the only way to delete a SwFrm instance /// this is the only way to delete a SwFrm instance
static void DestroyFrm(SwFrm *const pFrm); static void DestroyFrm(SwFrm *const pFrm);
...@@ -858,6 +860,9 @@ public: ...@@ -858,6 +860,9 @@ public:
void RegisterToFormat( SwFmt& rFmt ); void RegisterToFormat( SwFmt& rFmt );
void ValidateThisAndAllLowers( const sal_uInt16 nStage ); void ValidateThisAndAllLowers( const sal_uInt16 nStage );
void ForbidDelete() { mbForbidDelete = true; }
void AllowDelete() { mbForbidDelete = false; }
//UUUU //UUUU
drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const; drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
bool supportsFullDrawingLayerFillAttributeSet() const; bool supportsFullDrawingLayerFillAttributeSet() const;
......
...@@ -1045,6 +1045,7 @@ void SwCntntFrm::MakeAll() ...@@ -1045,6 +1045,7 @@ void SwCntntFrm::MakeAll()
return; return;
} }
ForbidDelete();
LockJoin(); LockJoin();
long nFormatCount = 0; long nFormatCount = 0;
// - loop prevention // - loop prevention
...@@ -1674,6 +1675,7 @@ void SwCntntFrm::MakeAll() ...@@ -1674,6 +1675,7 @@ void SwCntntFrm::MakeAll()
delete pSaveFtn; delete pSaveFtn;
UnlockJoin(); UnlockJoin();
AllowDelete();
if ( bMovedFwd || bMovedBwd ) if ( bMovedFwd || bMovedBwd )
pNotify->SetInvaKeep(); pNotify->SetInvaKeep();
// OD 2004-02-26 #i25029# // OD 2004-02-26 #i25029#
......
...@@ -78,6 +78,7 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) : ...@@ -78,6 +78,7 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) :
mbValidPos = mbValidPrtArea = mbValidSize = mbValidLineNum = mbRetouche = mbValidPos = mbValidPrtArea = mbValidSize = mbValidLineNum = mbRetouche =
mbFixSize = mbColLocked = false; mbFixSize = mbColLocked = false;
mbCompletePaint = mbInfInvalid = true; mbCompletePaint = mbInfInvalid = true;
mbForbidDelete = false;
} }
const IDocumentDrawModelAccess* SwFrm::getIDocumentDrawModelAccess() const IDocumentDrawModelAccess* SwFrm::getIDocumentDrawModelAccess()
......
...@@ -561,6 +561,8 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine, ...@@ -561,6 +561,8 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
OSL_FAIL( "+SwTxtFrm::JoinFrm: Follow is locked." ); OSL_FAIL( "+SwTxtFrm::JoinFrm: Follow is locked." );
return; return;
} }
if (GetFollow()->IsDeleteForbidden())
return;
JoinFrm(); JoinFrm();
} }
......
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