[Libreoffice-commits] core.git: 4 commits - i18npool/qa sc/source svx/source sw/inc sw/source

Caolán McNamara caolanm at redhat.com
Sat Oct 1 09:31:14 UTC 2016


 i18npool/qa/cppunit/test_breakiterator.cxx                   |    6 +++--
 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx |    9 ++------
 sc/source/ui/view/gridwin.cxx                                |    4 ---
 svx/source/dialog/graphctl.cxx                               |    1 
 sw/inc/pam.hxx                                               |    3 --
 sw/source/core/crsr/pam.cxx                                  |   12 -----------
 6 files changed, 9 insertions(+), 26 deletions(-)

New commits:
commit 7ae4ac0d083b54da466ccd2f31860667e7751188
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 1 10:04:17 2016 +0100

    default copy ctor/assignment are sufficient
    
    Change-Id: I9076b5705ae213c4170cb313cd5b40b3214e2256

diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 2dc78ee..771e753 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -58,9 +58,6 @@ struct SW_DLLPUBLIC SwPosition
     explicit SwPosition( const SwNode& rNode );
     explicit SwPosition( SwContentNode& rNode, const sal_Int32 nOffset = 0 );
 
-    SwPosition( const SwPosition & );
-    SwPosition &operator=(const SwPosition &);
-
     /**
        Returns the document this position is in.
 
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index c83361b..8c423847 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -69,18 +69,6 @@ SwPosition::SwPosition( SwContentNode & rNode, const sal_Int32 nOffset )
 {
 }
 
-SwPosition::SwPosition( const SwPosition & rPos )
-    : nNode( rPos.nNode ), nContent( rPos.nContent )
-{
-}
-
-SwPosition &SwPosition::operator=(const SwPosition &rPos)
-{
-    nNode = rPos.nNode;
-    nContent = rPos.nContent;
-    return *this;
-}
-
 bool SwPosition::operator<(const SwPosition &rPos) const
 {
     if( nNode < rPos.nNode )
commit 450c15a1181ef9aee0bdaa01bae06dd91c86acba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 1 09:59:28 2016 +0100

    avoid coverity#1371264 Missing move assignment operator
    
    Change-Id: I5085b0a04cf24b8d4678165371e44dc3556300e3

diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index 6bef1fd..3d4945d 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -74,12 +74,9 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
 
     SCTAB inTab = mInputRange.aStart.Tab();
 
-    ScRangeList aRangeList;
-
-    if (mGroupedBy == BY_COLUMN)
-        aRangeList = MakeColumnRangeList(inTab, mInputRange.aStart, mInputRange.aEnd);
-    else
-        aRangeList = MakeRowRangeList(inTab, mInputRange.aStart, mInputRange.aEnd);
+    ScRangeList aRangeList = (mGroupedBy == BY_COLUMN) ?
+        MakeColumnRangeList(inTab, mInputRange.aStart, mInputRange.aEnd) :
+        MakeRowRangeList(inTab, mInputRange.aStart, mInputRange.aEnd);
 
     // labels
     output.writeString(getLabel());
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 34a4914..f58f500 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5515,9 +5515,7 @@ bool ScGridWindow::ContinueOnlineSpelling()
     ScHorizontalCellIterator aIter(
         pDoc, nTab, maVisibleRange.mnCol1, mpSpellCheckCxt->maPos.mnRow, maVisibleRange.mnCol2, maVisibleRange.mnRow2);
 
-    ScRangeList aPivotRanges;
-    if (pDPs)
-        aPivotRanges = pDPs->GetAllTableRanges(nTab);
+    ScRangeList aPivotRanges = pDPs ? pDPs->GetAllTableRanges(nTab) : ScRangeList();
 
     SCCOL nCol;
     SCROW nRow;
commit fa3d4fea73c7c9d5f8790e8b4708776ef3eaab21
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 1 09:55:16 2016 +0100

    coverity#1373442 Uninitialized scalar field
    
    Change-Id: If827f7ed98be2cf123910ae8944a5f1da9cb7016

diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index d2f0651..9d7adf3 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -65,6 +65,7 @@ GraphCtrl::GraphCtrl( vcl::Window* pParent, WinBits nStyle ) :
             bEditMode       ( false ),
             bSdrMode        ( false ),
             bAnim           ( false ),
+            mbInIdleUpdate  ( false ),
             pModel          ( nullptr ),
             pView           ( nullptr )
 {
commit 05528a63000ff9d41038db55a0e43a5d0588ac44
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 1 09:53:55 2016 +0100

    silence coverity#1373441 Side effect in assertion
    
    Change-Id: I1cf7b7d20a0b567c7363c5a9abc5bf1195b57262

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index dd3e850..1bd2b3d 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -339,7 +339,8 @@ void TestBreakIterator::testWordBoundaries()
             {
                 CPPUNIT_ASSERT(i < SAL_N_ELEMENTS(aDoublePositions));
                 nPos = m_xBreak->nextWord(aTest, nPos, aLocale, i18n::WordType::ANYWORD_IGNOREWHITESPACES).startPos;
-                CPPUNIT_ASSERT_EQUAL(aDoublePositions[i++], nPos);
+                CPPUNIT_ASSERT_EQUAL(aDoublePositions[i], nPos);
+                ++i;
             }
             while (nPos < aTest.getLength());
             nPos = aTest.getLength();
@@ -347,7 +348,8 @@ void TestBreakIterator::testWordBoundaries()
             do
             {
                 nPos = m_xBreak->previousWord(aTest, nPos, aLocale, i18n::WordType::ANYWORD_IGNOREWHITESPACES).startPos;
-                CPPUNIT_ASSERT_EQUAL(aDoublePositions[--i], nPos);
+                --i;
+                CPPUNIT_ASSERT_EQUAL(aDoublePositions[i], nPos);
             }
             while (nPos > 0);
         }


More information about the Libreoffice-commits mailing list