diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-09-30 17:34:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-09-30 17:34:35 +0100 |
commit | a68dc8f5c6b3155b6427869476bca1c27f5aee02 (patch) | |
tree | d96721a4d3efeb7a85769a6942e48bb0f2d2fe4b /sd/source/ui | |
parent | efaec7055412420037271ed49b38a10b0a7a2c42 (diff) |
Split a11y ctor (#i114012)
Split ctor so that there aren't any horrible callbacks into semi-constructed
objects that causes draw/impress to immediately die if a11y is enabled
Diffstat (limited to 'sd/source/ui')
-rwxr-xr-x | sd/source/ui/accessibility/AccessibleSlideSorterView.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/inc/AccessibleSlideSorterView.hxx | 2 | ||||
-rwxr-xr-x | sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 12 |
3 files changed, 21 insertions, 4 deletions
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index f7b901aff..e6a29136e 100755 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -109,7 +109,6 @@ AccessibleSlideSorterView::AccessibleSlideSorterView( const Reference<XAccessible>& rxParent, ::Window* pContentWindow) : AccessibleSlideSorterViewBase(MutexOwner::maMutex), - mpImpl(new Implementation(*this,rSlideSorter,pContentWindow)), mrSlideSorter(rSlideSorter), mxParent(rxParent), mnClientId(0), @@ -121,6 +120,16 @@ AccessibleSlideSorterView::AccessibleSlideSorterView( + +void AccessibleSlideSorterView::Init() +{ + mpImpl.reset(new Implementation(*this,mrSlideSorter,mpContentWindow)); +} + + + + + AccessibleSlideSorterView::~AccessibleSlideSorterView (void) { Destroyed (); diff --git a/sd/source/ui/inc/AccessibleSlideSorterView.hxx b/sd/source/ui/inc/AccessibleSlideSorterView.hxx index 5890e295b..8667d35a0 100644 --- a/sd/source/ui/inc/AccessibleSlideSorterView.hxx +++ b/sd/source/ui/inc/AccessibleSlideSorterView.hxx @@ -76,6 +76,8 @@ public: ::sd::slidesorter::SlideSorter& rSlideSorter, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> & rxParent, ::Window* pParentWindow); + + void Init(); virtual ~AccessibleSlideSorterView (void); diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 07e4ef749..78cdabd46 100755 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -273,16 +273,22 @@ Reference<drawing::XDrawSubController> SlideSorterViewShell::CreateSubController SlideSorterViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow) { OSL_ASSERT(mpSlideSorter.get()!=NULL); - // When the view is not set then the initialization is not yet complete // and we can not yet provide an accessibility object. - if (mpView == NULL) + if (mpView == NULL || mpSlideSorter.get() == NULL) return NULL; - return new ::accessibility::AccessibleSlideSorterView ( + ::accessibility::AccessibleSlideSorterView *pAccessibleView = + new ::accessibility::AccessibleSlideSorterView( *mpSlideSorter.get(), pWindow->GetAccessibleParentWindow()->GetAccessible(), pWindow); + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> xRet(pAccessibleView); + + pAccessibleView->Init(); + + return xRet; } |