diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-26 22:30:32 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-26 22:30:32 +0200 |
commit | b7c38dbce15f379554b955f0f3a27ae316626147 (patch) | |
tree | 013349318ed929da1dd181fd9f0a59527fdf600b /sd | |
parent | e9e5a0227e2db1d6e3b55b6dcc48cba471a17e45 (diff) |
slidecopy: corrected parenthood of the ToolPanelDecks's A11Y object - had a cyclic ancestor chain before ...
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx index 0d7eeea99190..4c51d92142e9 100755 --- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx +++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx @@ -84,7 +84,6 @@ #include <tools/diagnose_ex.h> #include <unotools/confignode.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/accimplaccess.hxx> #include <comphelper/componentcontext.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/basemutex.hxx> @@ -872,21 +871,19 @@ void ToolPanelViewShell_Impl::ConnectToDockingWindow() // --------------------------------------------------------------------------------------------------------------------- Reference< XAccessible > ToolPanelViewShell_Impl::CreateAccessible( ::sd::Window& i_rWindow ) { - Reference< XAccessible > xAccessibleParent; - ::Window* pAccessibleParent = i_rWindow.GetAccessibleParentWindow(); - if ( pAccessibleParent ) - xAccessibleParent.set( pAccessibleParent->GetAccessible() ); - Reference< XAccessible > xAccessible( GetToolPanelDeck().GetAccessible( FALSE ) ); if ( !xAccessible.is() ) { + // determine the XAccessible which is the parent of the to-be-created object + ::Window* pAccessibleParent = i_rWindow.GetAccessibleParentWindow(); + OSL_ENSURE( pAccessibleParent, "ToolPanelViewShell_Impl::CreateAccessible: illegal accessible parent provided by the sd::Window!" ); + GetToolPanelDeck().SetAccessibleParentWindow( pAccessibleParent ); + xAccessible = GetToolPanelDeck().GetAccessible( TRUE ); ENSURE_OR_RETURN( xAccessible.is(), "ToolPanelViewShell_Impl::CreateAccessible: illegal ToolPanelDeck accessible!", NULL ); - if ( xAccessibleParent.is() ) - { - ::comphelper::OAccessibleImplementationAccess::setAccessibleParent( - xAccessible->getAccessibleContext(), xAccessibleParent ); - } + OSL_ENSURE( xAccessible->getAccessibleContext().is() + && xAccessible->getAccessibleContext()->getAccessibleParent() == pAccessibleParent->GetAccessible(), + "ToolPanelViewShell_Impl::CreateAccessible: illegal parenthood!" ); } return xAccessible; } |