diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-02-11 17:24:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-02-11 17:24:04 +0100 |
commit | 01c62797c2c8acf6cb8cdd0f713411dca5411ac3 (patch) | |
tree | b271c98f2d57246ccab051cce9efdb0a719e3380 /svx | |
parent | a67d5c7604e8c420f6d63df89f04e33f940f952a (diff) |
Simplify ChildrenManager
Change-Id: I43762aa8b572651676d8cac4848d4c6d478cf850
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/ChildrenManager.cxx | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx index 1caeea682580..77beb00aae45 100644 --- a/svx/source/accessibility/ChildrenManager.cxx +++ b/svx/source/accessibility/ChildrenManager.cxx @@ -33,21 +33,17 @@ ChildrenManager::ChildrenManager ( const css::uno::Reference<drawing::XShapes>& rxShapeList, const AccessibleShapeTreeInfo& rShapeTreeInfo, AccessibleContextBase& rContext) - : mpImpl (nullptr) + : mpImpl( + new ChildrenManagerImpl( + rxParent, rxShapeList, rShapeTreeInfo, rContext)) { - mpImpl = new ChildrenManagerImpl (rxParent, rxShapeList, rShapeTreeInfo, rContext); - if (mpImpl != nullptr) - mpImpl->Init (); - else - throw uno::RuntimeException( - "ChildrenManager::ChildrenManager can't create implementation object", nullptr); + mpImpl->Init (); } ChildrenManager::~ChildrenManager() { - if (mpImpl != nullptr) - mpImpl->dispose(); + mpImpl->dispose(); // emtpy OSL_TRACE ("~ChildrenManager"); @@ -55,7 +51,6 @@ ChildrenManager::~ChildrenManager() long ChildrenManager::GetChildCount() const throw () { - assert(mpImpl != nullptr); return mpImpl->GetChildCount(); } @@ -63,14 +58,12 @@ css::uno::Reference<XAccessible> ChildrenManager::GetChild (long nIndex) throw (css::uno::RuntimeException, css::lang::IndexOutOfBoundsException) { - assert(mpImpl != nullptr); return mpImpl->GetChild (nIndex); } Reference<XAccessible> ChildrenManager::GetChild (const Reference<drawing::XShape>& xShape) throw (css::uno::RuntimeException) { - assert(mpImpl != nullptr); return mpImpl->GetChild (xShape); } @@ -78,63 +71,54 @@ css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(long nI throw (css::uno::RuntimeException, css::lang::IndexOutOfBoundsException) { - assert(mpImpl != nullptr); return mpImpl->GetChildShape(nIndex); } void ChildrenManager::Update (bool bCreateNewObjectsOnDemand) { - assert(mpImpl != nullptr); mpImpl->Update (bCreateNewObjectsOnDemand); } void ChildrenManager::SetShapeList (const css::uno::Reference<css::drawing::XShapes>& xShapeList) { - assert(mpImpl != nullptr); mpImpl->SetShapeList (xShapeList); } void ChildrenManager::AddAccessibleShape (css::uno::Reference<css::accessibility::XAccessible> const & shape) { - assert(mpImpl != nullptr); mpImpl->AddAccessibleShape (shape); } void ChildrenManager::ClearAccessibleShapeList() { - assert(mpImpl != nullptr); mpImpl->ClearAccessibleShapeList (); } void ChildrenManager::SetInfo (AccessibleShapeTreeInfo& rShapeTreeInfo) { - assert(mpImpl != nullptr); mpImpl->SetInfo (rShapeTreeInfo); } void ChildrenManager::UpdateSelection() { - assert(mpImpl != nullptr); mpImpl->UpdateSelection (); } bool ChildrenManager::HasFocus() { - assert(mpImpl != nullptr); return mpImpl->HasFocus (); } void ChildrenManager::RemoveFocus() { - assert(mpImpl != nullptr); mpImpl->RemoveFocus (); } // IAccessibleViewForwarderListener -void ChildrenManager::ViewForwarderChanged (ChangeType aChangeType, - const IAccessibleViewForwarder* pViewForwarder) +void ChildrenManager::ViewForwarderChanged( + IAccessibleViewForwarderListener::ChangeType aChangeType, + const IAccessibleViewForwarder* pViewForwarder) { - assert(mpImpl != nullptr); mpImpl->ViewForwarderChanged (aChangeType, pViewForwarder); } |