[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

Michael Stahl mstahl at redhat.com
Tue Jun 9 06:03:59 PDT 2015


 sw/source/core/crsr/crsrsh.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit bd46b1994b14a5f5da822d6e68a7b907af0b53bb
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jun 5 23:56:07 2015 +0200

    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: https://gerrit.libreoffice.org/16184
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 4c133e4..228c314 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;


More information about the Libreoffice-commits mailing list