summaryrefslogtreecommitdiff
path: root/sw/source/core/access/accpara.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/access/accpara.cxx')
-rw-r--r--sw/source/core/access/accpara.cxx49
1 files changed, 25 insertions, 24 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 84fded6f5a2c..0d60a9d09af3 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -480,34 +480,35 @@ void SwAccessibleParagraph::InvalidateCursorPos_()
}
vcl::Window *pWin = GetWindow();
- if( nOld != nNew )
- {
- // The cursor's node position is simulated by the focus!
- if( pWin && pWin->HasFocus() && -1 == nOld )
- FireStateChangedEvent( AccessibleStateType::FOCUSED, true );
+ if( nOld == nNew )
+ return;
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::CARET_CHANGED;
- aEvent.OldValue <<= nOld;
- aEvent.NewValue <<= nNew;
+ // The cursor's node position is simulated by the focus!
+ if( pWin && pWin->HasFocus() && -1 == nOld )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, true );
- FireAccessibleEvent( aEvent );
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CARET_CHANGED;
+ aEvent.OldValue <<= nOld;
+ aEvent.NewValue <<= nNew;
- if( pWin && pWin->HasFocus() && -1 == nNew )
- FireStateChangedEvent( AccessibleStateType::FOCUSED, false );
- //To send TEXT_SELECTION_CHANGED event
- sal_Int32 nStart=0;
- sal_Int32 nEnd =0;
- bool bCurSelection=GetSelection(nStart,nEnd);
- if(m_bLastHasSelection || bCurSelection )
- {
- aEvent.EventId = AccessibleEventId::TEXT_SELECTION_CHANGED;
- aEvent.OldValue.clear();
- aEvent.NewValue.clear();
- FireAccessibleEvent(aEvent);
- }
- m_bLastHasSelection =bCurSelection;
+ FireAccessibleEvent( aEvent );
+
+ if( pWin && pWin->HasFocus() && -1 == nNew )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, false );
+ //To send TEXT_SELECTION_CHANGED event
+ sal_Int32 nStart=0;
+ sal_Int32 nEnd =0;
+ bool bCurSelection=GetSelection(nStart,nEnd);
+ if(m_bLastHasSelection || bCurSelection )
+ {
+ aEvent.EventId = AccessibleEventId::TEXT_SELECTION_CHANGED;
+ aEvent.OldValue.clear();
+ aEvent.NewValue.clear();
+ FireAccessibleEvent(aEvent);
}
+ m_bLastHasSelection =bCurSelection;
+
}
void SwAccessibleParagraph::InvalidateFocus_()