summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-26 22:30:32 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-26 22:30:32 +0200
commitb7c38dbce15f379554b955f0f3a27ae316626147 (patch)
tree013349318ed929da1dd181fd9f0a59527fdf600b /sd
parente9e5a0227e2db1d6e3b55b6dcc48cba471a17e45 (diff)
slidecopy: corrected parenthood of the ToolPanelDecks's A11Y object - had a cyclic ancestor chain before ...
Diffstat (limited to 'sd')
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelViewShell.cxx19
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;
}