[PATCH libreoffice-3-6] Resolves: fdo#56031 RSID attr changes drop content change ev...
Caolán McNamara (via_Code_Review)
gerrit at gerrit.libreoffice.org
Wed Feb 27 04:45:24 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2441
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/41/2441/1
Resolves: fdo#56031 RSID attr changes drop content change events
So if we have an INVALID_ATTR event in the queue and receive
INVALID_CONTENT, drop the attr and replace it with invalid-content
And anyway filter out the RSID change event from hitting the
a11y queue, humans don't care that this changed, it's just noise
Change-Id: I4842f217153fc90aa1dce75c3445053004c74536
(cherry picked from commit 8d08ccd5b84c121867d7b3102f9d10b26005c682)
Reviewed-on: https://gerrit.libreoffice.org/2401
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
(cherry picked from commit 791a060bd1031c844a9a1b283689dee6a8a7ef77)
---
M sw/source/core/access/accmap.cxx
M sw/source/core/text/txtfrm.cxx
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 5e3a825..28107d7 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -896,10 +896,19 @@
// 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 1005969..1ccd660 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -921,6 +921,13 @@
}
}
+//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()
*************************************************************************/
@@ -1303,11 +1310,14 @@
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;
--
To view, visit https://gerrit.libreoffice.org/2441
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4842f217153fc90aa1dce75c3445053004c74536
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Caolán McNamara <caolanm at redhat.com>
Gerrit-Reviewer: Fridrich Strba <fridrich at documentfoundation.org>
More information about the LibreOffice
mailing list