Kaydet (Commit) 104ed86c authored tarafından Michael Stahl's avatar Michael Stahl

sw: fix SwAccessibleParagraph crash on delete

It happens that SwAccessibleParagraph::getCharacterBounds() is called
from ATK with a clearly invalid pPortionData member; the SwTxtNode has
no text but there are portions.

This is because after a deletion both a POS_CHANGED and a
INVALID_CONTENT event are created for the same SwAccessibleParagraph,
and they are merged into one POS_CHANGED event by
SwAccessibleMap::AppendEvent(), but
SwAccessibleContext::InvalidatePosOrSize() returns early if the
paragraph happens to not be visible, skipping the invalidation.

(regression from 76c549eb, which
 removed a Dispose() call; not sure if the Dispose() is needed here)

Change-Id: I985e9a439ee6c7024963eace876186f2247b9e03
üst deb50a2a
......@@ -1160,12 +1160,9 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
FireVisibleDataEvent();
}
if( !bIsNewShowingState &&
SwAccessibleChild( GetParent() ).IsVisibleChildrenOnly() )
{
return;
}
// note: InvalidatePosOrSize must call _InvalidateContent so that
// SwAccessibleParagraph updates its portions, or dispose it
// (see accmap.cxx: INVALID_CONTENT is contained in POS_CHANGED)
_InvalidateContent( true );
}
......
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