editeng/source/outliner/outliner.cxx |   25 ++++++++++++-------------
 include/editeng/outliner.hxx         |    1 -
 sc/source/core/tool/interpr8.cxx     |   31 ++++++++++++++++++++++---------
 sc/source/filter/dif/difexp.cxx      |   32 ++++----------------------------
 4 files changed, 38 insertions(+), 51 deletions(-)

New commits:
commit 278bc4ecfdb23b47c8890db81304526393d5106f
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sun Mar 6 18:51:40 2016 +0000

    coverity#1355250 Logically dead code
    
    Change-Id: If5a07e11cf63d0dbb83853fce48b2eb7b458663b

diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 9a8016d..1c26df1 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -49,7 +49,6 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& 
rStream, ScDocument* pDoc,
 FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* 
pDoc,
     const ScRange&rRange, const rtl_TextEncoding eCharSet )
 {
-    sal_uInt32 nDifOption = SC_DIFOPT_EXCEL;
     OSL_ENSURE( rRange.aStart <= rRange.aEnd, "*ScExportDif(): Range not 
sorted!" );
     OSL_ENSURE( rRange.aStart.Tab() == rRange.aEnd.Tab(),
         "ScExportDif(): only one table please!" );
@@ -100,10 +99,6 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& 
rOut, ScDocument* pDoc
     SCROW               nNumRows = nEndRow - rRange.aStart.Row() + 1;
     SCTAB               nTab = rRange.aStart.Tab();
 
-    double              fVal;
-
-    const bool bPlain = ( nDifOption == SC_DIFOPT_PLAIN );
-
     ScProgress          aPrgrsBar( pDoc->GetDocumentShell(), 
ScGlobal::GetRscString( STR_LOAD_DOC ), nNumRows );
 
     aPrgrsBar.SetState( 0 );
@@ -164,17 +159,8 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& 
rOut, ScDocument* pDoc
                 break;
                 case CELLTYPE_VALUE:
                     aOS.appendAscii(pNumData);
-                    if( bPlain )
-                    {
-                        aOS.append(
-                            rtl::math::doubleToUString(
-                                aCell.mfValue, rtl_math_StringFormat_G, 14, 
'.', true));
-                    }
-                    else
-                    {
-                        pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString 
);
-                        aOS.append(aString);
-                    }
+                    pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString );
+                    aOS.append(aString);
                     aOS.append("\nV\n");
                 break;
                 case CELLTYPE_EDIT:
@@ -188,18 +174,8 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& 
rOut, ScDocument* pDoc
                     else if (aCell.mpFormula->IsValue())
                     {
                         aOS.appendAscii(pNumData);
-                        if( bPlain )
-                        {
-                            fVal = aCell.mpFormula->GetValue();
-                            aOS.append(
-                                rtl::math::doubleToUString(
-                                    fVal, rtl_math_StringFormat_G, 14, '.', 
true));
-                        }
-                        else
-                        {
-                            pDoc->GetInputString( nColCnt, nRowCnt, nTab, 
aString );
-                            aOS.append(aString);
-                        }
+                        pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString 
);
+                        aOS.append(aString);
                         aOS.append("\nV\n");
                     }
                     else
commit ba9393b6446b1d779208f8581751d389641c4a18
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sun Mar 6 18:49:10 2016 +0000

    coverity#1355253 Uninitialized scalar field
    
    Change-Id: Ib89a7e44562b6bf8a8ae41e71e3d91ad5569b8d1

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 0fdb670..51e7f74 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -125,15 +125,28 @@ public:
     bool GetETSPredictionIntervals( ScMatrixRef rTMat, ScMatrixRef rPIMat, 
double fPILevel );
 };
 
