summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-11-27 13:00:02 +0000
committerMichael Meeks <michael.meeks@collabora.com>2014-06-10 16:37:10 +0100
commitd8c0d479c8e5e45841e7e80c7412eeef7862eaa4 (patch)
tree6df543a7809187259210a03c19ce1bca47027415 /svx
parent7e877e130fc05268bdd01c61cfbdd2489a74f7ab (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.cxx35
-rw-r--r--svx/source/svdraw/svdobj.cxx5
2 files changed, 13 insertions, 27 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 47d951d24d53..a8419d8956e5 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