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
commita37d85f979d1616b158c918762821ed82b1e0691 (patch)
treebea5ee88e1d2ca26362ae0fa7bbe8b563ed096f0 /sd
parent1380a03aaf7464643eb99de1488ab5b372663ccd (diff)
parentd766efe9f601a65cd22b46e0f4131d9acd74b1a8 (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 e8cdd0619..4e7e55eea 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 4f8dfe917..9290bc6c1 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 ();
}
}