summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorChristian Lippka <christian.lippka@sun.com>2010-08-06 14:53:07 +0200
committerChristian Lippka <christian.lippka@sun.com>2010-08-06 14:53:07 +0200
commit8054865b2efe772f1d0149b59888de2bbc908320 (patch)
treef911537606dbc1b4a47c2e0808e644c67692334c /sd
parent20b1e3a3858913b6f63773ff5a42a972c415134d (diff)
parentb78085151418f4cf0a643cce26701a728b2a00f0 (diff)
merge
Diffstat (limited to 'sd')
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelViewShell.cxx17
-rwxr-xr-xsd/source/ui/view/sdwindow.cxx4
2 files changed, 17 insertions, 4 deletions
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index c62faf29ca50..f193b2ece851 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>();
}
// ---------------------------------------------------------------------------------------------------------------------
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 28873b3946a3..ed5dda39037c 100755
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1165,11 +1165,11 @@ void Window::DropScroll(const Point& rMousePos)
Window::CreateAccessible (void)
{
if (mpViewShell != NULL)
- return mpViewShell->CreateAccessibleDocumentView (this);
+ return mpViewShell->CreateAccessibleDocumentView (this);
else
{
OSL_TRACE ("::sd::Window::CreateAccessible: no view shell");
- return ::Window::CreateAccessible ();
+ return ::Window::CreateAccessible ();
}
}