diff options
author | Thomas Benisch <tbe@openoffice.org> | 2002-09-04 14:52:50 +0000 |
---|---|---|
committer | Thomas Benisch <tbe@openoffice.org> | 2002-09-04 14:52:50 +0000 |
commit | f5ce5448803fcfff8d54da014a57795d38d181cb (patch) | |
tree | fd1a89a97f7f61a1a9e890741ff42c3de5095c7b | |
parent | 220feb05511eb1c5601991eb51b58a95d5553ff6 (diff) |
#101150# added FillAccessibleRelationSet()
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx | 6 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 50 |
2 files changed, 30 insertions, 26 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx index 4f7684fca8ce..016a06a16e5b 100644 --- a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx @@ -2,9 +2,9 @@ * * $RCSfile: vclxaccessiblecomponent.hxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: tbe $ $Date: 2002-08-26 13:27:15 $ + * last change: $Author: tbe $ $Date: 2002-09-04 15:51:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,6 +103,7 @@ class VclSimpleEvent; class VclWindowEvent; namespace utl { +class AccessibleRelationSetHelper; class AccessibleStateSetHelper; } @@ -137,6 +138,7 @@ protected: virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ); virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& rVclWindowEvent ) const; diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index a66b5cec3966..814491fe4b0e 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -2,9 +2,9 @@ * * $RCSfile: vclxaccessiblecomponent.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: tbe $ $Date: 2002-08-26 13:30:03 $ + * last change: $Author: tbe $ $Date: 2002-09-04 15:52:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -436,6 +436,29 @@ Window* VCLXAccessibleComponent::GetWindow() const return GetVCLXWindow() ? GetVCLXWindow()->GetWindow() : NULL; } +void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) +{ + Window* pWindow = GetWindow(); + if ( pWindow ) + { + Window *pLabeledBy = pWindow->GetLabeledBy(); + if ( pLabeledBy && pLabeledBy != pWindow ) + { + uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); + aSequence[0] = pLabeledBy->GetAccessible(); + rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) ); + } + + Window* pLabelFor = pWindow->GetLabelFor(); + if ( pLabelFor && pLabelFor != pWindow ) + { + uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); + aSequence[0] = pLabelFor->GetAccessible(); + rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) ); + } + } +} + void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) { Window* pWindow = GetWindow(); @@ -658,27 +681,7 @@ uno::Reference< accessibility::XAccessibleRelationSet > VCLXAccessibleComponent: utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper; uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper; - - Window* pWindow = GetWindow(); - if ( pWindow ) - { - Window *pLabeledBy = pWindow->GetLabeledBy(); - if ( pLabeledBy && pLabeledBy != pWindow ) - { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pLabeledBy->GetAccessible(); - pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) ); - } - - Window* pLabelFor = pWindow->GetLabelFor(); - if ( pLabelFor && pLabelFor != pWindow ) - { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = pLabelFor->GetAccessible(); - pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) ); - } - } - + FillAccessibleRelationSet( *pRelationSetHelper ); return xSet; } @@ -690,7 +693,6 @@ uno::Reference< accessibility::XAccessibleStateSet > VCLXAccessibleComponent::ge uno::Reference< accessibility::XAccessibleStateSet > xSet = pStateSetHelper; FillAccessibleStateSet( *pStateSetHelper ); return xSet; -// return NULL; } lang::Locale VCLXAccessibleComponent::getLocale() throw (accessibility::IllegalAccessibleComponentStateException, uno::RuntimeException) |