[Libreoffice-commits] core.git: include/svx svx/source
Armin Le Grand
alg at apache.org
Wed Nov 27 07:52:09 PST 2013
include/svx/svdobj.hxx | 2 -
svx/source/accessibility/AccessibleShape.cxx | 35 ++++++++++-----------------
svx/source/svdraw/svdobj.cxx | 5 ---
3 files changed, 13 insertions(+), 29 deletions(-)
New commits:
commit 7ef4a5bd51c606c70661dd303ebd1eeaec0c3834
Author: Armin Le Grand <alg at apache.org>
Date: Wed Nov 27 13:00:02 2013 +0000
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
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index ee08d6b..f1b3dbb 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -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
*
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index fa36b9c..bdb7453 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 4016094..b495c5b 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
More information about the Libreoffice-commits
mailing list