summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-10-09 18:56:58 +0200
committerMathias Bauer <mba@openoffice.org>2010-10-09 18:56:58 +0200
commit336d933a1b109549a35b54a58bc5fb81bc5f73e0 (patch)
tree5852c4de7bd7395dbf01d693065a1760fd174aad /sd/source/ui/toolpanel/ToolPanelViewShell.cxx
parenteffc31fbbf24d9b81499acffe29483e764361594 (diff)
parent5046ac3b0ff828ce0824231dd2658fa8afea89d1 (diff)
CWS changehid: resync to m89
Diffstat (limited to 'sd/source/ui/toolpanel/ToolPanelViewShell.cxx')
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelViewShell.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index e0cfaa5d87ff..af5d9779b22f 100755
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -512,12 +512,20 @@ ToolPanelViewShell::ToolPanelViewShell( SfxViewFrame* pFrame, ViewShellBase& rVi
SetName( String( RTL_CONSTASCII_USTRINGPARAM( "ToolPanelViewShell" ) ) );
+ // Some recent changes to the toolpanel make it necessary to create the
+ // accessibility object now. Creating it on demand would lead to a
+ // pointer cycle in the tree of accessibility objects and would lead
+ // e.g. the accerciser AT tool into an infinite loop.
+ // It would be nice to get rid of this workaround in the future.
+ if (mpContentWindow.get())
+ mpContentWindow->SetAccessible(mpImpl->CreateAccessible(*mpContentWindow));
+
// For accessibility we have to shortly hide the content window. This
// triggers the construction of a new accessibility object for the new
// view shell. (One is created earlier while the construtor of the base
// class is executed. At that time the correct accessibility object can
// not be constructed.)
- if ( mpContentWindow.get() )
+ if (mpContentWindow.get())
{
mpContentWindow->Hide();
mpContentWindow->Show();
@@ -633,7 +641,12 @@ DockingWindow* ToolPanelViewShell::GetDockingWindow()
Reference< XAccessible > ToolPanelViewShell::CreateAccessibleDocumentView( ::sd::Window* i_pWindow )
{
ENSURE_OR_RETURN( i_pWindow, "ToolPanelViewShell::CreateAccessibleDocumentView: illegal window!", NULL );
- return mpImpl->CreateAccessible( *i_pWindow );
+ // As said above, we have to create the accessibility object
+ // (unconditionally) in the constructor, not here on demand, or
+ // otherwise we would create a cycle in the tree of accessible objects
+ // which could lead to infinite loops in AT tools.
+ // return mpImpl->CreateAccessible( *i_pWindow );
+ return Reference<XAccessible>();
}
// ---------------------------------------------------------------------------------------------------------------------