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

Michael Stahl mstahl at redhat.com
Thu Apr 27 20:13:39 UTC 2017


 sw/source/core/access/accframe.cxx |    1 +
 sw/source/core/access/accmap.cxx   |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 19850d847745adca4e9a2506673cc104933489dd
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Apr 21 23:50:23 2017 +0200

    sw: fix a11y crash on double Dispose
    
    When testing with the bugdoc for tdf#107126, it happend that upon
    applying a page style, SwAccessibleContext::Dispose() was called twice,
    and that's not supposed to happen (and crashes, too, at least inside
    an assertion).
    
    There was an Action that queued up a bunch of events, but the Action did
    not complete formatting the document, so right after that during Paint
    more formatting happened and then the FireEvents() called Dispose()
    and InvalidatePosOrSize() called it again.  Guess we shouldn't generate
    events for objects that we know are disposed due to not being visible.
    
    (cherry picked from commit c99f72bebdce6d294eb47e070fa1397a98ba2087)
    
    fix the build
    (cherry picked from commit 42b40ede8c496aad1021e68a72523af4f57e89f6)
    
    sw: let's check GetFrame() instead, it's already public
    (cherry picked from commit 3b83ef0d24347a39a925996c5d2958fcdc2473d7)
    
    Change-Id: I5a0f04c0f32ee5e949b552f7a373c10ceee5c279
    Reviewed-on: https://gerrit.libreoffice.org/37005
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index b4beb8c5d77d..8f8a09953995 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -418,6 +418,7 @@ SwAccessibleFrame::SwAccessibleFrame( const SwRect& rVisArea,
     mbIsInPagePreview( bIsPagePreview ),
     bIsAccDocUse( false )
 {
+    assert(mpFrame);
 }
 
 SwAccessibleFrame::~SwAccessibleFrame()
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 114e7f17b4a8..0faee74144b7 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2401,7 +2401,10 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrame *pFrame,
             else
             {
                 FireEvents();
-                xAccImpl->InvalidatePosOrSize( rOldBox );
+                if (xAccImpl->GetFrame()) // not if disposed by FireEvents()
+                {
+                    xAccImpl->InvalidatePosOrSize(rOldBox);
+                }
             }
         }
         else if( xParentAccImpl.is() )


More information about the Libreoffice-commits mailing list