[Libreoffice-commits] core.git: 5 commits - connectivity/source starmath/source svx/source

Norbert Thiebaud nthiebaud at gmail.com
Mon Jan 27 01:24:52 PST 2014


 connectivity/source/parse/sqlnode.cxx     |    6 ++--
 starmath/source/ElementsDockingWindow.cxx |   11 ++++---
 starmath/source/dialog.cxx                |   42 ++++++++++++++++--------------
 svx/source/dialog/ctredlin.cxx            |   27 ++++++++++---------
 4 files changed, 46 insertions(+), 40 deletions(-)

New commits:
commit 5de65dc2d6887a9c7a5b4faa23caa53f8c05c2d0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 03:14:59 2014 -0600

    coverity#440706 : Explicit null dereferenced
    
    Change-Id: I9c078ba5cb413bdb1c790adc327796a85d870974

diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 4f56f30..fe59e81 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1983,7 +1983,6 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, sal_
     {
         assert(pSearchCondition->count() == 3);
         OSQLParseNode* pComparison = pSearchCondition->getChild(1);
-        OSQLParseNode* pNewComparison = NULL;
         if(SQL_ISRULE(pComparison, comparison))
         {
             assert(pComparison->count() == 2 ||
@@ -2004,6 +2003,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, sal_
         }
         else
         {
+            OSQLParseNode* pNewComparison = NULL;
             switch(pComparison->getNodeType())
             {
             case SQL_NODE_EQUAL:
@@ -2028,9 +2028,9 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, sal_
                 SAL_WARN( "connectivity.parse", "OSQLParseNode::negateSearchCondition: unexpected node type!" );
                 break;
             }
+            pSearchCondition->replace(pComparison, pNewComparison);
+            delete pComparison;
         }
-        pSearchCondition->replace(pComparison, pNewComparison);
-        delete pComparison;
     }
 
     else if(bNegate && (SQL_ISRULE(pSearchCondition,test_for_null) ||
commit a3e1b357f1de4eb846683ad282b74dfff19a91dd
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 02:59:55 2014 -0600

    coverity#1038499 : Uninitialized scalar field
    
    Change-Id: I51b25a89a6f5184516a17819673e9b52c781eb09

diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index eee6938..e093db0 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -203,11 +203,12 @@ const sal_uInt16 SmElementsControl::aOthers[][2] =
     {RID_DOTSUP, RID_DOTSUP_HELP}, {RID_DOTSDOWN, RID_DOTSDOWN_HELP}
 };
 
-SmElementsControl::SmElementsControl(Window *pParent, const ResId& rResId) :
-    Control(pParent, rResId),
-    mpDocShell(new SmDocShell(SFXOBJECTSHELL_STD_NORMAL)),
-    mpCurrentElement(NULL),
-    mbVerticalMode(true)
+SmElementsControl::SmElementsControl(Window *pParent, const ResId& rResId)
+    : Control(pParent, rResId)
+    , mpDocShell(new SmDocShell(SFXOBJECTSHELL_STD_NORMAL))
+    , maCurrentSetId(0)
+    , mpCurrentElement(NULL)
+    , mbVerticalMode(true)
 {
     maFormat.SetBaseSize(PixelToLogic(Size(0, 24)));
 }
commit d75595b28e0145c0fa90b0fcbefa33e40dd43ca9
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 02:56:05 2014 -0600

    coverity#1038500 : Uninitialized scalar field
    
    Change-Id: I9cc5df332b9bdff59e78a7779496575d44351319

diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 7e53ecb..3c381c5 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -622,31 +622,30 @@ static const FieldMinMax pMinMaxData[10][4] =
 SmCategoryDesc::SmCategoryDesc(VclBuilderContainer& rBuilder, sal_uInt16 nCategoryIdx)
 {
     ++nCategoryIdx;
-    FixedText *pTitle = rBuilder.get<FixedText>(OString::number(nCategoryIdx)+"title");
+    FixedText* pTitle = rBuilder.get<FixedText>(OString::number(nCategoryIdx)+"title");
     if (pTitle)
     {
         Name = pTitle->GetText();
+    }
+    for (int i = 0; i < 4; ++i)
+    {
+        FixedText* pLabel = rBuilder.get<FixedText>(OString::number(nCategoryIdx)+"label"+OString::number(i+1));
 
-        for (int i = 0; i < 4; ++i)
+        if (pLabel)
         {
-            FixedText *pLabel = rBuilder.get<FixedText>(OString::number(nCategoryIdx)+"label"+OString::number(i+1));
-
-            if (pLabel)
-            {
-                Strings  [i] = new OUString(pLabel->GetText());
-                FixedImage *pImage = rBuilder.get<FixedImage>(OString::number(nCategoryIdx)+"image"+OString::number(i+1));
-                Graphics [i] = new Image(pImage->GetImage());
-            }
-            else
-            {
-                Strings  [i] = 0;
-                Graphics [i] = 0;
-            }
-
-            const FieldMinMax &rMinMax = pMinMaxData[ nCategoryIdx ][i];
-            Value[i] = Minimum[i] = rMinMax.nMin;
-            Maximum[i] = rMinMax.nMax;
+            Strings  [i] = new OUString(pLabel->GetText());
+            FixedImage* pImage = rBuilder.get<FixedImage>(OString::number(nCategoryIdx)+"image"+OString::number(i+1));
+            Graphics [i] = new Image(pImage->GetImage());
+        }
+        else
+        {
+            Strings  [i] = 0;
+            Graphics [i] = 0;
         }
+
+        const FieldMinMax& rMinMax = pMinMaxData[ nCategoryIdx ][i];
+        Value[i] = Minimum[i] = rMinMax.nMin;
+        Maximum[i] = rMinMax.nMax;
     }
 }
 
commit 06b7ba3b6701110709b47248180c75a325ff9a31
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 02:51:48 2014 -0600

    coverity#1038501 : Uninitialized scalar field
    
    Change-Id: I6449fcdfd12355713f07a751f2e95883c7c76bce

diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 0ede2477..7e53ecb 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1041,6 +1041,11 @@ void SmAlignDialog::WriteTo(SmFormat &rFormat) const
 SmShowSymbolSetWindow::SmShowSymbolSetWindow(Window *pParent, WinBits nStyle)
     : Control(pParent, nStyle)
     , m_pVScrollBar(0)
+    , nLen(0)
+    , nRows(0)
+    , nColumns(0)
+    , nXOffset(0)
+    , nYOffset(0)
     , nSelectSymbol(SYMBOL_NONE)
 {
     ColorData nBgCol, nTxtCol;
commit 158788599b2ad2d59b9c4b9fffe60537f6f5aa26
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jan 27 02:47:20 2014 -0600

    coverity#1079287 : Uninitialized scalar field
    
    Change-Id: I135b60ca13c237289735599b68c57edceb01b7da

diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index fe3bd4d..5c35313 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -127,19 +127,20 @@ void SvLBoxColorString::Paint(
 //  class SvxRedlinTable
 //----------------------------------------------------------------------------
 
-SvxRedlinTable::SvxRedlinTable(SvSimpleTableContainer& rParent,WinBits nBits)
-    : SvSimpleTable(rParent,nBits),
-    aDaTiFirst( DateTime::EMPTY ),
-    aDaTiLast( DateTime::EMPTY ),
-    aDaTiFilterFirst( DateTime::EMPTY ),
-    aDaTiFilterLast( DateTime::EMPTY )
-{
-    bAuthor=sal_False;
-    bDate=sal_False;
-    bIsCalc=sal_False;
-    bComment=sal_False;
-    nDatePos=WRITER_DATE;
-    pCommentSearcher=NULL;
+SvxRedlinTable::SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits)
+    : SvSimpleTable(rParent,nBits)
+    , bIsCalc(sal_False)
+    , nDatePos(WRITER_DATE)
+    , bAuthor(sal_False)
+    , bDate(sal_False)
+    , bComment(sal_False)
+    , nDaTiMode(0)
+    , aDaTiFirst( DateTime::EMPTY )
+    , aDaTiLast( DateTime::EMPTY )
+    , aDaTiFilterFirst( DateTime::EMPTY )
+    , aDaTiFilterLast( DateTime::EMPTY )
+    , pCommentSearcher(0)
+{
     SetNodeDefaultImages();
 }
 


More information about the Libreoffice-commits mailing list