accessibletablistboxtable.cxx (0841af79) accessibletablistboxtable.cxx (21075d77)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 18 unchanged lines hidden (view full) ---

27#ifndef ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOXTABLE_HXX_
28#include "accessibility/extended/accessibletablistboxtable.hxx"
29#endif
30#include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx"
31#include "accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx"
32#include <svtools/svtabbx.hxx>
33#include <com/sun/star/accessibility/AccessibleEventId.hpp>
34
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 18 unchanged lines hidden (view full) ---

27#ifndef ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOXTABLE_HXX_
28#include "accessibility/extended/accessibletablistboxtable.hxx"
29#endif
30#include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx"
31#include "accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx"
32#include <svtools/svtabbx.hxx>
33#include <com/sun/star/accessibility/AccessibleEventId.hpp>
34
35#ifndef _SVTOOLS_ACCESSIBILEBROWSEBOXTABLECELL_HXX
36#include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx"
37#endif
35//........................................................................
36namespace accessibility
37{
38//........................................................................
39
40 // class TLBSolarGuard ---------------------------------------------------------
41
42 /** Aquire the solar mutex. */

--- 106 unchanged lines hidden (view full) ---

149 {
150 aNewValue <<= xChild;
151 commitEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aNewValue, aOldValue );
152 }
153 }
154 }
155 break;
156 }
38//........................................................................
39namespace accessibility
40{
41//........................................................................
42
43 // class TLBSolarGuard ---------------------------------------------------------
44
45 /** Aquire the solar mutex. */

--- 106 unchanged lines hidden (view full) ---

152 {
153 aNewValue <<= xChild;
154 commitEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aNewValue, aOldValue );
155 }
156 }
157 }
158 break;
159 }
160 case VCLEVENT_WINDOW_GETFOCUS :
161 {
162 uno::Any aOldValue, aNewValue;
163 aNewValue <<= AccessibleStateType::FOCUSED;
164 commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue, aOldValue );
165 break;
166
167 }
168 case VCLEVENT_WINDOW_LOSEFOCUS :
169 {
170 uno::Any aOldValue, aNewValue;
171 aOldValue <<= AccessibleStateType::FOCUSED;
172 commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue, aOldValue );
173 break;
174 }
175 case VCLEVENT_LISTBOX_TREESELECT:
176 {
177 SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
178 if (pEntry)
179 {
180 sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
181 Reference< XAccessible > xChild = m_pTabListBox->CreateAccessibleCell( nRow, m_pTabListBox->GetCurrColumn() );
182 TriState eState = STATE_DONTKNOW;
183 if ( m_pTabListBox->IsCellCheckBox( nRow, m_pTabListBox->GetCurrColumn(), eState ) )
184 {
185 AccessibleCheckBoxCell* pCell = static_cast< AccessibleCheckBoxCell* >( xChild.get() );
186 pCell->commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
187 }
188 else
189 {
190 AccessibleBrowseBoxTableCell* pCell = static_cast< AccessibleBrowseBoxTableCell* >( xChild.get() );
191 pCell->commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
192 }
193 }
194 }
195 break;
196 case VCLEVENT_LISTBOX_TREEFOCUS:
197 {
198 if ( m_pTabListBox && m_pTabListBox->HasFocus() )
199 {
200 uno::Any aOldValue, aNewValue;
201 SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
202 if ( pEntry )
203 {
204 sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
205 m_xCurChild = m_pTabListBox->CreateAccessibleCell( nRow, m_pTabListBox->GetCurrColumn() );
206 aNewValue <<= m_xCurChild;
207 commitEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aNewValue ,aOldValue);
208 }
209 else
210 {
211 aNewValue <<= AccessibleStateType::FOCUSED;
212 commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue ,aOldValue);
213 }
214 }
215 }
216 break;
157
158 case VCLEVENT_CHECKBOX_TOGGLE :
159 {
160 if ( m_pTabListBox && m_pTabListBox->HasFocus() )
161 {
162 SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
163 if ( pEntry )
164 {

--- 215 unchanged lines hidden ---
217
218 case VCLEVENT_CHECKBOX_TOGGLE :
219 {
220 if ( m_pTabListBox && m_pTabListBox->HasFocus() )
221 {
222 SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
223 if ( pEntry )
224 {

--- 215 unchanged lines hidden ---