vclxaccessiblescrollbar.cxx (4d7c9de0) | vclxaccessiblescrollbar.cxx (15466770) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 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 9 * with the License. You may obtain a copy of the License at | 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 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_accessibility.hxx" 26 27// includes -------------------------------------------------------------- --- 34 unchanged lines hidden (view full) --- 62VCLXAccessibleScrollBar::~VCLXAccessibleScrollBar() 63{ 64} 65 66// ----------------------------------------------------------------------------- 67 68void VCLXAccessibleScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) 69{ | 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_accessibility.hxx" 26 27// includes -------------------------------------------------------------- --- 34 unchanged lines hidden (view full) --- 62VCLXAccessibleScrollBar::~VCLXAccessibleScrollBar() 63{ 64} 65 66// ----------------------------------------------------------------------------- 67 68void VCLXAccessibleScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) 69{ |
70 switch ( rVclWindowEvent.GetId() ) 71 { | 70 switch ( rVclWindowEvent.GetId() ) 71 { |
72 case VCLEVENT_SCROLLBAR_SCROLL: | 72 case VCLEVENT_SCROLLBAR_SCROLL: |
73 { 74 NotifyAccessibleEvent( AccessibleEventId::VALUE_CHANGED, Any(), Any() ); 75 } 76 break; | 73 { 74 NotifyAccessibleEvent( AccessibleEventId::VALUE_CHANGED, Any(), Any() ); 75 } 76 break; |
77 default: 78 VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); | 77 default: 78 VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); |
79 } | 79 } |
80} 81 82// ----------------------------------------------------------------------------- 83 84void VCLXAccessibleScrollBar::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) 85{ 86 VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet ); 87 88 VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); 89 if ( pVCLXScrollBar ) 90 { 91 // IA2 CWS: scroll bar should not have FOCUSABLE state. | 80} 81 82// ----------------------------------------------------------------------------- 83 84void VCLXAccessibleScrollBar::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) 85{ 86 VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet ); 87 88 VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); 89 if ( pVCLXScrollBar ) 90 { 91 // IA2 CWS: scroll bar should not have FOCUSABLE state. |
92 // rStateSet.AddState( AccessibleStateType::FOCUSABLE ); | 92 // rStateSet.AddState( AccessibleStateType::FOCUSABLE ); |
93 if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL ) | 93 if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL ) |
94 rStateSet.AddState( AccessibleStateType::HORIZONTAL ); | 94 rStateSet.AddState( AccessibleStateType::HORIZONTAL ); |
95 else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL ) | 95 else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL ) |
96 rStateSet.AddState( AccessibleStateType::VERTICAL ); | 96 rStateSet.AddState( AccessibleStateType::VERTICAL ); |
97 } 98} 99 100// ----------------------------------------------------------------------------- 101// XInterface 102// ----------------------------------------------------------------------------- 103 104IMPLEMENT_FORWARD_XINTERFACE2( VCLXAccessibleScrollBar, VCLXAccessibleComponent, VCLXAccessibleScrollBar_BASE ) --- 5 unchanged lines hidden (view full) --- 110IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleScrollBar, VCLXAccessibleComponent, VCLXAccessibleScrollBar_BASE ) 111 112// ----------------------------------------------------------------------------- 113// XServiceInfo 114// ----------------------------------------------------------------------------- 115 116::rtl::OUString VCLXAccessibleScrollBar::getImplementationName() throw (RuntimeException) 117{ | 97 } 98} 99 100// ----------------------------------------------------------------------------- 101// XInterface 102// ----------------------------------------------------------------------------- 103 104IMPLEMENT_FORWARD_XINTERFACE2( VCLXAccessibleScrollBar, VCLXAccessibleComponent, VCLXAccessibleScrollBar_BASE ) --- 5 unchanged lines hidden (view full) --- 110IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleScrollBar, VCLXAccessibleComponent, VCLXAccessibleScrollBar_BASE ) 111 112// ----------------------------------------------------------------------------- 113// XServiceInfo 114// ----------------------------------------------------------------------------- 115 116::rtl::OUString VCLXAccessibleScrollBar::getImplementationName() throw (RuntimeException) 117{ |
118 return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleScrollBar" ); | 118 return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleScrollBar" ); |
119} 120 121// ----------------------------------------------------------------------------- 122 123Sequence< ::rtl::OUString > VCLXAccessibleScrollBar::getSupportedServiceNames() throw (RuntimeException) 124{ 125 Sequence< ::rtl::OUString > aNames(1); 126 aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleScrollBar" ); --- 13 unchanged lines hidden (view full) --- 140 141// ----------------------------------------------------------------------------- 142 143sal_Bool VCLXAccessibleScrollBar::doAccessibleAction ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 144{ 145 OExternalLockGuard aGuard( this ); 146 147 if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) | 119} 120 121// ----------------------------------------------------------------------------- 122 123Sequence< ::rtl::OUString > VCLXAccessibleScrollBar::getSupportedServiceNames() throw (RuntimeException) 124{ 125 Sequence< ::rtl::OUString > aNames(1); 126 aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleScrollBar" ); --- 13 unchanged lines hidden (view full) --- 140 141// ----------------------------------------------------------------------------- 142 143sal_Bool VCLXAccessibleScrollBar::doAccessibleAction ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 144{ 145 OExternalLockGuard aGuard( this ); 146 147 if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) |
148 throw IndexOutOfBoundsException(); | 148 throw IndexOutOfBoundsException(); |
149 150 sal_Bool bReturn = sal_False; 151 ScrollBar* pScrollBar = static_cast< ScrollBar* >( GetWindow() ); 152 if ( pScrollBar ) 153 { 154 ScrollType eScrollType; 155 switch ( nIndex ) 156 { --- 12 unchanged lines hidden (view full) --- 169 170// ----------------------------------------------------------------------------- 171 172::rtl::OUString VCLXAccessibleScrollBar::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 173{ 174 OExternalLockGuard aGuard( this ); 175 176 if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) | 149 150 sal_Bool bReturn = sal_False; 151 ScrollBar* pScrollBar = static_cast< ScrollBar* >( GetWindow() ); 152 if ( pScrollBar ) 153 { 154 ScrollType eScrollType; 155 switch ( nIndex ) 156 { --- 12 unchanged lines hidden (view full) --- 169 170// ----------------------------------------------------------------------------- 171 172::rtl::OUString VCLXAccessibleScrollBar::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 173{ 174 OExternalLockGuard aGuard( this ); 175 176 if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) |
177 throw IndexOutOfBoundsException(); | 177 throw IndexOutOfBoundsException(); |
178 179 ::rtl::OUString sDescription; 180 181 switch ( nIndex ) 182 { 183 case 0: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECLINE ) ); break; 184 case 1: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_INCLINE ) ); break; 185 case 2: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECBLOCK ) ); break; --- 6 unchanged lines hidden (view full) --- 192 193// ----------------------------------------------------------------------------- 194 195Reference< XAccessibleKeyBinding > VCLXAccessibleScrollBar::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 196{ 197 OExternalLockGuard aGuard( this ); 198 199 if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) | 178 179 ::rtl::OUString sDescription; 180 181 switch ( nIndex ) 182 { 183 case 0: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECLINE ) ); break; 184 case 1: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_INCLINE ) ); break; 185 case 2: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECBLOCK ) ); break; --- 6 unchanged lines hidden (view full) --- 192 193// ----------------------------------------------------------------------------- 194 195Reference< XAccessibleKeyBinding > VCLXAccessibleScrollBar::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 196{ 197 OExternalLockGuard aGuard( this ); 198 199 if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) |
200 throw IndexOutOfBoundsException(); | 200 throw IndexOutOfBoundsException(); |
201 | 201 |
202 return Reference< XAccessibleKeyBinding >(); | 202 return Reference< XAccessibleKeyBinding >(); |
203} 204 205// ----------------------------------------------------------------------------- 206// XAccessibleValue 207// ----------------------------------------------------------------------------- 208 209Any VCLXAccessibleScrollBar::getCurrentValue( ) throw (RuntimeException) 210{ --- 42 unchanged lines hidden (view full) --- 253{ 254 OExternalLockGuard aGuard( this ); 255 256 Any aValue; 257 258 VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); 259 if ( pVCLXScrollBar ) 260 aValue <<= (sal_Int32) pVCLXScrollBar->getMaximum(); | 203} 204 205// ----------------------------------------------------------------------------- 206// XAccessibleValue 207// ----------------------------------------------------------------------------- 208 209Any VCLXAccessibleScrollBar::getCurrentValue( ) throw (RuntimeException) 210{ --- 42 unchanged lines hidden (view full) --- 253{ 254 OExternalLockGuard aGuard( this ); 255 256 Any aValue; 257 258 VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); 259 if ( pVCLXScrollBar ) 260 aValue <<= (sal_Int32) pVCLXScrollBar->getMaximum(); |
261 | 261 |
262 return aValue; 263} 264 265// ----------------------------------------------------------------------------- 266 267Any VCLXAccessibleScrollBar::getMinimumValue( ) throw (RuntimeException) 268{ 269 OExternalLockGuard aGuard( this ); 270 271 Any aValue; 272 aValue <<= (sal_Int32) 0; | 262 return aValue; 263} 264 265// ----------------------------------------------------------------------------- 266 267Any VCLXAccessibleScrollBar::getMinimumValue( ) throw (RuntimeException) 268{ 269 OExternalLockGuard aGuard( this ); 270 271 Any aValue; 272 aValue <<= (sal_Int32) 0; |
273 | 273 |
274 return aValue; 275} 276 277// ----------------------------------------------------------------------------- 278 279::rtl::OUString VCLXAccessibleScrollBar::getAccessibleName( ) throw (uno::RuntimeException) 280{ 281 OExternalLockGuard aGuard( this ); 282 283 ::rtl::OUString aName; 284 VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); 285 if ( pVCLXScrollBar ) 286 { 287 if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL ) | 274 return aValue; 275} 276 277// ----------------------------------------------------------------------------- 278 279::rtl::OUString VCLXAccessibleScrollBar::getAccessibleName( ) throw (uno::RuntimeException) 280{ 281 OExternalLockGuard aGuard( this ); 282 283 ::rtl::OUString aName; 284 VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); 285 if ( pVCLXScrollBar ) 286 { 287 if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL ) |
288 aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL ); | 288 aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL ); |
289 else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL ) | 289 else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL ) |
290 aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_VERTICAL ); | 290 aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_VERTICAL ); |
291 } 292 return aName; 293} | 291 } 292 return aName; 293} |
294 | |