[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svx/inc svx/source
Armin Le Grand
alg at apache.org
Wed Nov 27 06:08:10 PST 2013
svx/inc/svx/svdobj.hxx | 6 ----
svx/source/accessibility/AccessibleShape.cxx | 35 ++++++++++-----------------
svx/source/svdraw/svdobj.cxx | 6 ----
3 files changed, 13 insertions(+), 34 deletions(-)
New commits:
commit bd0c3b940f6006d3cb49381230795db667aeb943
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
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 4c684c8..ce0e1ba 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -452,9 +452,6 @@ protected:
SdrObjUserCall* pUserCall;
SdrObjPlusData* pPlusData; // Broadcaster, UserData, Konnektoren, ... (Das ist der Bitsack)
-//IAccessibility2 Implementation 2009-----
- SdrObject* pCaptionObj;
-//-----IAccessibility2 Implementation 2009
sal_uInt32 nOrdNum; // Rangnummer des Obj in der Liste
/** Position in the navigation order. SAL_MAX_UINT32 when not used.
@@ -1131,9 +1128,6 @@ public:
// #121917#
virtual bool HasText() const;
-//IAccessibility2 Implementation 2009-----
- const SdrObject* GetCaptionObj() const;
-//-----IAccessibility2 Implementation 2009
protected:
void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape );
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index cd48af73..11a79df 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 1fad8b6..499445c 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
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@
More information about the Libreoffice-commits
mailing list