summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorSteve Yin <steve_y@apache.org>2013-12-13 05:20:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-13 10:09:44 +0000
commite9c08cfed475a61ef5612262a43eab27c96fc9bd (patch)
treebed42042084736c6d23735cca838a9cff94832e7 /svx/source
parente3853a1abc9873a00478ba56b124e0a94f9896ba (diff)
fixes for issues checked out by coverity
(cherry picked from commit 6f53c4f2f46691d41ccf2c2a99ae40105606e489) Change-Id: I76e21409fee4f39bd6f048636e4fbc392807a486
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx15
-rw-r--r--svx/source/table/accessibletableshape.cxx2
2 files changed, 8 insertions, 9 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 4da0e3ff930a..a72ebef31ffa 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -422,18 +422,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));
}
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index 9d1ab93be562..d0cddf61e50b 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -313,6 +313,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)
{
}
@@ -328,7 +329,6 @@ void AccessibleTableShape::Init()
{
try
{
- mnPreviousSelectionCount = 0;
Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
Reference< XTable > xTable( xSet->getPropertyValue("Model"), UNO_QUERY_THROW );