summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/ToolPanelDrawer.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-01 17:52:36 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-01 17:52:36 +0200
commit17d7bf8f871c2b2e04a14c3d9cca27e7e6c84cac (patch)
treef5ec06547d4626ee3c23a70b7b0470c58f9557a8 /sd/source/ui/toolpanel/ToolPanelDrawer.cxx
parentaea4ea94ba339963261b458f178f0a8338c62f3b (diff)
slidecopy: improved A11Y API implementations for the ToolPanelDeck
items left: - A11Y representation of the scroll buttons of the PanelTabBar - AccessibleToolPanelTabBar event notifications - consolidate AccessibleToolPanelDeck/TabBar/Item?
Diffstat (limited to 'sd/source/ui/toolpanel/ToolPanelDrawer.cxx')
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelDrawer.cxx24
1 files changed, 6 insertions, 18 deletions
diff --git a/sd/source/ui/toolpanel/ToolPanelDrawer.cxx b/sd/source/ui/toolpanel/ToolPanelDrawer.cxx
index aa3af47535f4..86406fdff5b4 100755
--- a/sd/source/ui/toolpanel/ToolPanelDrawer.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelDrawer.cxx
@@ -132,36 +132,24 @@ namespace sd { namespace toolpanel
}
//------------------------------------------------------------------------------------------------------------------
- ::boost::optional< size_t > ToolPanelDrawer::GetPanelItemFromScreenPos( const ::Point& i_rScreenPos )
+ size_t ToolPanelDrawer::GetAccessibleChildCount() const
{
- for ( ::std::vector< PTitleBar >::const_iterator drawer = m_aDrawers.begin();
- drawer != m_aDrawers.end();
- ++drawer
- )
- {
- const Rectangle aDrawerBounds(
- m_rParentWindow.OutputToScreenPixel( (*drawer)->GetWindow()->GetPosPixel() ),
- (*drawer)->GetWindow()->GetSizePixel()
- );
- if ( aDrawerBounds.IsInside( i_rScreenPos ) )
- return ::boost::optional< size_t >( drawer - m_aDrawers.begin() );
- }
- return ::boost::optional< size_t >();
+ return m_aDrawers.size();
}
//------------------------------------------------------------------------------------------------------------------
- Reference< XAccessible > ToolPanelDrawer::GetPanelItemAccessible( const size_t i_nItemPos, const Reference< XAccessible >& i_rParentAccessible )
+ Reference< XAccessible > ToolPanelDrawer::GetAccessibleChild( const size_t i_nChildIndex, const Reference< XAccessible >& i_rParentAccessible )
{
- ENSURE_OR_RETURN( i_nItemPos < m_aDrawers.size(), "illegal index", NULL );
+ ENSURE_OR_RETURN( i_nChildIndex < m_aDrawers.size(), "illegal index", NULL );
- const PTitleBar pTitleBar( m_aDrawers[ i_nItemPos ] );
+ const PTitleBar pTitleBar( m_aDrawers[ i_nChildIndex ] );
Window* pItemWindow( pTitleBar->GetWindow() );
Reference< XAccessible > xItemAccessible( pItemWindow->GetAccessible( FALSE ) );
if ( !xItemAccessible.is() )
{
xItemAccessible = pTitleBar->CreateAccessibleObject( i_rParentAccessible );
- OSL_ENSURE( xItemAccessible.is(), "ToolPanelDrawer::GetPanelItemAccessible: invalid XAccessible returned by CreateAccessibleObject!" );
+ OSL_ENSURE( xItemAccessible.is(), "ToolPanelDrawer::GetAccessibleChild: invalid XAccessible returned by CreateAccessibleObject!" );
pItemWindow->SetAccessible( xItemAccessible );
}