diff options
author | Armin Le Grand <alg@apache.org> | 2013-11-27 13:00:02 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-11-27 13:00:02 +0000 |
commit | bd0c3b940f6006d3cb49381230795db667aeb943 (patch) | |
tree | 44b9d5e690cc51fd968802e6c9fc53c5e174f073 /svx/source | |
parent | b1a660f9298f00cb97b51d77e896abece4767562 (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
Notes
Notes:
merged as: 7ef4a5bd51c606c70661dd303ebd1eeaec0c3834
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 35 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 6 |
2 files changed, 13 insertions, 28 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index cd48af734d34..11a79dff1516 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -452,36 +452,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>(); } //-----IAccessibility2 Implementation 2009 diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 1fad8b6f9684..499445c99ced 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -3185,12 +3185,6 @@ bool SdrObject::HasText() const return false; } -//IAccessibility2 Implementation 2009----- -const SdrObject* SdrObject::GetCaptionObj() const -{ - return pCaptionObj; -} -//-----IAccessibility2 Implementation 2009 //////////////////////////////////////////////////////////////////////////////////////////////////// // // @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@ |