tdf#150708 if the old is CARET_OR_STATES then try updating it

with the additional states. Hard to know if this is a sensible approach.

Change-Id: I0d55d41c4dd9cbb17fb736e5145671cd6a8b25ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145460
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 4f33788..13fcbe6 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1060,8 +1060,15 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
                bAppendEvent = false;
                break;
            case SwAccessibleEvent_Impl::INVALID_ATTR:
                OSL_ENSURE( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR,
                        "invalid event combination" );
                // tdf#150708 if the old is CARET_OR_STATES then try updating it
                // with the additional states
                if (aEvent.GetType() == SwAccessibleEvent_Impl::CARET_OR_STATES)
                    aEvent.SetStates(rEvent.GetAllStates());
                else
                {
                    OSL_ENSURE( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR,
                            "invalid event combination" );
                }
                break;
            }
            if( bAppendEvent )