[Libreoffice-commits] core.git: sw/source
Michael Stahl
mstahl at redhat.com
Wed May 13 12:52:45 PDT 2015
sw/source/core/layout/calcmove.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 0811de12ee6727bbb9d4265217833ba02301eed8
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed May 13 17:55:46 2015 +0200
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
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 2a82263..8e101e7 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -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#
More information about the Libreoffice-commits
mailing list