summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/access/accmap.cxx9
-rw-r--r--sw/source/core/text/txtfrm.cxx18
2 files changed, 23 insertions, 4 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 4f737a84c7df..714b37b8cebe 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -887,10 +887,19 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
// POS_CHANGED event.
// Therefor, the event's type has to be adapted and the event
// has to be put at the end.
+ //
+ // fdo#56031 An INVALID_CONTENT event overwrites a INVALID_ATTR
+ // event and overwrites its flags
OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
"invalid event combination" );
if( aEvent.GetType() == SwAccessibleEvent_Impl::CARET_OR_STATES )
aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT );
+ else if ( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR )
+ {
+ aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT );
+ aEvent.SetStates( rEvent.GetAllStates() );
+ }
+
break;
case SwAccessibleEvent_Impl::POS_CHANGED:
// A pos changed event overwrites CARET_STATES (keeping its
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index cebe0b579b2e..d76c4fa2cacf 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -912,6 +912,13 @@ static void lcl_ModifyOfst( SwTxtFrm* pFrm, xub_StrLen nPos, xub_StrLen nLen )
}
}
+//Related: fdo#56031 filter out attribute changes that don't matter for
+//humans/a11y to stop flooding the destination mortal with useless noise
+static bool isA11yRelevantAttribute(MSHORT nWhich)
+{
+ return nWhich != RES_CHRATR_RSID;
+}
+
/*************************************************************************
* SwTxtFrm::Modify()
*************************************************************************/
@@ -1294,11 +1301,14 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SwCntntFrm::Modify( pOld, pNew );
}
- // #i88069#
- ViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
- if ( pViewSh )
+ if (isA11yRelevantAttribute(nWhich))
{
- pViewSh->InvalidateAccessibleParaAttrs( *this );
+ // #i88069#
+ ViewShell* pViewSh = getRootFrm() ? getRootFrm()->GetCurrShell() : 0;
+ if ( pViewSh )
+ {
+ pViewSh->InvalidateAccessibleParaAttrs( *this );
+ }
}
}
break;