diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-08 09:27:41 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-08 09:27:41 +0200 |
commit | 00d1c0a39e21071c94c230dbb27578347f8e6fc3 (patch) | |
tree | fa3906b6de2185ad007978a2a23d6462667caaff /sfx2/workben | |
parent | 4c469d6bf5ea4136122ec1d9edf0eb214b4e108d (diff) |
slidecopy: A11Y support at XToolPanel
Diffstat (limited to 'sfx2/workben')
-rw-r--r-- | sfx2/workben/custompanel/ctp_panel.cxx | 14 | ||||
-rw-r--r-- | sfx2/workben/custompanel/ctp_panel.hxx | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/workben/custompanel/ctp_panel.cxx b/sfx2/workben/custompanel/ctp_panel.cxx index c159b65e497e..7cbd3b0dece4 100644 --- a/sfx2/workben/custompanel/ctp_panel.cxx +++ b/sfx2/workben/custompanel/ctp_panel.cxx @@ -71,6 +71,7 @@ namespace sd { namespace colortoolpanel using ::com::sun::star::lang::EventObject; using ::com::sun::star::awt::XDevice; using ::com::sun::star::awt::XGraphics; + using ::com::sun::star::accessibility::XAccessible; /** === end UNO using === **/ namespace WindowAttribute = ::com::sun::star::awt::WindowAttribute; namespace PosSize = ::com::sun::star::awt::PosSize; @@ -149,6 +150,19 @@ namespace sd { namespace colortoolpanel } //------------------------------------------------------------------------------------------------------------------ + Reference< XAccessible > SAL_CALL SingleColorPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_xWindow.is() ) + throw DisposedException( ::rtl::OUString(), *this ); + + // TODO: the following is wrong, since it doesn't respect i_rParentAccessible. In a real extension, you should + // implement this correctly :) + (void)i_rParentAccessible; + return Reference< XAccessible >( getWindow(), UNO_QUERY ); + } + + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL SingleColorPanel::windowPaint( const PaintEvent& i_rEvent ) throw (RuntimeException) { try diff --git a/sfx2/workben/custompanel/ctp_panel.hxx b/sfx2/workben/custompanel/ctp_panel.hxx index c3882e3afe98..75283d686250 100644 --- a/sfx2/workben/custompanel/ctp_panel.hxx +++ b/sfx2/workben/custompanel/ctp_panel.hxx @@ -63,6 +63,7 @@ namespace sd { namespace colortoolpanel // XToolPanel virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getWindow() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL createAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible ) throw (::com::sun::star::uno::RuntimeException); // XPaintListener virtual void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw (::com::sun::star::uno::RuntimeException); |