[Libreoffice-commits] core.git: chart2/source compilerplugins/clang connectivity/source sc/qa sc/source slideshow/source vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Nov 9 12:58:27 UTC 2017


 chart2/source/model/main/Diagram.cxx            |   20 ++++++--------------
 compilerplugins/clang/check.cxx                 |    8 ++++++++
 connectivity/source/drivers/hsqldb/HCatalog.cxx |    1 -
 connectivity/source/drivers/mysql/YCatalog.cxx  |    1 -
 sc/qa/unit/ucalc_condformat.cxx                 |    4 ----
 sc/source/ui/unoobj/chart2uno.cxx               |    1 -
 slideshow/source/engine/slide/layermanager.cxx  |    1 -
 vcl/source/control/tabctrl.cxx                  |    3 ---
 8 files changed, 14 insertions(+), 25 deletions(-)

New commits:
commit a93b691b78c95676d0dcf2724563aa1a8a5a2e8e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Nov 9 12:59:44 2017 +0200

    loplugin:unusedvariable add some more std:: types
    
    Change-Id: Ib15931e415990b56367fe3e1c7cf3f22cc4826d5
    Reviewed-on: https://gerrit.libreoffice.org/44529
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 9895a7f470b4..136db02b14e2 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -254,33 +254,26 @@ struct StaticDiagramInfo : public rtl::StaticAggregate< uno::Reference< beans::X
 
 /// clones a UNO-sequence of UNO-References
 typedef Reference< chart2::XCoordinateSystem > lcl_tCooSysRef;
-typedef std::map< lcl_tCooSysRef, lcl_tCooSysRef >  lcl_tCooSysMapping;
-typedef std::vector< lcl_tCooSysRef >               lcl_tCooSysVector;
+typedef std::vector< lcl_tCooSysRef >          lcl_tCooSysVector;
 
-lcl_tCooSysMapping lcl_CloneCoordinateSystems(
+void lcl_CloneCoordinateSystems(
         const lcl_tCooSysVector & rSource,
         lcl_tCooSysVector & rDestination )
 {
-    lcl_tCooSysMapping aResult;
-
-    for( lcl_tCooSysVector::const_iterator aIt( rSource.begin());
-         aIt != rSource.end(); ++aIt )
+    for( auto const & i : rSource )
     {
         lcl_tCooSysRef xClone;
-        css::uno::Reference< css::util::XCloneable > xCloneable( *aIt, css::uno::UNO_QUERY );
+        css::uno::Reference< css::util::XCloneable > xCloneable( i, css::uno::UNO_QUERY );
         if( xCloneable.is())
             xClone.set( xCloneable->createClone(), css::uno::UNO_QUERY );
 
         if( xClone.is())
         {
             rDestination.push_back( xClone );
-            aResult.emplace( *aIt, xClone );
         }
         else
-            rDestination.push_back( *aIt );
+            rDestination.push_back( i );
     }
-
-    return aResult;
 }
 
 } // anonymous namespace
@@ -309,8 +302,7 @@ Diagram::Diagram( const Diagram & rOther ) :
     m_xContext( rOther.m_xContext ),
     m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
 {
-    lcl_tCooSysMapping aCooSysMapping =
-        lcl_CloneCoordinateSystems( rOther.m_aCoordSystems, m_aCoordSystems );
+    lcl_CloneCoordinateSystems( rOther.m_aCoordSystems, m_aCoordSystems );
     ModifyListenerHelper::addListenerToAllElements( m_aCoordSystems, m_xModifyEventForwarder );
 
     m_xWall.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xWall ));
diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx
index 6f9ee1779bf6..9ded6d296e5f 100644
--- a/compilerplugins/clang/check.cxx
+++ b/compilerplugins/clang/check.cxx
@@ -217,7 +217,15 @@ bool isExtraWarnUnusedType(clang::QualType type) {
     auto const tc = TypeCheck(rec);
     // Check some common non-LO types:
     if (tc.Class("basic_string").StdNamespace()
+        || tc.Class("deque").StdNamespace()
         || tc.Class("list").StdNamespace()
+        || tc.Class("map").StdNamespace()
+        || tc.Class("pair").StdNamespace()
+        || tc.Class("queue").StdNamespace()
+        || tc.Class("set").StdNamespace()
+        || tc.Class("stack").StdNamespace()
+        || tc.Class("unordered_map").StdNamespace()
+        || tc.Class("unordered_set").StdNamespace()
         || tc.Class("vector").StdNamespace())
     {
         return true;
diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx
index 303abfcb6b05..2bc4c8210c9f 100644
--- a/connectivity/source/drivers/hsqldb/HCatalog.cxx
+++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx
@@ -109,7 +109,6 @@ void OHCatalog::refreshUsers()
     if ( xResult.is() )
     {
         Reference< XRow > xRow(xResult,UNO_QUERY);
-        TString2IntMap aMap;
         while( xResult->next() )
             aVector.push_back(xRow->getString(1));
         ::comphelper::disposeComponent(xResult);
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx
index 13c53f62c154..ed7f95ea0a77 100644
--- a/connectivity/source/drivers/mysql/YCatalog.cxx
+++ b/connectivity/source/drivers/mysql/YCatalog.cxx
@@ -96,7 +96,6 @@ void OMySQLCatalog::refreshUsers()
     if ( xResult.is() )
     {
         Reference< XRow > xRow(xResult,UNO_QUERY);
-        TString2IntMap aMap;
         while( xResult->next() )
             aVector.push_back(xRow->getString(1));
         ::comphelper::disposeComponent(xResult);
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index 7a1777a3d5b2..1e3d94473522 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -396,8 +396,6 @@ void Test::testCondCopyPasteSingleRowToRange()
     ScRange aTargetRange(0,4,0,MAXCOL,4,0);
     pasteOneCellFromClip(m_pDoc, aTargetRange, &aClipDoc);
 
-    std::set<sal_uLong> aCondFormatIndices;
-
     ScConditionalFormat* pNewFormat = m_pDoc->GetCondFormat(0, 4, 0);
     CPPUNIT_ASSERT(pNewFormat);
     CPPUNIT_ASSERT(pNewFormat->GetKey() != pFormat->GetKey());
@@ -429,8 +427,6 @@ void Test::testCondCopyPasteSingleRowToRange2()
     ScRange aTargetRange(0,4,0,MAXCOL,4,0);
     pasteOneCellFromClip(m_pDoc, aTargetRange, &aClipDoc);
 
-    std::set<sal_uLong> aCondFormatIndices;
-
     for (SCCOL nCol = 0; nCol <= MAXCOL; ++nCol)
     {
         ScConditionalFormat* pNewFormat = m_pDoc->GetCondFormat(nCol, 4, 0);
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 666634272e90..454a2f3de9e1 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1566,7 +1566,6 @@ ScChart2DataProvider::createDataSource(
         aSeqVector.push_back(aSeq);
     }
 
-    ::std::map< sal_Int32, uno::Reference< chart2::data::XLabeledDataSequence > > aSequenceMap;
     for( sal_Int32 nNewIndex = 0; nNewIndex < aSequenceMapping.getLength(); nNewIndex++ )
     {
         // note: assuming that the values in the sequence mapping are always non-negative
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index 579797b23fcd..09c80f2208c1 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -722,7 +722,6 @@ namespace slideshow
             LayerShapeMap::iterator       aCurrShapeEntry( maAllShapes.begin() );
             LayerShapeMap::iterator       aCurrLayerFirstShapeEntry( maAllShapes.begin() );
             const LayerShapeMap::iterator aEndShapeEntry ( maAllShapes.end() );
-            ShapeUpdateSet                aUpdatedShapes; // shapes that need update
             while( aCurrShapeEntry != aEndShapeEntry )
             {
                 const ShapeSharedPtr pCurrShape( aCurrShapeEntry->first );
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 356a3a215c7e..fd8c2a1bb480 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2382,9 +2382,6 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
             aWidths.push_back(0);
     }
 
-    //aBreakIndexes will contain the indexes of the last tab on each row
-    std::deque<size_t> aBreakIndexes(MinimumRaggednessWrap::GetEndOfLineIndexes(aWidths, nMaxWidth - nOffsetX - 2));
-
     if ( (mnMaxPageWidth > 0) && (mnMaxPageWidth < nMaxWidth) )
         nMaxWidth = mnMaxPageWidth;
     nMaxWidth -= GetItemsOffset().X();


More information about the Libreoffice-commits mailing list