You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/12/13 06:20:33 UTC
svn commit: r1550645 - in /openoffice/trunk/main/svx/source:
accessibility/AccessibleShape.cxx table/accessibletableshape.cxx
Author: steve_y
Date: Fri Dec 13 05:20:32 2013
New Revision: 1550645
URL: http://svn.apache.org/r1550645
Log:
fixes for issues checked out by coverity
Modified:
openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx
openoffice/trunk/main/svx/source/table/accessibletableshape.cxx
Modified: openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx?rev=1550645&r1=1550644&r2=1550645&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx (original)
+++ openoffice/trunk/main/svx/source/accessibility/AccessibleShape.cxx Fri Dec 13 05:20:32 2013
@@ -435,19 +435,18 @@ uno::Reference<XAccessibleRelationSet> S
throw (::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard (maMutex);
- ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
- uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
- aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
+ ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
//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> S
{
return uno::Reference<XAccessibleRelationSet>(NULL);
}
-
- return uno::Reference<XAccessibleRelationSet>();
}
/** Return a copy of the state set.
Modified: openoffice/trunk/main/svx/source/table/accessibletableshape.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/table/accessibletableshape.cxx?rev=1550645&r1=1550644&r2=1550645&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/table/accessibletableshape.cxx (original)
+++ openoffice/trunk/main/svx/source/table/accessibletableshape.cxx Fri Dec 13 05:20:32 2013
@@ -328,6 +328,7 @@ void SAL_CALL AccessibleTableShapeImpl::
AccessibleTableShape::AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo)
: AccessibleTableShape_Base(rShapeInfo, rShapeTreeInfo)
, mxImpl( new AccessibleTableShapeImpl( maShapeTreeInfo ) )
+, mnPreviousSelectionCount(0)
{
}
@@ -342,8 +343,7 @@ AccessibleTableShape::~AccessibleTableSh
void AccessibleTableShape::Init()
{
try
- {
- mnPreviousSelectionCount = 0;
+ {
Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
Reference< XTable > xTable( xSet->getPropertyValue(C2U("Model")), UNO_QUERY_THROW );