diff options
author | Steve Yin <steve_y@apache.org> | 2013-11-27 13:03:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-27 15:38:59 +0000 |
commit | 60f11adb950e4f9645cc9ecb0f5af8235cc97366 (patch) | |
tree | a4a758c31820e909d266f8b5cd49c651011acae9 /svx/source/dialog/charmap.cxx | |
parent | e022c608fd927bfec20bdec5bee5b600668eeaac (diff) |
Integrate branch of IAccessible2
Change-Id: I8327fb4ba2a86d4caa52b875221175b80464842a
Diffstat (limited to 'svx/source/dialog/charmap.cxx')
-rw-r--r-- | svx/source/dialog/charmap.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 24fc2ce54f5a..7315edfb7ea9 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -149,7 +149,8 @@ void SvxShowCharSet::MouseButtonDown( const MouseEvent& rMEvt ) CaptureMouse(); int nIndex = PixelToMapIndex( rMEvt.GetPosPixel() ); - SelectIndex( nIndex ); + // Fire the focus event + SelectIndex( nIndex , sal_True); } if ( !(rMEvt.GetClicks() % 2) ) @@ -190,7 +191,8 @@ void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt ) aPos.Y() = aSize.Height()-5; int nIndex = PixelToMapIndex( aPos ); - SelectIndex( nIndex ); + // Fire the focus event. + SelectIndex( nIndex , sal_True ); } } @@ -629,12 +631,18 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, sal_Bool bFocus ) if( m_pAccessible ) { ::svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex); - m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set + // Don't fire the focus event. + if ( bFocus ) + m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set + else + m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set OSL_ENSURE(pItem->m_pItem,"No accessible created!"); Any aOldAny, aNewAny; aNewAny <<= AccessibleStateType::FOCUSED; - pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny ); + // Don't fire the focus event. + if ( bFocus ) + pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny ); aNewAny <<= AccessibleStateType::SELECTED; pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny ); |