Author: alg
Date: Wed Nov 27 13:00:02 2013
New Revision: 1546021
URL: http://svn.apache.org/r1546021
Log:
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
Modified:
openoffice/trunk/main/svx/inc/svx/svdobj.hxx
openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx
openoffice/trunk/main/svx/source/svdraw/svdobj.cxx
Modified: openoffice/trunk/main/svx/inc/svx/svdobj.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svdobj.hxx?rev=1546021&r1=1546020&r2=1546021&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/svdobj.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/svdobj.hxx Wed Nov 27 13:00:02 2013
@@ -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 );
Modified: openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx?rev=1546021&r1=1546020&r2=1546021&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx
(original)
+++ openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx Wed Nov
27 13:00:02 2013
@@ -448,41 +448,32 @@ uno::Reference<XAccessible> SAL_CALL
//IAccessibility2 Implementation 2009-----
uno::Reference<XAccessibleRelationSet> SAL_CALL
- AccessibleShape::getAccessibleRelationSet (void)
+ AccessibleShape::getAccessibleRelationSet (void)
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
- {
- //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 ) );
- }
- }
- if (pRelationSet != NULL)
+ ::osl::MutexGuard aGuard (maMutex);
+ ::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())
+ {
+ pRelationSet->AddRelation(
+ AccessibleRelation( AccessibleRelationType::DESCRIBED_BY,
aSequence ) );
+ }
+
+ if (pRelationSet != NULL)
{
return uno::Reference<XAccessibleRelationSet> (
new ::utl::AccessibleRelationSetHelper (*pRelationSet));
}
else
+ {
return uno::Reference<XAccessibleRelationSet>(NULL);
- return uno::Reference<XAccessibleRelationSet>();
+ }
+
+ return uno::Reference<XAccessibleRelationSet>();
}
//-----IAccessibility2 Implementation 2009
Modified: openoffice/trunk/main/svx/source/svdraw/svdobj.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdobj.cxx?rev=1546021&r1=1546020&r2=1546021&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/svdraw/svdobj.cxx (original)
+++ openoffice/trunk/main/svx/source/svdraw/svdobj.cxx Wed Nov 27 13:00:02 2013
@@ -3185,12 +3185,6 @@ bool SdrObject::HasText() const
return false;
}
-//IAccessibility2 Implementation 2009-----
-const SdrObject* SdrObject::GetCaptionObj() const
-{
- return pCaptionObj;
-}
-//-----IAccessibility2 Implementation 2009
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@