atkutil.cxx (9f62ea84) | atkutil.cxx (54a6759e) |
---|---|
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 --- 188 unchanged lines hidden (view full) --- 197 198} 199 200/*****************************************************************************/ 201 202void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObject& aEvent ) 203 throw( uno::RuntimeException ) 204{ | 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 --- 188 unchanged lines hidden (view full) --- 197 198} 199 200/*****************************************************************************/ 201 202void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObject& aEvent ) 203 throw( uno::RuntimeException ) 204{ |
205 switch( aEvent.EventId ) 206 { 207 case accessibility::AccessibleEventId::STATE_CHANGED: 208 try | 205 try { 206 switch( aEvent.EventId ) 207 { 208 case accessibility::AccessibleEventId::STATE_CHANGED: |
209 { 210 sal_Int16 nState = accessibility::AccessibleStateType::INVALID; 211 aEvent.NewValue >>= nState; 212 213 if( accessibility::AccessibleStateType::FOCUSED == nState ) 214 atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) ); 215 } | 209 { 210 sal_Int16 nState = accessibility::AccessibleStateType::INVALID; 211 aEvent.NewValue >>= nState; 212 213 if( accessibility::AccessibleStateType::FOCUSED == nState ) 214 atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) ); 215 } |
216 catch(const lang::IndexOutOfBoundsException &e) 217 { 218 g_warning("Focused object has invalid index in parent"); 219 } | |
220 break; 221 | 216 break; 217 |
222 case accessibility::AccessibleEventId::CHILD: 223 { 224 uno::Reference< accessibility::XAccessible > xChild; 225 if( (aEvent.OldValue >>= xChild) && xChild.is() ) 226 detachRecursive(xChild); | 218 case accessibility::AccessibleEventId::CHILD: 219 { 220 uno::Reference< accessibility::XAccessible > xChild; 221 if( (aEvent.OldValue >>= xChild) && xChild.is() ) 222 detachRecursive(xChild); |
227 | 223 |
228 if( (aEvent.NewValue >>= xChild) && xChild.is() ) 229 attachRecursive(xChild); 230 } | 224 if( (aEvent.NewValue >>= xChild) && xChild.is() ) 225 attachRecursive(xChild); 226 } |
231 break; 232 | 227 break; 228 |
233 case accessibility::AccessibleEventId::INVALIDATE_ALL_CHILDREN: | 229 case accessibility::AccessibleEventId::INVALIDATE_ALL_CHILDREN: |
234/* { 235 uno::Reference< accessibility::XAccessible > xAccessible( getAccessible(aEvent) ); 236 detachRecursive(xAccessible); 237 attachRecursive(xAccessible); | 230/* { 231 uno::Reference< accessibility::XAccessible > xAccessible( getAccessible(aEvent) ); 232 detachRecursive(xAccessible); 233 attachRecursive(xAccessible); |
238 } | 234 } |
239*/ 240 g_warning( "Invalidate all children called\n" ); 241 break; | 235*/ 236 g_warning( "Invalidate all children called\n" ); 237 break; |
242 default: 243 break; | 238 239 default: 240 break; 241 } |
244 } | 242 } |
243 catch( const lang::IndexOutOfBoundsException& e ) 244 { 245 g_warning("Focused object has invalid index in parent"); 246 } |
|
245} 246 247/*****************************************************************************/ 248 249uno::Reference< accessibility::XAccessible > DocumentFocusListener::getAccessible(const lang::EventObject& aEvent ) 250 throw (lang::IndexOutOfBoundsException, uno::RuntimeException) 251{ 252 uno::Reference< accessibility::XAccessible > xAccessible(aEvent.Source, uno::UNO_QUERY); --- 545 unchanged lines hidden --- | 247} 248 249/*****************************************************************************/ 250 251uno::Reference< accessibility::XAccessible > DocumentFocusListener::getAccessible(const lang::EventObject& aEvent ) 252 throw (lang::IndexOutOfBoundsException, uno::RuntimeException) 253{ 254 uno::Reference< accessibility::XAccessible > xAccessible(aEvent.Source, uno::UNO_QUERY); --- 545 unchanged lines hidden --- |