Kaydet (Commit) 0811de12 authored tarafından Michael Stahl's avatar Michael Stahl

i#95974: sw: avoid layout crash on ooo95974-1.odt

There's a SwTxtFrame inside a table, and OptCalc() is called on it which
calls pUpper->Calc(), which reformats rows the table and ends up calling
SwTxtFrm::_AdjustFollow() on some SwTxtFrame that has the first one as
follow.  Use the new ForbidDelete() hack to prevent immediate disaster.

Change-Id: I091704ce6cde15e322986b8f2ecefb5a518f0d8c
üst 63c5de04
......@@ -346,7 +346,9 @@ void SwFrm::OptPrepareMake()
if ( GetUpper() && !GetUpper()->IsFooterFrm() &&
!GetUpper()->IsFlyFrm() )
{
ForbidDelete();
GetUpper()->Calc();
AllowDelete();
OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." );
if ( !GetUpper() )
return;
......@@ -1045,6 +1047,7 @@ void SwCntntFrm::MakeAll()
return;
}
bool const bDeleteForbidden(IsDeleteForbidden());
ForbidDelete();
LockJoin();
long nFormatCount = 0;
......@@ -1675,7 +1678,8 @@ void SwCntntFrm::MakeAll()
delete pSaveFtn;
UnlockJoin();
AllowDelete();
if (!bDeleteForbidden)
AllowDelete();
if ( bMovedFwd || bMovedBwd )
pNotify->SetInvaKeep();
// OD 2004-02-26 #i25029#
......
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