diff options
author | Steve Yin <steve_y@apache.org> | 2013-11-28 12:09:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-28 13:32:30 +0000 |
commit | cc5518ca61b209408a9d5262bbdcc39efccdd72d (patch) | |
tree | 23f4be456f58a52ad53a3aaab82894b91a4f797d /sd/source/ui/view/sdwindow.cxx | |
parent | 0a05120e1a08c29b3495878d2a3b5fb30d344c6c (diff) |
Integrate branch of IAccessible2
Change-Id: Ibf3be46e8619c2dce9636e8a90a6703f3e28ba33
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index fdcd2b125796..a8ddedf67c83 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -39,6 +39,8 @@ #include "AccessibleDrawDocumentView.hxx" #include "WindowUpdater.hxx" +#include <vcl/svapp.hxx> + namespace sd { #define SCROLL_LINE_FACT 0.05 ///< factor for line scrolling @@ -1031,8 +1033,22 @@ void Window::DropScroll(const Point& rMousePos) ::com::sun::star::accessibility::XAccessible> Window::CreateAccessible (void) { + // If current viewshell is PresentationViewShell, just return empty because the correct ShowWin will be created later. + if (mpViewShell && mpViewShell->ISA(PresentationViewShell)) + { + return ::Window::CreateAccessible (); + } + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False); + if (xAcc.get()) + { + return xAcc; + } if (mpViewShell != NULL) - return mpViewShell->CreateAccessibleDocumentView (this); + { + xAcc = mpViewShell->CreateAccessibleDocumentView (this); + SetAccessible(xAcc); + return xAcc; + } else { OSL_TRACE ("::sd::Window::CreateAccessible: no view shell"); @@ -1040,6 +1056,17 @@ void Window::DropScroll(const Point& rMousePos) } } +// MT: Removed Windows::SwitchView() introduced with IA2 CWS. +// There are other notifications for this when the active view has chnaged, so +// please update the code to use that event mechanism +void Window::SwitchView() +{ + if (mpViewShell) + { + mpViewShell->SwitchViewFireFocus(GetAccessible(sal_False)); + } +} + OUString Window::GetSurroundingText() const { if ( mpViewShell->GetShellType() == ViewShell::ST_OUTLINE ) |