svx/source/accessibility/AccessibleShape.cxx | 17 +++++++---------- svx/source/table/accessibletableshape.cxx | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-)
New commits: commit 6f53c4f2f46691d41ccf2c2a99ae40105606e489 Author: Steve Yin <stev...@apache.org> Date: Fri Dec 13 05:20:32 2013 +0000 fixes for issues checked out by coverity diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index c34397d..ca55eb2 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -436,18 +436,17 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL { ::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) { + uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); + aSequence[0] = mpParent->GetAccessibleCaption(mxShape); + if(aSequence[0].get()) + { + pRelationSet->AddRelation( + AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); + } return uno::Reference<XAccessibleRelationSet> ( new ::utl::AccessibleRelationSetHelper (*pRelationSet)); } @@ -455,8 +454,6 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL { return uno::Reference<XAccessibleRelationSet>(NULL); } - - return uno::Reference<XAccessibleRelationSet>(); } /** Return a copy of the state set. diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index d148740..eba58ba 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -328,6 +328,7 @@ void SAL_CALL AccessibleTableShapeImpl::disposing( const EventObject& /*Source*/ AccessibleTableShape::AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo) : AccessibleTableShape_Base(rShapeInfo, rShapeTreeInfo) , mxImpl( new AccessibleTableShapeImpl( maShapeTreeInfo ) ) +, mnPreviousSelectionCount(0) { } @@ -343,7 +344,6 @@ void AccessibleTableShape::Init() { try { - mnPreviousSelectionCount = 0; Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW ); Reference< XTable > xTable( xSet->getPropertyValue(C2U("Model")), UNO_QUERY_THROW ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits