/************************************************************************* * * $RCSfile: vclxaccessiblecomponent.cxx,v $ * * $Revision: 1.15 $ * * last change: $Author: ssa $ $Date: 2002-05-30 12:35:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses * * - GNU Lesser General Public License Version 2.1 * - Sun Industry Standards Source License Version 1.1 * * Sun Microsystems Inc., October, 2000 * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2000 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * * Sun Industry Standards Source License Version 1.1 * ================================================= * The contents of this file are subject to the Sun Industry Standards * Source License Version 1.1 (the "License"); You may not use this file * except in compliance with the License. You may obtain a copy of the * License at http://www.openoffice.org/license.html. * * Software provided under this License is provided on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. * See the License for the specific provisions governing your rights and * obligations concerning the Software. * * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * * Copyright: 2000 by Sun Microsystems, Inc. * * All Rights Reserved. * * Contributor(s): _______________________________________ * * ************************************************************************/ #ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_ #include #endif #ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_ #include #endif #ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_ #include #endif #ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTLISTENER_HPP_ #include #endif #ifndef _COM_SUN_STAR_AWT_KEYEVENT_HPP_ #include #endif #ifndef _COM_SUN_STAR_AWT_KEYMODIFIER_HPP_ #include #endif #ifndef _COM_SUN_STAR_AWT_KEY_HPP_ #include #endif #ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_ #include #endif #ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_ #include #endif #ifndef _TOOLKIT_HELPER_CONVERT_HXX_ #include #endif #ifndef _SV_WINDOW_HXX #include #endif #ifndef _TOOLS_DEBUG_HXX #include #endif #ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_ #include #endif #ifndef _SV_SVAPP_HXX #include #endif #ifndef MNEMONIC_CHAR #define MNEMONIC_CHAR ((sal_Unicode)'~') #endif using namespace ::com::sun::star; using namespace ::drafts::com::sun::star; using namespace ::comphelper; // ---------------------------------------------------- // class VCLExternalSolarLock // ---------------------------------------------------- class VCLExternalSolarLock : public ::comphelper::IMutex { public: virtual void acquire(); virtual void release(); }; //...................................................... void VCLExternalSolarLock::acquire() { Application::GetSolarMutex().acquire(); } //...................................................... void VCLExternalSolarLock::release() { Application::GetSolarMutex().release(); } // ---------------------------------------------------- // class VCLXAccessibleComponent // ---------------------------------------------------- VCLXAccessibleComponent::VCLXAccessibleComponent( VCLXWindow* pVCLXindow ) : VCLXAccessibleComponentBase( new VCLExternalSolarLock() ) , OAccessibleImplementationAccess( ) { mpVCLXindow = pVCLXindow; mxWindow = pVCLXindow; m_pSolarLock = static_cast< VCLExternalSolarLock* >( getExternalLock( ) ); DBG_ASSERT( pVCLXindow->GetWindow(), "VCLXAccessibleComponent - no window!" ); if ( pVCLXindow->GetWindow() ) { pVCLXindow->GetWindow()->AddEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); pVCLXindow->GetWindow()->AddChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); } // announce the XAccessible of our creator to the base class lateInit( pVCLXindow ); } VCLXAccessibleComponent::~VCLXAccessibleComponent() { ensureDisposed(); if ( mpVCLXindow && mpVCLXindow->GetWindow() ) { mpVCLXindow->GetWindow()->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); mpVCLXindow->GetWindow()->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); } delete m_pSolarLock; m_pSolarLock = NULL; // This is not completely sure. If we assume that the base class dtor calls some method which // uses this lock, the we crash. However, as the base class' dtor does not have a chance to call _out_ // virtual methods, this is no problem as long as the base class is safe, i.e. does not use the external // lock from within it's dtor. At the moment, we _know_ the base class is safe in this respect, so // let's assume it keeps this way. // @see OAccessibleContextHelper::OAccessibleContextHelper( IMutex* ) } IMPLEMENT_FORWARD_XINTERFACE2( VCLXAccessibleComponent, VCLXAccessibleComponentBase, OAccessibleImplementationAccess ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleComponent, VCLXAccessibleComponentBase, OAccessibleImplementationAccess ) IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclSimpleEvent*, pEvent ) { DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" ); if ( pEvent && pEvent->ISA( VclWindowEvent ) ) { DBG_ASSERT( ((VclWindowEvent*)pEvent)->GetWindow(), "Window???" ); ProcessWindowEvent( *(VclWindowEvent*)pEvent ); } return 0; } IMPL_LINK( VCLXAccessibleComponent, WindowChildEventListener, VclSimpleEvent*, pEvent ) { DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" ); if ( pEvent && pEvent->ISA( VclWindowEvent ) ) { DBG_ASSERT( ((VclWindowEvent*)pEvent)->GetWindow(), "Window???" ); ProcessWindowChildEvent( *(VclWindowEvent*)pEvent ); } return 0; } void VCLXAccessibleComponent::ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) { uno::Any aOldValue, aNewValue; uno::Reference< accessibility::XAccessible > xAcc; //Window* pWindow = ((VclWindowEvent*)pEvent)->GetWindow(); //DBG_ASSERT( pWindow, "VCLXAccessibleComponent::ProcessWindowEvent - Window?" ); switch ( rVclWindowEvent.GetId() ) { case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children { Window* pChildWindow = (Window *) rVclWindowEvent.GetData(); DBG_ASSERT( pChildWindow, "VCLEVENT_WINDOW_SHOW - Window=?" ); if( pChildWindow ) xAcc = pChildWindow->GetAccessible(); if( xAcc.is() && GetWindow() == pChildWindow->GetAccessibleParentWindow() ) { aNewValue <<= xAcc; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_CHILD_EVENT, aOldValue, aNewValue ); } } break; case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children { Window* pChildWindow = (Window *) rVclWindowEvent.GetData(); DBG_ASSERT( pChildWindow, "VCLEVENT_WINDOW_HIDE - Window=?" ); if( pChildWindow ) xAcc = pChildWindow->GetAccessible(); if( xAcc.is() && GetWindow() == pChildWindow->GetAccessibleParentWindow() ) { aOldValue <<= xAcc; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_CHILD_EVENT, aOldValue, aNewValue ); } } break; } } void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { uno::Any aOldValue, aNewValue; Window* pWindow = rVclWindowEvent.GetWindow(); DBG_ASSERT( pWindow, "VCLXAccessibleComponent::ProcessWindowEvent - Window?" ); switch ( rVclWindowEvent.GetId() ) { // // dont handle CHILDCREATED events here // they are handled separately as child events, see ProcessWindowChildEvent above // /* case VCLEVENT_WINDOW_CHILDCREATED: { Window* pWindow = (Window*) rVclWindowEvent.GetData(); DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDCREATED - Window=?" ); aNewValue <<= pWindow->GetAccessible(); NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_CHILD_EVENT, aOldValue, aNewValue ); } break; */ case VCLEVENT_WINDOW_CHILDDESTROYED: { Window* pWindow = (Window*) rVclWindowEvent.GetData(); DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDDESTROYED - Window=?" ); aOldValue <<= pWindow->GetAccessible(); NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_CHILD_EVENT, aOldValue, aNewValue ); } break; // // show and hide will be handled as child events only and are // responsible for sending create/destroy events, see ProcessWindowChildEvent above // /* case VCLEVENT_WINDOW_SHOW: { aNewValue <<= accessibility::AccessibleStateType::VISIBLE; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); aNewValue <<= accessibility::AccessibleStateType::SHOWING; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); aNewValue.clear(); aOldValue <<= accessibility::AccessibleStateType::INVALID; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); } break; case VCLEVENT_WINDOW_HIDE: { aOldValue <<= accessibility::AccessibleStateType::VISIBLE; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); aOldValue <<= accessibility::AccessibleStateType::SHOWING; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); aOldValue.clear(); aNewValue <<= accessibility::AccessibleStateType::INVALID; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); } break; */ case VCLEVENT_WINDOW_ACTIVATE: { aNewValue <<= accessibility::AccessibleStateType::ACTIVE; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); } break; case VCLEVENT_WINDOW_DEACTIVATE: { aOldValue <<= accessibility::AccessibleStateType::ACTIVE; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); } break; case VCLEVENT_WINDOW_GETFOCUS: case VCLEVENT_CONTROL_GETFOCUS: { aNewValue <<= accessibility::AccessibleStateType::FOCUSED; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); } break; case VCLEVENT_WINDOW_LOSEFOCUS: case VCLEVENT_CONTROL_LOSEFOCUS: { aOldValue <<= accessibility::AccessibleStateType::FOCUSED; NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); } break; // MT: Missing event for enabled !!! } } void VCLXAccessibleComponent::disposing() { if ( mpVCLXindow && mpVCLXindow->GetWindow() ) { mpVCLXindow->GetWindow()->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); mpVCLXindow->GetWindow()->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); } VCLXAccessibleComponentBase::disposing(); mxWindow.clear(); mpVCLXindow = NULL; } Window* VCLXAccessibleComponent::GetWindow() const { return GetVCLXWindow() ? GetVCLXWindow()->GetWindow() : NULL; } void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) { Window* pWindow = GetWindow(); if ( pWindow ) { if ( pWindow->IsVisible() ) { rStateSet.AddState( accessibility::AccessibleStateType::VISIBLE ); rStateSet.AddState( accessibility::AccessibleStateType::SHOWING ); } else { rStateSet.AddState( accessibility::AccessibleStateType::INVALID ); } if ( pWindow->IsEnabled() ) rStateSet.AddState( accessibility::AccessibleStateType::ENABLED ); if ( pWindow->HasChildPathFocus() ) rStateSet.AddState( accessibility::AccessibleStateType::ACTIVE ); if ( pWindow->HasFocus() ) rStateSet.AddState( accessibility::AccessibleStateType::FOCUSED ); if ( pWindow->IsWait() ) rStateSet.AddState( accessibility::AccessibleStateType::BUSY ); if ( pWindow->GetStyle() & WB_SIZEABLE ) rStateSet.AddState( accessibility::AccessibleStateType::RESIZABLE ); } else { rStateSet.AddState( accessibility::AccessibleStateType::DEFUNC ); } /* MUST BE SET FROM DERIVED CLASSES: CHECKED COLLAPSED EXPANDED EXPANDABLE EDITABLE FOCUSABLE HORIZONTAL VERTICAL ICONIFIED MODAL MULTILINE MULTISELECTABLE PRESSED SELECTABLE SELECTED SINGLE_LINE TRANSIENT */ } // accessibility::XAccessibleContext sal_Int32 VCLXAccessibleComponent::getAccessibleChildCount() throw (uno::RuntimeException) { OContextEntryGuard( this ); sal_Int32 nChildren = 0; if ( GetWindow() ) nChildren = GetWindow()->GetAccessibleChildWindowCount(); return nChildren; } uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessibleChild( sal_Int32 i ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { if ( i >= getAccessibleChildCount() ) throw lang::IndexOutOfBoundsException(); OContextEntryGuard( this ); uno::Reference< accessibility::XAccessible > xAcc; if ( GetWindow() ) { Window* pChild = GetWindow()->GetAccessibleChildWindow( (USHORT)i ); if ( pChild ) xAcc = pChild->GetAccessible(); } return xAcc; } uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getVclParent() const { uno::Reference< accessibility::XAccessible > xAcc; if ( GetWindow() ) { Window* pParent = GetWindow()->GetAccessibleParentWindow(); if ( pParent ) xAcc = pParent->GetAccessible(); } return xAcc; } uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessibleParent( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); uno::Reference< accessibility::XAccessible > xAcc( implGetForeignControlledParent() ); if ( !xAcc.is() ) // we do _not_ have a foreign-controlled parent -> default to our VCL parent xAcc = getVclParent(); return xAcc; } sal_Int32 VCLXAccessibleComponent::getAccessibleIndexInParent( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); sal_Int32 nIndex = -1; uno::Reference< accessibility::XAccessible > xAcc( implGetForeignControlledParent() ); if ( xAcc.is() ) { // we _do_ have a foreign-controlled parent -> use the base class' implementation, // which goes the UNO way nIndex = VCLXAccessibleComponentBase::getAccessibleIndexInParent( ); } else { if ( GetWindow() ) { Window* pParent = GetWindow()->GetAccessibleParentWindow(); if ( pParent ) { for ( USHORT n = pParent->GetAccessibleChildWindowCount(); n; ) { Window* pChild = pParent->GetAccessibleChildWindow( --n ); if ( pChild == GetWindow() ) { nIndex = n; break; } } } } } return nIndex; } sal_Int16 VCLXAccessibleComponent::getAccessibleRole( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); sal_Int16 nRole = 0; if ( GetWindow() ) nRole = GetWindow()->GetAccessibleRole(); return nRole; } ::rtl::OUString VCLXAccessibleComponent::getAccessibleDescription( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); ::rtl::OUString aDescription; if ( GetWindow() ) aDescription = GetWindow()->GetAccessibleDescription(); return aDescription; } ::rtl::OUString VCLXAccessibleComponent::getAccessibleName( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); ::rtl::OUString aName; if ( GetWindow() ) { aName = GetWindow()->GetAccessibleName(); #ifdef DEBUG aName += String( RTL_CONSTASCII_USTRINGPARAM( " (Type = " ) ); aName += String::CreateFromInt32( GetWindow()->GetType() ); aName += String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ); #endif } return aName; } uno::Reference< accessibility::XAccessibleRelationSet > VCLXAccessibleComponent::getAccessibleRelationSet( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); return NULL; } uno::Reference< accessibility::XAccessibleStateSet > VCLXAccessibleComponent::getAccessibleStateSet( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper; uno::Reference< accessibility::XAccessibleStateSet > xSet = pStateSetHelper; FillAccessibleStateSet( *pStateSetHelper ); return xSet; // return NULL; } lang::Locale VCLXAccessibleComponent::getLocale() throw (accessibility::IllegalAccessibleComponentStateException, uno::RuntimeException) { OContextEntryGuard( this ); lang::Locale aLocale; if ( GetWindow() ) aLocale = GetWindow()->GetSettings().GetUILocale(); return aLocale; } uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessibleAt( const awt::Point& rPoint ) throw (uno::RuntimeException) { OContextEntryGuard( this ); uno::Reference< accessibility::XAccessible > xAcc; if ( GetWindow() ) { Window* pWindow = GetWindow()->FindWindow( VCLPoint( rPoint ) ); if ( pWindow && pWindow != GetWindow() ) xAcc = pWindow->GetAccessible(); } return xAcc; } // accessibility::XAccessibleComponent awt::Rectangle VCLXAccessibleComponent::implGetBounds() throw (uno::RuntimeException) { awt::Rectangle aBounds; if ( mxWindow.is() ) aBounds = mxWindow->getPosSize(); uno::Reference< accessibility::XAccessible > xParent( implGetForeignControlledParent() ); if ( xParent.is() ) { // hmm, we can't rely on our VCL coordinates, as in the Accessibility Hierarchy, somebody gave // us a parent which is different from our VCL parent // (actually, we did not check if it's really different ...) // the screen location of the foreign parent uno::Reference< accessibility::XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), uno::UNO_QUERY ); DBG_ASSERT( xParentComponent.is(), "VCLXAccessibleComponent::implGetBounds: invalid (foreign) parent component!" ); awt::Point aScreenLocForeign( 0, 0 ); if ( xParentComponent.is() ) aScreenLocForeign = xParentComponent->getLocationOnScreen(); // the screen location of the VCL parent xParent = getVclParent(); if ( xParent.is() ) xParentComponent = xParentComponent.query( xParent->getAccessibleContext() ); awt::Point aScreenLocVCL( 0, 0 ); if ( xParentComponent.is() ) aScreenLocVCL = xParentComponent->getLocationOnScreen(); // the difference between them awt::Size aOffset( aScreenLocVCL.X - aScreenLocForeign.X, aScreenLocVCL.Y - aScreenLocForeign.Y ); // move the bounds aBounds.X += aOffset.Width; aBounds.Y += aOffset.Height; } return aBounds; } awt::Point VCLXAccessibleComponent::getLocationOnScreen( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); awt::Point aPos; if ( GetWindow() ) { Rectangle aRect = GetWindow()->GetWindowExtentsRelative( NULL ); aPos.X = aRect.Left(); aPos.Y = aRect.Top(); } return aPos; } void VCLXAccessibleComponent::grabFocus( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); uno::Reference< accessibility::XAccessibleStateSet > xStates = getAccessibleStateSet(); if ( mxWindow.is() && xStates.is() && xStates->contains( accessibility::AccessibleStateType::FOCUSABLE ) ) mxWindow->setFocus(); } uno::Any VCLXAccessibleComponent::getAccessibleKeyBinding() throw (uno::RuntimeException) { OContextEntryGuard( this ); uno::Any aRet; if ( GetWindow() ) { String sText = GetWindow()->GetText(); xub_StrLen nFound = sText.Search( MNEMONIC_CHAR ); if ( STRING_NOTFOUND != nFound && ++nFound < sText.Len() ) { sText.ToUpperAscii(); sal_Unicode cChar = sText.GetChar( nFound ); if ( ( cChar >= '0' && cChar <= '9' ) || ( cChar >= 'A' && cChar <= 'Z' ) ) { awt::KeyEvent aEvent; if ( cChar >= '0' && cChar <= '9' ) aEvent.KeyCode = awt::Key::NUM0 + cChar - '0'; else if ( cChar >= 'A' && cChar <= 'Z' ) aEvent.KeyCode = awt::Key::A + cChar - 'A'; aEvent.KeyChar = cChar; aEvent.KeyFunc = 0; aEvent.Modifiers = awt::KeyModifier::MOD2; aRet <<= aEvent; } } } return aRet; } // XAccessibleExtendedComponent sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); sal_Int32 nColor = 0; if ( GetWindow() ) nColor = GetWindow()->GetControlForeground().GetColor(); return nColor; } sal_Int32 SAL_CALL VCLXAccessibleComponent::getBackground( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); sal_Int32 nColor = 0; if ( GetWindow() ) nColor = GetWindow()->GetControlBackground().GetColor(); return nColor; } uno::Reference< awt::XFont > SAL_CALL VCLXAccessibleComponent::getFont( ) throw (uno::RuntimeException) { return uno::Reference< awt::XFont >(); } awt::FontDescriptor SAL_CALL VCLXAccessibleComponent::getFontMetrics( const uno::Reference< awt::XFont >& xFont ) throw (uno::RuntimeException) { return xFont->getFontDescriptor(); } sal_Bool SAL_CALL VCLXAccessibleComponent::isEnabled( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); sal_Bool bEnabled = sal_False; if ( GetWindow() ) bEnabled = GetWindow()->IsEnabled(); return bEnabled; } ::rtl::OUString SAL_CALL VCLXAccessibleComponent::getTitledBorderText( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); ::rtl::OUString sRet; if ( GetWindow() ) sRet = GetWindow()->GetText(); return sRet; } ::rtl::OUString SAL_CALL VCLXAccessibleComponent::getToolTipText( ) throw (uno::RuntimeException) { OContextEntryGuard( this ); ::rtl::OUString sRet; if ( GetWindow() ) sRet = GetWindow()->GetQuickHelpText(); return sRet; }