svx/source/accessibility/AccessibleShape.cxx |   15 +++++++--------
 svx/source/table/accessibletableshape.cxx    |    2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit e9c08cfed475a61ef5612262a43eab27c96fc9bd
Author: Steve Yin <stev...@apache.org>
Date:   Fri Dec 13 05:20:32 2013 +0000

    fixes for issues checked out by coverity
    
    (cherry picked from commit 6f53c4f2f46691d41ccf2c2a99ae40105606e489)
    
    Change-Id: I76e21409fee4f39bd6f048636e4fbc392807a486

diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 4da0e3f..a72ebef 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 9d1ab93..d0cddf6 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 );
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to