diff options
author | Armin Le Grand <alg@apache.org> | 2013-11-27 13:00:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-27 15:51:46 +0000 |
commit | 7ef4a5bd51c606c70661dd303ebd1eeaec0c3834 (patch) | |
tree | fb216442992340ccab2440c299b982c463e69a4b /svx | |
parent | 76bb6d7678669b5af1731fb87e632784cd3c01fc (diff) |
removed pCaptionObj from accessibility
it was not initialized but accessed in one place. Checked with symphony code,
there was a set method which is not in AOO trunk, thus solved accesses to zero
pointer usage
(cherry picked from commit bd0c3b940f6006d3cb49381230795db667aeb943)
Conflicts:
svx/inc/svx/svdobj.hxx
svx/source/svdraw/svdobj.cxx
Change-Id: Ic8dec5c6def35753d757066c7ea02e1a92b46f6c
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 35 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 5 |
2 files changed, 13 insertions, 27 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index fa36b9c1e2e5..bdb7453084ca 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -421,36 +421,27 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL throw (::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard (maMutex); - ::utl::AccessibleRelationSetHelper* pRelationSet = - new utl::AccessibleRelationSetHelper; - SdrObject* pCaptionSdr = const_cast < SdrObject* > ( m_pShape->GetCaptionObj() ) ; - if(pCaptionSdr!=NULL) - { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - uno::Reference<drawing::XShape> xCaptionShape ( pCaptionSdr->getUnoShape(),uno::UNO_QUERY); - if(xCaptionShape.is()) - { - aSequence[0] = mpParent->GetAccessibleCaption(xCaptionShape); - pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); - } - } - else + ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper; + uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); + aSequence[0] = mpParent->GetAccessibleCaption(mxShape); + + //this mxshape is the captioned shape, only for sw + if(aSequence[0].get()) { - //this mxshape is the captioned shape, only for sw - if(mpParent->GetAccessibleCaption(mxShape).get()) - { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = mpParent->GetAccessibleCaption(mxShape); - pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); - } + pRelationSet->AddRelation( + AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); } - if (pRelationSet != NULL) + + if (pRelationSet != NULL) { return uno::Reference<XAccessibleRelationSet> ( new ::utl::AccessibleRelationSetHelper (*pRelationSet)); } else + { return uno::Reference<XAccessibleRelationSet>(NULL); + } + return uno::Reference<XAccessibleRelationSet>(); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 401609415f63..b495c5b98b8f 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -3128,11 +3128,6 @@ void SdrObject::notifyShapePropertyChange( const ::svx::ShapeProperty _eProperty return pSvxShape->getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty ); } -const SdrObject* SdrObject::GetCaptionObj() const -{ - return pCaptionObj; -} - //////////////////////////////////////////////////////////////////////////////////////////////////// // // transformation interface for StarOfficeAPI. This implements support for |