1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_svx.hxx" 30*cdf0e10cSrcweir #include "AccessibleFrameSelector.hxx" 31*cdf0e10cSrcweir #include <com/sun/star/awt/KeyEvent.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/awt/KeyModifier.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/awt/Key.hpp> 34*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HDL_ 35*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleStateType.hpp> 36*cdf0e10cSrcweir #endif 37*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HDL_ 38*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleRelationType.hpp> 39*cdf0e10cSrcweir #endif 40*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HDL_ 41*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleRole.hpp> 42*cdf0e10cSrcweir #endif 43*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleEventId.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/awt/FocusChangeReason.hpp> 45*cdf0e10cSrcweir #include <unotools/accessiblestatesethelper.hxx> 46*cdf0e10cSrcweir #include <unotools/accessiblerelationsethelper.hxx> 47*cdf0e10cSrcweir #include <vos/mutex.hxx> 48*cdf0e10cSrcweir #include <vcl/svapp.hxx> 49*cdf0e10cSrcweir #include <svx/frmsel.hxx> 50*cdf0e10cSrcweir #include <svx/dialmgr.hxx> 51*cdf0e10cSrcweir #include "editeng/unolingu.hxx" 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir #ifndef _SVX_DIALOGS_HRC 54*cdf0e10cSrcweir #include <svx/dialogs.hrc> 55*cdf0e10cSrcweir #endif 56*cdf0e10cSrcweir #ifndef SVX_FRMSEL_HRC 57*cdf0e10cSrcweir #include "frmsel.hrc" 58*cdf0e10cSrcweir #endif 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir #ifndef MNEMONIC_CHAR 61*cdf0e10cSrcweir #define MNEMONIC_CHAR ((sal_Unicode)'~') 62*cdf0e10cSrcweir #endif 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir namespace svx { 65*cdf0e10cSrcweir namespace a11y { 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir using ::rtl::OUString; 68*cdf0e10cSrcweir using ::com::sun::star::uno::Any; 69*cdf0e10cSrcweir using ::com::sun::star::uno::UNO_QUERY; 70*cdf0e10cSrcweir using ::com::sun::star::uno::Reference; 71*cdf0e10cSrcweir using ::com::sun::star::uno::Sequence; 72*cdf0e10cSrcweir using ::com::sun::star::uno::RuntimeException; 73*cdf0e10cSrcweir using ::com::sun::star::uno::XInterface; 74*cdf0e10cSrcweir using ::com::sun::star::lang::Locale; 75*cdf0e10cSrcweir using ::com::sun::star::lang::EventObject; 76*cdf0e10cSrcweir using ::com::sun::star::beans::XPropertyChangeListener; 77*cdf0e10cSrcweir using ::com::sun::star::awt::XFocusListener; 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir using namespace ::com::sun::star::accessibility; 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir namespace AwtKey = ::com::sun::star::awt::Key; 82*cdf0e10cSrcweir namespace AwtKeyModifier = ::com::sun::star::awt::KeyModifier; 83*cdf0e10cSrcweir namespace AwtFocusChangeReason = ::com::sun::star::awt::FocusChangeReason; 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir typedef ::com::sun::star::awt::Point AwtPoint; 86*cdf0e10cSrcweir typedef ::com::sun::star::awt::Size AwtSize; 87*cdf0e10cSrcweir typedef ::com::sun::star::awt::Rectangle AwtRectangle; 88*cdf0e10cSrcweir typedef ::com::sun::star::awt::KeyEvent AwtKeyEvent; 89*cdf0e10cSrcweir typedef ::com::sun::star::awt::FocusEvent AwtFocusEvent; 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir // ============================================================================ 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir AccFrameSelector::AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eBorder ) : 94*cdf0e10cSrcweir Resource( SVX_RES( RID_SVXSTR_BORDER_CONTROL ) ), 95*cdf0e10cSrcweir mpFrameSel( &rFrameSel ), 96*cdf0e10cSrcweir meBorder( eBorder ), 97*cdf0e10cSrcweir maFocusListeners( maFocusMutex ), 98*cdf0e10cSrcweir maPropertyListeners( maPropertyMutex ), 99*cdf0e10cSrcweir maNames( SVX_RES( ARR_TEXTS ) ), 100*cdf0e10cSrcweir maDescriptions( SVX_RES(ARR_DESCRIPTIONS ) ), 101*cdf0e10cSrcweir mnClientId( 0 ) 102*cdf0e10cSrcweir { 103*cdf0e10cSrcweir FreeResource(); 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir if ( mpFrameSel ) 106*cdf0e10cSrcweir { 107*cdf0e10cSrcweir mpFrameSel->AddEventListener( LINK( this, AccFrameSelector, WindowEventListener ) ); 108*cdf0e10cSrcweir } 109*cdf0e10cSrcweir } 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir AccFrameSelector::~AccFrameSelector() 114*cdf0e10cSrcweir { 115*cdf0e10cSrcweir if ( mpFrameSel ) 116*cdf0e10cSrcweir { 117*cdf0e10cSrcweir mpFrameSel->RemoveEventListener( LINK( this, AccFrameSelector, WindowEventListener ) ); 118*cdf0e10cSrcweir } 119*cdf0e10cSrcweir } 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir Reference< XAccessibleContext > AccFrameSelector::getAccessibleContext( ) 124*cdf0e10cSrcweir throw (RuntimeException) 125*cdf0e10cSrcweir { 126*cdf0e10cSrcweir return this; 127*cdf0e10cSrcweir } 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException) 132*cdf0e10cSrcweir { 133*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 134*cdf0e10cSrcweir IsValid(); 135*cdf0e10cSrcweir return (meBorder == FRAMEBORDER_NONE) ? mpFrameSel->GetEnabledBorderCount() : 0; 136*cdf0e10cSrcweir } 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i ) 141*cdf0e10cSrcweir throw (RuntimeException) 142*cdf0e10cSrcweir { 143*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 144*cdf0e10cSrcweir IsValid(); 145*cdf0e10cSrcweir Reference< XAccessible > xRet; 146*cdf0e10cSrcweir if( meBorder == FRAMEBORDER_NONE ) 147*cdf0e10cSrcweir xRet = mpFrameSel->GetChildAccessible( i ); 148*cdf0e10cSrcweir if( !xRet.is() ) 149*cdf0e10cSrcweir throw RuntimeException(); 150*cdf0e10cSrcweir return xRet; 151*cdf0e10cSrcweir } 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir Reference< XAccessible > AccFrameSelector::getAccessibleParent( ) 156*cdf0e10cSrcweir throw (RuntimeException) 157*cdf0e10cSrcweir { 158*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 159*cdf0e10cSrcweir IsValid(); 160*cdf0e10cSrcweir Reference< XAccessible > xRet; 161*cdf0e10cSrcweir if(meBorder == FRAMEBORDER_NONE) 162*cdf0e10cSrcweir xRet = mpFrameSel->GetParent()->GetAccessible( sal_True ); 163*cdf0e10cSrcweir else 164*cdf0e10cSrcweir xRet = mpFrameSel->CreateAccessible(); 165*cdf0e10cSrcweir return xRet; 166*cdf0e10cSrcweir } 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir sal_Int32 AccFrameSelector::getAccessibleIndexInParent( ) 171*cdf0e10cSrcweir throw (RuntimeException) 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 174*cdf0e10cSrcweir IsValid(); 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir sal_Int32 nIdx = 0; 177*cdf0e10cSrcweir if( meBorder == FRAMEBORDER_NONE ) 178*cdf0e10cSrcweir { 179*cdf0e10cSrcweir Window* pTabPage = mpFrameSel->GetParent(); 180*cdf0e10cSrcweir sal_Int32 nChildren = pTabPage->GetChildCount(); 181*cdf0e10cSrcweir for( nIdx = 0; nIdx < nChildren; ++nIdx ) 182*cdf0e10cSrcweir if( pTabPage->GetChild( static_cast< sal_uInt16 >( nIdx ) ) == mpFrameSel ) 183*cdf0e10cSrcweir break; 184*cdf0e10cSrcweir } 185*cdf0e10cSrcweir else 186*cdf0e10cSrcweir nIdx = mpFrameSel->GetEnabledBorderIndex( meBorder ); 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir if( nIdx < 0 ) 189*cdf0e10cSrcweir throw RuntimeException(); 190*cdf0e10cSrcweir return nIdx; 191*cdf0e10cSrcweir } 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException) 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir return AccessibleRole::OPTION_PANE; 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir OUString AccFrameSelector::getAccessibleDescription( ) 203*cdf0e10cSrcweir throw (RuntimeException) 204*cdf0e10cSrcweir { 205*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 206*cdf0e10cSrcweir IsValid(); 207*cdf0e10cSrcweir return maDescriptions.GetString(meBorder); 208*cdf0e10cSrcweir } 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir OUString AccFrameSelector::getAccessibleName( ) 213*cdf0e10cSrcweir throw (RuntimeException) 214*cdf0e10cSrcweir { 215*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 216*cdf0e10cSrcweir IsValid(); 217*cdf0e10cSrcweir return maNames.GetString(meBorder); 218*cdf0e10cSrcweir } 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( ) 223*cdf0e10cSrcweir throw (RuntimeException) 224*cdf0e10cSrcweir { 225*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 226*cdf0e10cSrcweir IsValid(); 227*cdf0e10cSrcweir utl::AccessibleRelationSetHelper* pHelper; 228*cdf0e10cSrcweir Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; 229*cdf0e10cSrcweir if(meBorder == FRAMEBORDER_NONE) 230*cdf0e10cSrcweir { 231*cdf0e10cSrcweir //add the label relation 232*cdf0e10cSrcweir Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV ); 233*cdf0e10cSrcweir if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType()) 234*cdf0e10cSrcweir { 235*cdf0e10cSrcweir AccessibleRelation aLabelRelation; 236*cdf0e10cSrcweir aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY; 237*cdf0e10cSrcweir aLabelRelation.TargetSet.realloc(1); 238*cdf0e10cSrcweir aLabelRelation.TargetSet.getArray()[0] = pPrev->GetAccessible(); 239*cdf0e10cSrcweir pHelper->AddRelation(aLabelRelation); 240*cdf0e10cSrcweir } 241*cdf0e10cSrcweir } 242*cdf0e10cSrcweir return xRet; 243*cdf0e10cSrcweir } 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet( ) 248*cdf0e10cSrcweir throw (RuntimeException) 249*cdf0e10cSrcweir { 250*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 251*cdf0e10cSrcweir utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper; 252*cdf0e10cSrcweir Reference< XAccessibleStateSet > xRet = pStateSetHelper; 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir if(!mpFrameSel) 255*cdf0e10cSrcweir pStateSetHelper->AddState(AccessibleStateType::DEFUNC); 256*cdf0e10cSrcweir else 257*cdf0e10cSrcweir { 258*cdf0e10cSrcweir const sal_Int16 aStandardStates[] = 259*cdf0e10cSrcweir { 260*cdf0e10cSrcweir AccessibleStateType::EDITABLE, 261*cdf0e10cSrcweir AccessibleStateType::FOCUSABLE, 262*cdf0e10cSrcweir AccessibleStateType::MULTI_SELECTABLE, 263*cdf0e10cSrcweir AccessibleStateType::SELECTABLE, 264*cdf0e10cSrcweir AccessibleStateType::SHOWING, 265*cdf0e10cSrcweir AccessibleStateType::VISIBLE, 266*cdf0e10cSrcweir AccessibleStateType::OPAQUE, 267*cdf0e10cSrcweir 0}; 268*cdf0e10cSrcweir sal_Int16 nState = 0; 269*cdf0e10cSrcweir while(aStandardStates[nState]) 270*cdf0e10cSrcweir { 271*cdf0e10cSrcweir pStateSetHelper->AddState(aStandardStates[nState++]); 272*cdf0e10cSrcweir } 273*cdf0e10cSrcweir if(mpFrameSel->IsEnabled()) 274*cdf0e10cSrcweir { 275*cdf0e10cSrcweir pStateSetHelper->AddState(AccessibleStateType::ENABLED); 276*cdf0e10cSrcweir pStateSetHelper->AddState(AccessibleStateType::SENSITIVE); 277*cdf0e10cSrcweir } 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir sal_Bool bIsParent = meBorder == FRAMEBORDER_NONE; 280*cdf0e10cSrcweir if(mpFrameSel->HasFocus() && 281*cdf0e10cSrcweir (bIsParent || mpFrameSel->IsBorderSelected(meBorder))) 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir pStateSetHelper->AddState(AccessibleStateType::ACTIVE); 284*cdf0e10cSrcweir pStateSetHelper->AddState(AccessibleStateType::FOCUSED); 285*cdf0e10cSrcweir pStateSetHelper->AddState(AccessibleStateType::SELECTED); 286*cdf0e10cSrcweir } 287*cdf0e10cSrcweir } 288*cdf0e10cSrcweir return xRet; 289*cdf0e10cSrcweir } 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 292*cdf0e10cSrcweir 293*cdf0e10cSrcweir Locale AccFrameSelector::getLocale( ) 294*cdf0e10cSrcweir throw (IllegalAccessibleComponentStateException, RuntimeException) 295*cdf0e10cSrcweir { 296*cdf0e10cSrcweir Locale aRet; 297*cdf0e10cSrcweir SvxLanguageToLocale( aRet, Application::GetSettings().GetUILanguage() ); 298*cdf0e10cSrcweir return aRet; 299*cdf0e10cSrcweir } 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 302*cdf0e10cSrcweir 303*cdf0e10cSrcweir void AccFrameSelector::addPropertyChangeListener( 304*cdf0e10cSrcweir const Reference< XPropertyChangeListener >& xListener ) 305*cdf0e10cSrcweir throw (RuntimeException) 306*cdf0e10cSrcweir { 307*cdf0e10cSrcweir maPropertyListeners.addInterface( xListener ); 308*cdf0e10cSrcweir } 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir void AccFrameSelector::removePropertyChangeListener( const Reference< XPropertyChangeListener >& xListener ) 313*cdf0e10cSrcweir throw (RuntimeException) 314*cdf0e10cSrcweir { 315*cdf0e10cSrcweir maPropertyListeners.removeInterface( xListener ); 316*cdf0e10cSrcweir } 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 319*cdf0e10cSrcweir 320*cdf0e10cSrcweir sal_Bool AccFrameSelector::containsPoint( const AwtPoint& aPt ) 321*cdf0e10cSrcweir throw (RuntimeException) 322*cdf0e10cSrcweir { 323*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 324*cdf0e10cSrcweir IsValid(); 325*cdf0e10cSrcweir //aPt is relative to the frame selector 326*cdf0e10cSrcweir return mpFrameSel->ContainsClickPoint( Point( aPt.X, aPt.Y ) ); 327*cdf0e10cSrcweir } 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint( 332*cdf0e10cSrcweir const AwtPoint& aPt ) 333*cdf0e10cSrcweir throw (RuntimeException) 334*cdf0e10cSrcweir { 335*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 336*cdf0e10cSrcweir IsValid(); 337*cdf0e10cSrcweir //aPt is relative to the frame selector 338*cdf0e10cSrcweir return mpFrameSel->GetChildAccessible( Point( aPt.X, aPt.Y ) ); 339*cdf0e10cSrcweir } 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException) 342*cdf0e10cSrcweir { 343*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 344*cdf0e10cSrcweir IsValid(); 345*cdf0e10cSrcweir Size aSz; 346*cdf0e10cSrcweir Point aPos; 347*cdf0e10cSrcweir switch(meBorder) 348*cdf0e10cSrcweir { 349*cdf0e10cSrcweir case FRAMEBORDER_NONE: 350*cdf0e10cSrcweir aSz = mpFrameSel->GetSizePixel(); 351*cdf0e10cSrcweir aPos = mpFrameSel->GetPosPixel(); 352*cdf0e10cSrcweir break; 353*cdf0e10cSrcweir default: 354*cdf0e10cSrcweir const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); 355*cdf0e10cSrcweir aPos = aSpot.TopLeft(); 356*cdf0e10cSrcweir aSz = aSpot.GetSize(); 357*cdf0e10cSrcweir } 358*cdf0e10cSrcweir AwtRectangle aRet; 359*cdf0e10cSrcweir aRet.X = aPos.X(); 360*cdf0e10cSrcweir aRet.Y = aPos.Y(); 361*cdf0e10cSrcweir aRet.Width = aSz.Width(); 362*cdf0e10cSrcweir aRet.Height = aSz.Height(); 363*cdf0e10cSrcweir return aRet; 364*cdf0e10cSrcweir } 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 367*cdf0e10cSrcweir 368*cdf0e10cSrcweir AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException) 369*cdf0e10cSrcweir { 370*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 371*cdf0e10cSrcweir IsValid(); 372*cdf0e10cSrcweir Point aPos; 373*cdf0e10cSrcweir switch(meBorder) 374*cdf0e10cSrcweir { 375*cdf0e10cSrcweir case FRAMEBORDER_NONE: 376*cdf0e10cSrcweir aPos = mpFrameSel->GetPosPixel(); 377*cdf0e10cSrcweir break; 378*cdf0e10cSrcweir default: 379*cdf0e10cSrcweir const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); 380*cdf0e10cSrcweir aPos = aSpot.TopLeft(); 381*cdf0e10cSrcweir } 382*cdf0e10cSrcweir AwtPoint aRet(aPos.X(), aPos.Y()); 383*cdf0e10cSrcweir return aRet; 384*cdf0e10cSrcweir } 385*cdf0e10cSrcweir 386*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 387*cdf0e10cSrcweir 388*cdf0e10cSrcweir AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException) 389*cdf0e10cSrcweir { 390*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 391*cdf0e10cSrcweir IsValid(); 392*cdf0e10cSrcweir Point aPos; 393*cdf0e10cSrcweir switch(meBorder) 394*cdf0e10cSrcweir { 395*cdf0e10cSrcweir case FRAMEBORDER_NONE: 396*cdf0e10cSrcweir aPos = mpFrameSel->GetPosPixel(); 397*cdf0e10cSrcweir break; 398*cdf0e10cSrcweir default: 399*cdf0e10cSrcweir const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); 400*cdf0e10cSrcweir aPos = aSpot.TopLeft(); 401*cdf0e10cSrcweir } 402*cdf0e10cSrcweir aPos = mpFrameSel->OutputToAbsoluteScreenPixel( aPos ); 403*cdf0e10cSrcweir AwtPoint aRet(aPos.X(), aPos.Y()); 404*cdf0e10cSrcweir return aRet; 405*cdf0e10cSrcweir } 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 408*cdf0e10cSrcweir 409*cdf0e10cSrcweir AwtSize AccFrameSelector::getSize( ) throw (RuntimeException) 410*cdf0e10cSrcweir { 411*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 412*cdf0e10cSrcweir IsValid(); 413*cdf0e10cSrcweir Size aSz; 414*cdf0e10cSrcweir switch(meBorder) 415*cdf0e10cSrcweir { 416*cdf0e10cSrcweir case FRAMEBORDER_NONE: 417*cdf0e10cSrcweir aSz = mpFrameSel->GetSizePixel(); 418*cdf0e10cSrcweir break; 419*cdf0e10cSrcweir default: 420*cdf0e10cSrcweir const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); 421*cdf0e10cSrcweir aSz = aSpot.GetSize(); 422*cdf0e10cSrcweir } 423*cdf0e10cSrcweir AwtSize aRet(aSz.Width(), aSz.Height()); 424*cdf0e10cSrcweir return aRet; 425*cdf0e10cSrcweir } 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 428*cdf0e10cSrcweir 429*cdf0e10cSrcweir sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException) 430*cdf0e10cSrcweir { 431*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 432*cdf0e10cSrcweir IsValid(); 433*cdf0e10cSrcweir return sal_True; 434*cdf0e10cSrcweir } 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 437*cdf0e10cSrcweir 438*cdf0e10cSrcweir sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException) 439*cdf0e10cSrcweir { 440*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 441*cdf0e10cSrcweir IsValid(); 442*cdf0e10cSrcweir return sal_True; 443*cdf0e10cSrcweir } 444*cdf0e10cSrcweir 445*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 446*cdf0e10cSrcweir 447*cdf0e10cSrcweir sal_Bool AccFrameSelector::isFocusTraversable( ) throw (RuntimeException) 448*cdf0e10cSrcweir { 449*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 450*cdf0e10cSrcweir IsValid(); 451*cdf0e10cSrcweir return sal_True; 452*cdf0e10cSrcweir } 453*cdf0e10cSrcweir 454*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 455*cdf0e10cSrcweir 456*cdf0e10cSrcweir void AccFrameSelector::addFocusListener( const Reference< XFocusListener >& xListener ) throw (RuntimeException) 457*cdf0e10cSrcweir { 458*cdf0e10cSrcweir maFocusListeners.addInterface( xListener ); 459*cdf0e10cSrcweir } 460*cdf0e10cSrcweir 461*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 462*cdf0e10cSrcweir 463*cdf0e10cSrcweir void AccFrameSelector::removeFocusListener( const Reference< XFocusListener >& xListener ) throw (RuntimeException) 464*cdf0e10cSrcweir { 465*cdf0e10cSrcweir maFocusListeners.removeInterface( xListener ); 466*cdf0e10cSrcweir } 467*cdf0e10cSrcweir 468*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 469*cdf0e10cSrcweir 470*cdf0e10cSrcweir void AccFrameSelector::grabFocus( ) throw (RuntimeException) 471*cdf0e10cSrcweir { 472*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 473*cdf0e10cSrcweir IsValid(); 474*cdf0e10cSrcweir mpFrameSel->GrabFocus(); 475*cdf0e10cSrcweir } 476*cdf0e10cSrcweir 477*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 478*cdf0e10cSrcweir 479*cdf0e10cSrcweir Any AccFrameSelector::getAccessibleKeyBinding( ) throw (RuntimeException) 480*cdf0e10cSrcweir { 481*cdf0e10cSrcweir Any aRet; 482*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 483*cdf0e10cSrcweir IsValid(); 484*cdf0e10cSrcweir utl::AccessibleRelationSetHelper* pHelper; 485*cdf0e10cSrcweir Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; 486*cdf0e10cSrcweir if(meBorder == FRAMEBORDER_NONE) 487*cdf0e10cSrcweir { 488*cdf0e10cSrcweir Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV ); 489*cdf0e10cSrcweir if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType()) 490*cdf0e10cSrcweir { 491*cdf0e10cSrcweir String sText = pPrev->GetText(); 492*cdf0e10cSrcweir xub_StrLen nFound = sText.Search( MNEMONIC_CHAR ); 493*cdf0e10cSrcweir if(STRING_NOTFOUND != nFound && ++nFound < sText.Len()) 494*cdf0e10cSrcweir { 495*cdf0e10cSrcweir sText.ToUpperAscii(); 496*cdf0e10cSrcweir sal_Unicode cChar = sText.GetChar(nFound); 497*cdf0e10cSrcweir AwtKeyEvent aEvent; 498*cdf0e10cSrcweir 499*cdf0e10cSrcweir aEvent.KeyCode = 0; 500*cdf0e10cSrcweir aEvent.KeyChar = cChar; 501*cdf0e10cSrcweir aEvent.KeyFunc = 0; 502*cdf0e10cSrcweir if(cChar >= 'A' && cChar <= 'Z') 503*cdf0e10cSrcweir { 504*cdf0e10cSrcweir aEvent.KeyCode = AwtKey::A + cChar - 'A'; 505*cdf0e10cSrcweir } 506*cdf0e10cSrcweir aEvent.Modifiers = AwtKeyModifier::MOD2; 507*cdf0e10cSrcweir aRet <<= aEvent; 508*cdf0e10cSrcweir } 509*cdf0e10cSrcweir } 510*cdf0e10cSrcweir } 511*cdf0e10cSrcweir return aRet; 512*cdf0e10cSrcweir } 513*cdf0e10cSrcweir 514*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 515*cdf0e10cSrcweir 516*cdf0e10cSrcweir sal_Int32 AccFrameSelector::getForeground( ) 517*cdf0e10cSrcweir throw (RuntimeException) 518*cdf0e10cSrcweir { 519*cdf0e10cSrcweir Any aRet; 520*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 521*cdf0e10cSrcweir IsValid(); 522*cdf0e10cSrcweir return mpFrameSel->GetControlForeground().GetColor(); 523*cdf0e10cSrcweir } 524*cdf0e10cSrcweir 525*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 526*cdf0e10cSrcweir 527*cdf0e10cSrcweir sal_Int32 AccFrameSelector::getBackground( ) 528*cdf0e10cSrcweir throw (RuntimeException) 529*cdf0e10cSrcweir { 530*cdf0e10cSrcweir Any aRet; 531*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 532*cdf0e10cSrcweir IsValid(); 533*cdf0e10cSrcweir return mpFrameSel->GetControlBackground().GetColor(); 534*cdf0e10cSrcweir } 535*cdf0e10cSrcweir 536*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 537*cdf0e10cSrcweir 538*cdf0e10cSrcweir void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException) 539*cdf0e10cSrcweir { 540*cdf0e10cSrcweir vos::OGuard aGuard( Application::GetSolarMutex() ); 541*cdf0e10cSrcweir 542*cdf0e10cSrcweir if ( xListener.is() ) 543*cdf0e10cSrcweir { 544*cdf0e10cSrcweir if ( !mnClientId ) 545*cdf0e10cSrcweir { 546*cdf0e10cSrcweir mnClientId = ::comphelper::AccessibleEventNotifier::registerClient(); 547*cdf0e10cSrcweir } 548*cdf0e10cSrcweir ::comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener ); 549*cdf0e10cSrcweir } 550*cdf0e10cSrcweir } 551*cdf0e10cSrcweir 552*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 553*cdf0e10cSrcweir 554*cdf0e10cSrcweir void AccFrameSelector::removeEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException) 555*cdf0e10cSrcweir { 556*cdf0e10cSrcweir vos::OGuard aGuard( Application::GetSolarMutex() ); 557*cdf0e10cSrcweir 558*cdf0e10cSrcweir if ( xListener.is() && mnClientId != 0 && 559*cdf0e10cSrcweir ::comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener ) == 0 ) 560*cdf0e10cSrcweir { 561*cdf0e10cSrcweir // no listeners anymore 562*cdf0e10cSrcweir // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client), 563*cdf0e10cSrcweir // and at least to us not firing any events anymore, in case somebody calls 564*cdf0e10cSrcweir // NotifyAccessibleEvent, again 565*cdf0e10cSrcweir ::comphelper::AccessibleEventNotifier::TClientId nId( mnClientId ); 566*cdf0e10cSrcweir mnClientId = 0; 567*cdf0e10cSrcweir ::comphelper::AccessibleEventNotifier::revokeClient( nId ); 568*cdf0e10cSrcweir } 569*cdf0e10cSrcweir } 570*cdf0e10cSrcweir 571*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 572*cdf0e10cSrcweir 573*cdf0e10cSrcweir OUString AccFrameSelector::getImplementationName( ) throw (RuntimeException) 574*cdf0e10cSrcweir { 575*cdf0e10cSrcweir return OUString::createFromAscii("AccFrameSelector"); 576*cdf0e10cSrcweir } 577*cdf0e10cSrcweir 578*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 579*cdf0e10cSrcweir 580*cdf0e10cSrcweir const sal_Char sAccessible[] = "Accessible"; 581*cdf0e10cSrcweir const sal_Char sAccessibleContext[] = "AccessibleContext"; 582*cdf0e10cSrcweir const sal_Char sAccessibleComponent[] = "AccessibleComponent"; 583*cdf0e10cSrcweir 584*cdf0e10cSrcweir sal_Bool AccFrameSelector::supportsService( const OUString& rServiceName ) 585*cdf0e10cSrcweir throw (RuntimeException) 586*cdf0e10cSrcweir { 587*cdf0e10cSrcweir return rServiceName.equalsAsciiL( sAccessible , sizeof(sAccessible )-1 ) || 588*cdf0e10cSrcweir rServiceName.equalsAsciiL( sAccessibleContext , sizeof(sAccessibleContext )-1 ) || 589*cdf0e10cSrcweir rServiceName.equalsAsciiL( sAccessibleComponent, sizeof(sAccessibleComponent)-1 ); 590*cdf0e10cSrcweir } 591*cdf0e10cSrcweir 592*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir Sequence< OUString > AccFrameSelector::getSupportedServiceNames( ) 595*cdf0e10cSrcweir throw (RuntimeException) 596*cdf0e10cSrcweir { 597*cdf0e10cSrcweir Sequence< OUString > aRet(3); 598*cdf0e10cSrcweir OUString* pArray = aRet.getArray(); 599*cdf0e10cSrcweir pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessible ) ); 600*cdf0e10cSrcweir pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleContext ) ); 601*cdf0e10cSrcweir pArray[2] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleComponent) ); 602*cdf0e10cSrcweir return aRet; 603*cdf0e10cSrcweir } 604*cdf0e10cSrcweir 605*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 606*cdf0e10cSrcweir 607*cdf0e10cSrcweir void AccFrameSelector::IsValid() throw (RuntimeException) 608*cdf0e10cSrcweir { 609*cdf0e10cSrcweir if(!mpFrameSel) 610*cdf0e10cSrcweir throw RuntimeException(); 611*cdf0e10cSrcweir } 612*cdf0e10cSrcweir 613*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 614*cdf0e10cSrcweir 615*cdf0e10cSrcweir void AccFrameSelector::NotifyFocusListeners(sal_Bool bGetFocus) 616*cdf0e10cSrcweir { 617*cdf0e10cSrcweir vos::OGuard aGuard(Application::GetSolarMutex()); 618*cdf0e10cSrcweir AwtFocusEvent aEvent; 619*cdf0e10cSrcweir aEvent.FocusFlags = 0; 620*cdf0e10cSrcweir if(bGetFocus) 621*cdf0e10cSrcweir { 622*cdf0e10cSrcweir sal_uInt16 nFocusFlags = mpFrameSel->GetGetFocusFlags(); 623*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_TAB) 624*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::TAB; 625*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_CURSOR) 626*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::CURSOR; 627*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_MNEMONIC) 628*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::MNEMONIC; 629*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_FORWARD) 630*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::FORWARD; 631*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_BACKWARD) 632*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::BACKWARD; 633*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_AROUND) 634*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::AROUND; 635*cdf0e10cSrcweir if(nFocusFlags&GETFOCUS_UNIQUEMNEMONIC) 636*cdf0e10cSrcweir aEvent.FocusFlags |= AwtFocusChangeReason::UNIQUEMNEMONIC; 637*cdf0e10cSrcweir // if(nFocusFlags&GETFOCUS_INIT) 638*cdf0e10cSrcweir // aEvent.FocusFlags |= AwtFocusChangeReason:: 639*cdf0e10cSrcweir } 640*cdf0e10cSrcweir // else 641*cdf0e10cSrcweir //how can I find the current focus window? 642*cdf0e10cSrcweir // aEvent.NextFocus = ; 643*cdf0e10cSrcweir aEvent.Temporary = sal_False; 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir Reference < XAccessibleContext > xThis( this ); 646*cdf0e10cSrcweir aEvent.Source = xThis; 647*cdf0e10cSrcweir 648*cdf0e10cSrcweir ::cppu::OInterfaceIteratorHelper aIter( maFocusListeners ); 649*cdf0e10cSrcweir while( aIter.hasMoreElements() ) 650*cdf0e10cSrcweir { 651*cdf0e10cSrcweir Reference < XFocusListener > xListener( aIter.next(), UNO_QUERY ); 652*cdf0e10cSrcweir if(bGetFocus) 653*cdf0e10cSrcweir xListener->focusGained( aEvent ); 654*cdf0e10cSrcweir else 655*cdf0e10cSrcweir xListener->focusLost( aEvent ); 656*cdf0e10cSrcweir } 657*cdf0e10cSrcweir } 658*cdf0e10cSrcweir 659*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 660*cdf0e10cSrcweir 661*cdf0e10cSrcweir IMPL_LINK( AccFrameSelector, WindowEventListener, VclSimpleEvent*, pEvent ) 662*cdf0e10cSrcweir { 663*cdf0e10cSrcweir VclWindowEvent* pWinEvent = dynamic_cast< VclWindowEvent* >( pEvent ); 664*cdf0e10cSrcweir DBG_ASSERT( pWinEvent, "AccFrameSelector::WindowEventListener - unknown window event" ); 665*cdf0e10cSrcweir if ( pWinEvent ) 666*cdf0e10cSrcweir { 667*cdf0e10cSrcweir Window* pWindow = pWinEvent->GetWindow(); 668*cdf0e10cSrcweir DBG_ASSERT( pWindow, "AccFrameSelector::WindowEventListener: no window!" ); 669*cdf0e10cSrcweir if ( !pWindow->IsAccessibilityEventsSuppressed() || ( pWinEvent->GetId() == VCLEVENT_OBJECT_DYING ) ) 670*cdf0e10cSrcweir { 671*cdf0e10cSrcweir ProcessWindowEvent( *pWinEvent ); 672*cdf0e10cSrcweir } 673*cdf0e10cSrcweir } 674*cdf0e10cSrcweir 675*cdf0e10cSrcweir return 0; 676*cdf0e10cSrcweir } 677*cdf0e10cSrcweir 678*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 679*cdf0e10cSrcweir 680*cdf0e10cSrcweir void AccFrameSelector::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) 681*cdf0e10cSrcweir { 682*cdf0e10cSrcweir switch ( rVclWindowEvent.GetId() ) 683*cdf0e10cSrcweir { 684*cdf0e10cSrcweir case VCLEVENT_WINDOW_GETFOCUS: 685*cdf0e10cSrcweir { 686*cdf0e10cSrcweir if ( meBorder == FRAMEBORDER_NONE ) 687*cdf0e10cSrcweir { 688*cdf0e10cSrcweir Any aOldValue, aNewValue; 689*cdf0e10cSrcweir aNewValue <<= AccessibleStateType::FOCUSED; 690*cdf0e10cSrcweir NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); 691*cdf0e10cSrcweir } 692*cdf0e10cSrcweir } 693*cdf0e10cSrcweir break; 694*cdf0e10cSrcweir case VCLEVENT_WINDOW_LOSEFOCUS: 695*cdf0e10cSrcweir { 696*cdf0e10cSrcweir if ( meBorder == FRAMEBORDER_NONE ) 697*cdf0e10cSrcweir { 698*cdf0e10cSrcweir Any aOldValue, aNewValue; 699*cdf0e10cSrcweir aOldValue <<= AccessibleStateType::FOCUSED; 700*cdf0e10cSrcweir NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); 701*cdf0e10cSrcweir } 702*cdf0e10cSrcweir } 703*cdf0e10cSrcweir break; 704*cdf0e10cSrcweir default: 705*cdf0e10cSrcweir { 706*cdf0e10cSrcweir } 707*cdf0e10cSrcweir break; 708*cdf0e10cSrcweir } 709*cdf0e10cSrcweir } 710*cdf0e10cSrcweir 711*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 712*cdf0e10cSrcweir 713*cdf0e10cSrcweir void AccFrameSelector::NotifyAccessibleEvent( const sal_Int16 _nEventId, 714*cdf0e10cSrcweir const Any& _rOldValue, const Any& _rNewValue ) 715*cdf0e10cSrcweir { 716*cdf0e10cSrcweir if ( mnClientId ) 717*cdf0e10cSrcweir { 718*cdf0e10cSrcweir Reference< XInterface > xSource( *this ); 719*cdf0e10cSrcweir AccessibleEventObject aEvent( xSource, _nEventId, _rNewValue, _rOldValue ); 720*cdf0e10cSrcweir ::comphelper::AccessibleEventNotifier::addEvent( mnClientId, aEvent ); 721*cdf0e10cSrcweir } 722*cdf0e10cSrcweir } 723*cdf0e10cSrcweir 724*cdf0e10cSrcweir // ---------------------------------------------------------------------------- 725*cdf0e10cSrcweir 726*cdf0e10cSrcweir void AccFrameSelector::Invalidate() 727*cdf0e10cSrcweir { 728*cdf0e10cSrcweir mpFrameSel = 0; 729*cdf0e10cSrcweir EventObject aEvent; 730*cdf0e10cSrcweir Reference < XAccessibleContext > xThis( this ); 731*cdf0e10cSrcweir aEvent.Source = xThis; 732*cdf0e10cSrcweir maFocusListeners.disposeAndClear( aEvent ); 733*cdf0e10cSrcweir maPropertyListeners.disposeAndClear( aEvent ); 734*cdf0e10cSrcweir } 735*cdf0e10cSrcweir 736*cdf0e10cSrcweir // ============================================================================ 737*cdf0e10cSrcweir 738*cdf0e10cSrcweir } // namespace a11y 739*cdf0e10cSrcweir } // namespace svx 740*cdf0e10cSrcweir 741