[Libreoffice-commits] core.git: chart2/source sc/source

Takeshi Abe tabe at fixedpoint.jp
Tue Nov 1 00:54:27 UTC 2016


 chart2/source/tools/DataSeriesHelper.cxx |   10 +---------
 sc/source/core/data/dpoutput.cxx         |    7 ++-----
 2 files changed, 3 insertions(+), 14 deletions(-)

New commits:
commit 9fa6dadc4e1e75b2fd7b7360995c524fa7a5d40e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Oct 31 17:51:34 2016 +0900

    Omit the default comparator for std::sort()
    
    Change-Id: Ib865bdf911b53d809fc2979f524da3735bb39ce5
    Reviewed-on: https://gerrit.libreoffice.org/30432
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index b3fda1c..830f229 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -723,14 +723,6 @@ bool hasUnhiddenData( const uno::Reference< chart2::XDataSeries >& xSeries )
     return false;
 }
 
-struct lcl_LessIndex
-{
-    inline bool operator() ( sal_Int32 first, sal_Int32 second ) const
-    {
-        return ( first < second );
-    }
-};
-
 sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Reference< chart2::data::XDataSequence >& xDataSequence, bool bTranslate )
 {
     if( !bTranslate )
@@ -746,7 +738,7 @@ sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Refere
             if( aHiddenIndicesSeq.getLength() )
             {
                 ::std::vector< sal_Int32 > aHiddenIndices( ContainerHelper::SequenceToVector( aHiddenIndicesSeq ) );
-                ::std::sort( aHiddenIndices.begin(), aHiddenIndices.end(), lcl_LessIndex() );
+                ::std::sort( aHiddenIndices.begin(), aHiddenIndices.end() );
 
                 sal_Int32 nHiddenCount = static_cast<sal_Int32>(aHiddenIndices.size());
                 for( sal_Int32 nN = 0; nN < nHiddenCount; ++nN)
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 390aaf6..ff6c2da 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -107,9 +107,6 @@ struct ScDPOutLevelData
 
 namespace {
 
-bool lcl_compareColfuc ( SCCOL i,  SCCOL j) { return (i<j); }
-bool lcl_compareRowfuc ( SCROW i,  SCROW j) { return (i<j); }
-
 class ScDPOutputImpl
 {
     ScDocument*         mpDoc;
@@ -154,8 +151,8 @@ void ScDPOutputImpl::OutputDataArea()
 
     bool bAllRows = ( ( mnTabEndRow - mnDataStartRow + 2 ) == (SCROW) mnRows.size() );
 
-    std::sort( mnCols.begin(), mnCols.end(), lcl_compareColfuc );
-    std::sort( mnRows.begin(), mnRows.end(), lcl_compareRowfuc );
+    std::sort( mnCols.begin(), mnCols.end() );
+    std::sort( mnRows.begin(), mnRows.end() );
 
     for( SCCOL nCol = 0; nCol < (SCCOL)mnCols.size()-1; nCol ++ )
     {


More information about the Libreoffice-commits mailing list