summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-09-30 17:34:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-09-30 17:34:35 +0100
commit1a6c7c5e6f9452d904a2b7e8a8bddbe538f8bd30 (patch)
tree330ddd079ae555a738fc8bf7ba645c8c585679d7 /sd
parentd9d11875091e8cdd9cae72f96adb65cd472673c6 (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')
-rwxr-xr-xsd/source/ui/accessibility/AccessibleSlideSorterView.cxx11
-rw-r--r--sd/source/ui/inc/AccessibleSlideSorterView.hxx2
-rwxr-xr-xsd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx12
3 files changed, 21 insertions, 4 deletions
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 6f3508d731a8..9fdb6b28db7d 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 16804e79cb8f..65c194847149 100644
--- a/sd/source/ui/inc/AccessibleSlideSorterView.hxx
+++ b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
@@ -77,6 +77,8 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> & rxParent,
::Window* pParentWindow);
+ void Init();
+
virtual ~AccessibleSlideSorterView (void);
/** This method acts like a dispose call. It sends a disposing to all
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 86ec4002cd02..1dc9dbb6426b 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;
}