[Libreoffice-commits] core.git: 3 commits - sc/qa sdext/source sd/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 27 07:57:20 UTC 2019


 sc/qa/unit/ucalc_column.cxx                            |    9 ++--
 sc/qa/unit/ucalc_sort.cxx                              |   31 ++++++-----------
 sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx |    1 
 sdext/source/presenter/PresenterProtocolHandler.cxx    |    2 -
 4 files changed, 16 insertions(+), 27 deletions(-)

New commits:
commit 8cb7deff9bf49d17b7519d9d49aea5943d14baa3
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Nov 26 19:59:05 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 27 08:55:49 2019 +0100

    Remove unused Dispatch::Action
    
    (found by upcoming loplugin:unusedmember)
    
    Change-Id: I2e4b78b209b4d1a11f50519b06a1a9b0a154ccf0
    Reviewed-on: https://gerrit.libreoffice.org/83820
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index 32739fdd2b1d..fc07441e673f 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -168,8 +168,6 @@ class PresenterProtocolHandler::Dispatch
       public PresenterDispatchInterfaceBase
 {
 public:
-    typedef void (PresenterProtocolHandler::Dispatch::* Action)();
-
     /** Create a new Dispatch object.  When the given command name
         (rsURLPath) is not known then an empty reference is returned.
     */
commit 02cbe59776e75f045fe5b62f4435ee7b7343b900
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Nov 26 19:56:09 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 27 08:55:28 2019 +0100

    Remove unused RecentlyUsedPageCaches::value_type
    
    (found by upcoming loplugin:unusedmember)
    
    Change-Id: Ib0d6afbafcc210fbf839b64c370743071c51f5b4
    Reviewed-on: https://gerrit.libreoffice.org/83819
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 8288b7851e61..cfe121c64b9f 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -136,7 +136,6 @@ class PageCacheManager::RecentlyUsedPageCaches
 public:
     typedef DocumentKey                                 key_type;
     typedef RecentlyUsedQueue                           mapped_type;
-    typedef std::pair<const key_type,mapped_type>       value_type;
     typedef std::map<key_type,mapped_type>::iterator    iterator;
 private:
     std::map<key_type,mapped_type> maMap;
commit 478a2406d15250dba529dbe17bbbf76e9f2192ec
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Nov 26 19:53:36 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 27 08:54:58 2019 +0100

    Remove unused sc/qa/unit/ucalc_*.cxx data
    
    (found by upcoming loplugin:unusedmember)
    
    Change-Id: I2ed1fd158779716297a93fade34b1cf541c44aba
    Reviewed-on: https://gerrit.libreoffice.org/83818
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sc/qa/unit/ucalc_column.cxx b/sc/qa/unit/ucalc_column.cxx
index 35ffc0151a77..a60ac250b58b 100644
--- a/sc/qa/unit/ucalc_column.cxx
+++ b/sc/qa/unit/ucalc_column.cxx
@@ -101,7 +101,6 @@ void Test::testSetFormula()
 
     static struct aInputs
     {
-        const char* aName;
         SCROW const nRow;
         SCCOL const nCol;
         const char* aFormula1;      // Represents the formula that is input to SetFormula function.
@@ -109,10 +108,10 @@ void Test::testSetFormula()
         formula::FormulaGrammar::Grammar const eGram;
 
     } const aTest[] = {
-        { "Rock and Roll" ,5 , 4 , "=SUM($D$2:$F$3)"             ,"=SUM($D$2:$F$3)" , formula::FormulaGrammar::Grammar::GRAM_ENGLISH     },
-        { "Blues"         ,5 , 5 , "=A1-$C2+B$3-$F$4"            ,"=A1-$C2+B$3-$F$4", formula::FormulaGrammar::Grammar::GRAM_NATIVE      },
-        { "Acoustic"      ,6 , 6 , "=A1-$C2+B$3-$F$4"            ,"=A1-$C2+B$3-$F$4", formula::FormulaGrammar::Grammar::GRAM_NATIVE_XL_A1},
-        { "Nursery Rhymes",7 , 8 , "=[.A1]-[.$C2]+[.G$3]-[.$F$4]","=A1-$C2+G$3-$F$4", formula::FormulaGrammar::Grammar::GRAM_ODFF        }
+        { 5 , 4 , "=SUM($D$2:$F$3)"             ,"=SUM($D$2:$F$3)" , formula::FormulaGrammar::Grammar::GRAM_ENGLISH     },
+        { 5 , 5 , "=A1-$C2+B$3-$F$4"            ,"=A1-$C2+B$3-$F$4", formula::FormulaGrammar::Grammar::GRAM_NATIVE      },
+        { 6 , 6 , "=A1-$C2+B$3-$F$4"            ,"=A1-$C2+B$3-$F$4", formula::FormulaGrammar::Grammar::GRAM_NATIVE_XL_A1},
+        { 7 , 8 , "=[.A1]-[.$C2]+[.G$3]-[.$F$4]","=A1-$C2+G$3-$F$4", formula::FormulaGrammar::Grammar::GRAM_ODFF        }
     };
 
     for(size_t i = 0; i < SAL_N_ELEMENTS(aTest); ++i)
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index c01cf53f231a..db1dbba29391 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -507,31 +507,24 @@ void Test::testSortInFormulaGroup()
 
     m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr);
 
-    static const struct {
-        SCCOL nCol;
-        SCROW nRow;
-        double fValue;
-    } aResults[] = {
-        { 0, 0, 1.0 },   { 1, 0, 1.0 },
-        { 0, 1, 2.0 },   { 1, 1, 3.0 },
-        { 0, 2, 3.0 },   { 1, 2, 3.0 },
-        { 0, 3, 10.0 },  { 1, 3, 11.0 },
-        { 0, 4, 20.0 },  { 1, 4, 20.0 },
-        { 0, 5, 100.0 }, { 1, 5, 100.0 },
-        { 0, 6, 101.0 }, { 1, 6, 101.0 },
-        { 0, 7, 102.0 }, { 1, 7, 102.0 },
-        { 0, 8, 103.0 }, { 1, 8, 103.0 },
-        { 0, 9, 104.0 }, { 1, 9, 104.0 },
+    static const double aResults[] = {
+        1.0,   1.0,
+        2.0,   3.0,
+        3.0,   3.0,
+        10.0,  11.0,
+        20.0,  20.0,
+        100.0, 100.0,
+        101.0, 101.0,
+        102.0, 102.0,
+        103.0, 103.0,
+        104.0, 104.0
     };
 
     for ( SCROW i = 0; i < SCROW(SAL_N_ELEMENTS( aEntries )); ++i )
     {
         double val = m_pDoc->GetValue( aEntries[i].nCol, aEntries[i].nRow, 0 );
-//        fprintf(stderr, "value at %d %d is %g = %g\n",
-//                (int)aResults[i].nRow, (int)aResults[i].nCol,
-//                val, aResults[i].fValue);
         CPPUNIT_ASSERT_MESSAGE("Mis-matching value after sort.",
-                               rtl::math::approxEqual(val, aResults[i].fValue));
+                               rtl::math::approxEqual(val, aResults[i]));
     }
 
     m_pDoc->DeleteTab( 0 );


More information about the Libreoffice-commits mailing list