Kaydet (Commit) 7ef4a5bd authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

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 bd0c3b94)

Conflicts:
	svx/inc/svx/svdobj.hxx
	svx/source/svdraw/svdobj.cxx

Change-Id: Ic8dec5c6def35753d757066c7ea02e1a92b46f6c
üst 76bb6d76
......@@ -357,7 +357,6 @@ protected:
SdrObjUserCall* pUserCall;
SdrObjPlusData* pPlusData; // Broadcaster, UserData, Konnektoren, ... (Das ist der Bitsack)
SdrObject* pCaptionObj;
sal_uInt32 nOrdNum; // Rangnummer des Obj in der Liste
SfxGrabBagItem* pGrabBagItem; // Holds the GrabBagItem property
......@@ -1036,7 +1035,6 @@ public:
// #i121917#
virtual bool HasText() const;
const SdrObject* GetCaptionObj() const;
protected:
/** Sets a new UNO shape
*
......
......@@ -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>();
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment