AccessibleFrameSelector.cxx (f6e50924) | AccessibleFrameSelector.cxx (9b8096d0) |
---|---|
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 --- 176 unchanged lines hidden (view full) --- 185 throw RuntimeException(); 186 return nIdx; 187} 188 189// ---------------------------------------------------------------------------- 190 191sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException) 192{ | 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 --- 176 unchanged lines hidden (view full) --- 185 throw RuntimeException(); 186 return nIdx; 187} 188 189// ---------------------------------------------------------------------------- 190 191sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException) 192{ |
193 return AccessibleRole::OPTION_PANE; | 193 // return AccessibleRole::OPTION_PANE; 194 //IAccessibility2 Implementation 2009----- 195 return meBorder == FRAMEBORDER_NONE ? AccessibleRole::OPTION_PANE : AccessibleRole::CHECK_BOX; 196 //-----IAccessibility2 Implementation 2009 |
194} 195 196// ---------------------------------------------------------------------------- 197 198OUString AccFrameSelector::getAccessibleDescription( ) 199 throw (RuntimeException) 200{ 201 vos::OGuard aGuard(Application::GetSolarMutex()); --- 15 unchanged lines hidden (view full) --- 217 218Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( ) 219 throw (RuntimeException) 220{ 221 vos::OGuard aGuard(Application::GetSolarMutex()); 222 IsValid(); 223 utl::AccessibleRelationSetHelper* pHelper; 224 Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; | 197} 198 199// ---------------------------------------------------------------------------- 200 201OUString AccFrameSelector::getAccessibleDescription( ) 202 throw (RuntimeException) 203{ 204 vos::OGuard aGuard(Application::GetSolarMutex()); --- 15 unchanged lines hidden (view full) --- 220 221Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( ) 222 throw (RuntimeException) 223{ 224 vos::OGuard aGuard(Application::GetSolarMutex()); 225 IsValid(); 226 utl::AccessibleRelationSetHelper* pHelper; 227 Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; |
228 //if(meBorder == FRAMEBORDER_NONE) 229 //{ 230 // //add the label relation 231 // Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV ); 232 // if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType()) 233 // { 234 // AccessibleRelation aLabelRelation; 235 // aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY; 236 // aLabelRelation.TargetSet.realloc(1); 237 // aLabelRelation.TargetSet.getArray()[0] = pPrev->GetAccessible(); 238 // pHelper->AddRelation(aLabelRelation); 239 // } 240 //} 241 //IAccessibility2 Implementation 2009----- |
|
225 if(meBorder == FRAMEBORDER_NONE) 226 { 227 //add the label relation | 242 if(meBorder == FRAMEBORDER_NONE) 243 { 244 //add the label relation |
228 Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV ); 229 if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType()) 230 { 231 AccessibleRelation aLabelRelation; | 245 Window *pLabeledBy = mpFrameSel->GetAccessibleRelationLabeledBy(); 246 if ( pLabeledBy && pLabeledBy != mpFrameSel ) 247 { 248 AccessibleRelation aLabelRelation; |
232 aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY; 233 aLabelRelation.TargetSet.realloc(1); | 249 aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY; 250 aLabelRelation.TargetSet.realloc(1); |
234 aLabelRelation.TargetSet.getArray()[0] = pPrev->GetAccessible(); | 251 aLabelRelation.TargetSet.getArray()[0] = pLabeledBy->GetAccessible(); |
235 pHelper->AddRelation(aLabelRelation); | 252 pHelper->AddRelation(aLabelRelation); |
236 } | 253 } 254 Window* pMemberOf = mpFrameSel->GetAccessibleRelationMemberOf(); 255 if ( pMemberOf && pMemberOf != mpFrameSel ) 256 { 257 AccessibleRelation aMemberOfRelation; 258 aMemberOfRelation.RelationType = AccessibleRelationType::MEMBER_OF; 259 aMemberOfRelation.TargetSet.realloc(1); 260 aMemberOfRelation.TargetSet.getArray()[0] = pMemberOf->GetAccessible(); 261 pHelper->AddRelation(aMemberOfRelation); 262 } |
237 } | 263 } |
264 //-----IAccessibility2 Implementation 2009 |
|
238 return xRet; 239} 240 241// ---------------------------------------------------------------------------- 242 243Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet( ) 244 throw (RuntimeException) 245{ --- 470 unchanged lines hidden (view full) --- 716 ::comphelper::AccessibleEventNotifier::addEvent( mnClientId, aEvent ); 717 } 718} 719 720// ---------------------------------------------------------------------------- 721 722void AccFrameSelector::Invalidate() 723{ | 265 return xRet; 266} 267 268// ---------------------------------------------------------------------------- 269 270Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet( ) 271 throw (RuntimeException) 272{ --- 470 unchanged lines hidden (view full) --- 743 ::comphelper::AccessibleEventNotifier::addEvent( mnClientId, aEvent ); 744 } 745} 746 747// ---------------------------------------------------------------------------- 748 749void AccFrameSelector::Invalidate() 750{ |
751 if ( mpFrameSel ) 752 { 753 mpFrameSel->RemoveEventListener( LINK( this, AccFrameSelector, WindowEventListener ) ); 754 } |
|
724 mpFrameSel = 0; 725 EventObject aEvent; 726 Reference < XAccessibleContext > xThis( this ); 727 aEvent.Source = xThis; 728 maFocusListeners.disposeAndClear( aEvent ); 729 maPropertyListeners.disposeAndClear( aEvent ); 730} 731 732// ============================================================================ 733 734} // namespace a11y 735} // namespace svx 736 | 755 mpFrameSel = 0; 756 EventObject aEvent; 757 Reference < XAccessibleContext > xThis( this ); 758 aEvent.Source = xThis; 759 maFocusListeners.disposeAndClear( aEvent ); 760 maPropertyListeners.disposeAndClear( aEvent ); 761} 762 763// ============================================================================ 764 765} // namespace a11y 766} // namespace svx 767 |