diff options
authorMichael Stahl <>2015-06-05 23:56:07 +0200
committerCaolán McNamara <>2015-06-09 13:03:32 +0000
commitbd46b1994b14a5f5da822d6e68a7b907af0b53bb (patch)
parent38f99a5071bc5f3b68a6833305665b14bd5ba9ed (diff)
tdf#91602: sw: prevent recursive layout crash
SwCrsrShell::UpdateCrsr() calls SwTextFrm::GetCharRect(), which does layout. It happens that a SdrObject is moved around during layout, which calls SwDrawContact::Changed(), which believes that there is no layout active because there is no SwLayAction and ViewShell::EndAction() has already been called, so we get recursive layout-in-layout action. (cherry picked from commit 587006cac508616f486aea45e265a170bcccdc87) tdf#91917 tdf#91602: avoid layout recursion differently (regression from 587006cac508616f486aea45e265a170bcccdc87) (cherry picked from commit 238e07ddca879e0951bef6391fdc5c3fc26bded5) Change-Id: I38e00a7469243088e25aa1a91e3581240b3bbdea Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 4c133e47e43b..228c3144e196 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1742,12 +1742,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
aTmpState.pSpecialPos = &aSpecialPos;
+ ++mnStartAction; // tdf#91602 prevent recursive Action!
if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), &aTmpState ) )
Point& rPt = pShellCrsr->GetPtPos();
rPt = m_aCharRect.Center();
pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
+ --mnStartAction;
if( !pShellCrsr->HasMark() )
m_aCrsrHeight = aTmpState.aRealHeight;