-ScETSForecastCalculation::ScETSForecastCalculation( SCSIZE nSize, 
SvNumberFormatter* pFormatter ):
-    mpFormatter(pFormatter),
-    mpBase(nullptr),
-    mpTrend(nullptr),
-    mpPerIdx(nullptr),
-    mpForecast(nullptr),
-    mnCount(nSize),
-    mbInitialised(false),
-    mnMonthDay(0)
+ScETSForecastCalculation::ScETSForecastCalculation( SCSIZE nSize, 
SvNumberFormatter* pFormatter )
+    : mpFormatter(pFormatter)
+    , mpBase(nullptr)
+    , mpTrend(nullptr)
+    , mpPerIdx(nullptr)
+    , mpForecast(nullptr)
+    , mnSmplInPrd(0)
+    , mfStepSize(0.0)
+    , mfAlpha(0.0)
+    , mfBeta(0.0)
+    , mfGamma(0.0)
+    , mnCount(nSize)
+    , mbInitialised(false)
+    , mnMonthDay(0)
+    , mfMAE(0.0)
+    , mfMASE(0.0)
+    , mfMSE(0.0)
+    , mfRMSE(0.0)
+    , mfSMAPE(0.0)
+    , mnErrorValue(0)
+    , bAdditive(false)
+    , bEDS(false)
 {
     maRange.reserve( mnCount );
 }
commit 22d2b498ce0962f2083160a5739cca09206771d1
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sun Mar 6 18:43:51 2016 +0000

    bIsExpanding is unused
    
    Change-Id: I187ca7dc0e9e1a99e82145f4bcdce6abaac68278

diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 9cd2ebb..6a98d35 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -777,7 +777,6 @@ bool Outliner::Expand( Paragraph* pPara )
             pUndo->nCount = pParaList->GetAbsPos( pPara );
         }
         pHdlParagraph = pPara;
-        bIsExpanding = true;
         pParaList->Expand( pPara );
         InvalidateBullet(pParaList->GetAbsPos(pPara));
         if( bUndo )
@@ -808,7 +807,6 @@ bool Outliner::Collapse( Paragraph* pPara )
         }
 
         pHdlParagraph = pPara;
-        bIsExpanding = false;
         pParaList->Collapse( pPara );
         InvalidateBullet(pParaList->GetAbsPos(pPara));
         if( bUndo )
@@ -1263,7 +1261,6 @@ Outliner::Outliner(SfxItemPool* pPool, sal_uInt16 nMode)
     , nMaxDepth(9)
     , nMinDepth(-1)
     , nFirstPage(1)
-    , bIsExpanding(false)
     , bFirstParaIsEmpty(true)
     , nBlockInsCallback(0)
     , bStrippingPortions(false)
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 8405387..039af41 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -615,7 +615,6 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
 
     sal_uInt16          nOutlinerMode;
 
-    bool                bIsExpanding; // Only valid in Expand/Collaps-Hdl, 
reset
     bool                bFirstParaIsEmpty;
     sal_uInt8           nBlockInsCallback;
     bool                bStrippingPortions;
commit 3342a557e4009acde4416339798375d6954541f8
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sun Mar 6 18:43:01 2016 +0000

    coverity#1355252 Uninitialized pointer field
    
    Change-Id: I34c5565adcfd3fd39f9b03967e5c4272767a58ea

diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index e858c08..9cd2ebb 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1255,23 +1255,25 @@ bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* 
pCurView )
     return RemovingPagesHdl( pCurView );
 }
 
-Outliner::Outliner( SfxItemPool* pPool, sal_uInt16 nMode )
-: nMinDepth( -1 )
+Outliner::Outliner(SfxItemPool* pPool, sal_uInt16 nMode)
+    : pHdlParagraph(nullptr)
+    , mnFirstSelPage(0)
+    , nDepthChangedHdlPrevDepth(0)
+    , mnDepthChangeHdlPrevFlags(ParaFlag::NONE)
+    , nMaxDepth(9)
+    , nMinDepth(-1)
+    , nFirstPage(1)
+    , bIsExpanding(false)
+    , bFirstParaIsEmpty(true)
+    , nBlockInsCallback(0)
+    , bStrippingPortions(false)
+    , bPasting(false)
 {
 
-    bStrippingPortions  = false;
-    bPasting            = false;
-
-    nFirstPage          = 1;
-    nBlockInsCallback   = 0;
-
-    nMaxDepth           = 9;
-
     pParaList = new ParagraphList;
     pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, 
ParaVisibleStateChangedHdl ) );
     Paragraph* pPara = new Paragraph( 0 );
     pParaList->Append(pPara);
-    bFirstParaIsEmpty = true;
 
     pEditEngine = new OutlinerEditEng( this, pPool );
     pEditEngine->SetBeginMovingParagraphsHdl( LINK( this, Outliner, 
BeginMovingParagraphsHdl ) );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to