[Libreoffice-commits] core.git: editeng/source include/svx sdext/source svx/source sw/inc sw/source ucb/source vcl/win xmloff/source

Takeshi Abe tabe at fixedpoint.jp
Mon Oct 31 03:49:13 UTC 2016


 editeng/source/misc/splwrap.cxx                   |   10 +---------
 include/svx/xmleohlp.hxx                          |    4 +---
 sdext/source/minimizer/configurationaccess.cxx    |    2 +-
 sdext/source/minimizer/configurationaccess.hxx    |    9 +--------
 sdext/source/minimizer/optimizationstats.cxx      |    4 ++--
 sdext/source/minimizer/optimizationstats.hxx      |    9 +--------
 svx/source/inc/GraphCtlAccessibleContext.hxx      |    9 +--------
 svx/source/xml/xmleohlp.cxx                       |    8 --------
 sw/inc/unochart.hxx                               |    9 +--------
 sw/source/core/doc/dbgoutsw.cxx                   |   12 ++----------
 sw/source/uibase/docvw/frmsidebarwincontainer.cxx |   22 ++--------------------
 ucb/source/ucp/tdoc/tdoc_docmgr.hxx               |   11 +----------
 ucb/source/ucp/webdav-neon/NeonLockStore.hxx      |   10 +---------
 vcl/win/gdi/salbmp.cxx                            |   10 +---------
 xmloff/source/draw/shapeimport.cxx                |   10 +---------
 xmloff/source/style/xmlnumfe.cxx                  |   10 +---------
 16 files changed, 18 insertions(+), 131 deletions(-)

New commits:
commit b589c4cd8765b0611afe435354364df891d78852
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Oct 29 12:43:54 2016 +0900

    Omit comparator which is the same as default std::less<key_type>
    
    Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da
    Reviewed-on: https://gerrit.libreoffice.org/30369
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index ba8dbf1..2ddb128 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -79,15 +79,7 @@ void SvxPrepareAutoCorrect( OUString &rOldText, const OUString &rNewText )
 #define SVX_LANG_MISSING            2
 #define SVX_LANG_MISSING_DO_WARN    3
 
-struct lt_LanguageType
-{
-    bool operator()( LanguageType n1, LanguageType n2 ) const
-    {
-        return n1 < n2;
-    }
-};
-
-typedef std::map< LanguageType, sal_uInt16, lt_LanguageType >   LangCheckState_map_t;
+typedef std::map< LanguageType, sal_uInt16 >   LangCheckState_map_t;
 
 static LangCheckState_map_t & GetLangCheckState()
 {
diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx
index 24f9d30..1f5d47e 100644
--- a/include/svx/xmleohlp.hxx
+++ b/include/svx/xmleohlp.hxx
@@ -37,15 +37,13 @@ enum class SvXMLEmbeddedObjectHelperMode
 namespace comphelper { class IEmbeddedHelper; }
 
 class SvGlobalName;
-struct OUStringLess;
 class OutputStorageWrapper_Impl;
 
 
 class SVX_DLLPUBLIC SvXMLEmbeddedObjectHelper :
     public ::cppu::WeakComponentImplHelper2< css::document::XEmbeddedObjectResolver, css::container::XNameAccess >
 {
-    typedef ::std::map< OUString, OutputStorageWrapper_Impl*,
-                         OUStringLess > SvXMLEmbeddedObjectHelper_Impl;
+    typedef ::std::map< OUString, OutputStorageWrapper_Impl* > SvXMLEmbeddedObjectHelper_Impl;
 private:
 
     ::osl::Mutex                maMutex;
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 49f3480..f87acfa 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -162,7 +162,7 @@ ConfigurationAccess::~ConfigurationAccess()
 
 OUString ConfigurationAccess::getString( const PPPOptimizerTokenEnum eToken ) const
 {
-    std::map< PPPOptimizerTokenEnum, OUString, Compare >::const_iterator aIter( maStrings.find( eToken ) );
+    std::map< PPPOptimizerTokenEnum, OUString >::const_iterator aIter( maStrings.find( eToken ) );
     return aIter != maStrings.end() ? ((*aIter).second) : OUString();
 }
 
diff --git a/sdext/source/minimizer/configurationaccess.hxx b/sdext/source/minimizer/configurationaccess.hxx
index 8cae507..72bc103 100644
--- a/sdext/source/minimizer/configurationaccess.hxx
+++ b/sdext/source/minimizer/configurationaccess.hxx
@@ -102,14 +102,7 @@ class ConfigurationAccess
 
     private:
 
-        struct Compare
-        {
-            bool operator()( const PPPOptimizerTokenEnum s1, const PPPOptimizerTokenEnum s2 ) const
-            {
-                return s1 < s2;
-            }
-        };
-        std::map < PPPOptimizerTokenEnum, OUString, Compare > maStrings;
+        std::map < PPPOptimizerTokenEnum, OUString > maStrings;
 
         std::vector< OptimizerSettings > maSettings;
         std::vector< OptimizerSettings > maInitialSettings;
diff --git a/sdext/source/minimizer/optimizationstats.cxx b/sdext/source/minimizer/optimizationstats.cxx
index 04567a1..b3f25bd 100644
--- a/sdext/source/minimizer/optimizationstats.cxx
+++ b/sdext/source/minimizer/optimizationstats.cxx
@@ -45,7 +45,7 @@ void OptimizationStats::SetStatusValue( const PPPOptimizerTokenEnum eStat, const
 
 const uno::Any* OptimizationStats::GetStatusValue( const PPPOptimizerTokenEnum eStat ) const
 {
-    std::map< PPPOptimizerTokenEnum, uno::Any, Compare >::const_iterator aIter( maStats.find( eStat ) );
+    std::map< PPPOptimizerTokenEnum, uno::Any >::const_iterator aIter( maStats.find( eStat ) );
     return aIter != maStats.end() ? &((*aIter).second) : nullptr;
 }
 
@@ -54,7 +54,7 @@ css::beans::PropertyValues OptimizationStats::GetStatusSequence()
 {
     int i = 0;
     uno::Sequence< PropertyValue > aStatsSequence( maStats.size() );
-    std::map< PPPOptimizerTokenEnum, uno::Any, Compare >::iterator aIter( maStats.begin() );
+    std::map< PPPOptimizerTokenEnum, uno::Any >::iterator aIter( maStats.begin() );
     while( aIter != maStats.end() )
     {
         aStatsSequence[ i ].Name = TKGet( (*aIter).first );
diff --git a/sdext/source/minimizer/optimizationstats.hxx b/sdext/source/minimizer/optimizationstats.hxx
index 29a15aa..29824da 100644
--- a/sdext/source/minimizer/optimizationstats.hxx
+++ b/sdext/source/minimizer/optimizationstats.hxx
@@ -28,14 +28,7 @@
 
 class OptimizationStats
 {
-    struct Compare
-    {
-        bool operator()( const PPPOptimizerTokenEnum s1, const PPPOptimizerTokenEnum s2 ) const
-        {
-            return s1 < s2;
-        }
-    };
-    std::map < PPPOptimizerTokenEnum, css::uno::Any, Compare > maStats;
+    std::map < PPPOptimizerTokenEnum, css::uno::Any > maStats;
 
     public:
 
diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx
index 4e271d9..c0f3454 100644
--- a/svx/source/inc/GraphCtlAccessibleContext.hxx
+++ b/svx/source/inc/GraphCtlAccessibleContext.hxx
@@ -208,14 +208,7 @@ private:
     OUString msName;
 
     /// map of accessible shapes
-    struct SdrObjectCompareLess
-    {
-        bool operator()(const SdrObject* p1, const SdrObject* p2) const
-        {
-            return p1 < p2;
-        }
-    };
-    typedef ::std::map< const SdrObject*, rtl::Reference<accessibility::AccessibleShape>, SdrObjectCompareLess > ShapesMapType;
+    typedef ::std::map< const SdrObject*, rtl::Reference<accessibility::AccessibleShape> > ShapesMapType;
     ShapesMapType mxShapes;
 
     VclPtr<GraphCtrl>  mpControl;
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index a993cb7..eaba0c9 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -126,14 +126,6 @@ void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
     bStreamClosed = true;
 }
 
-struct OUStringLess
-{
-    bool operator() ( const OUString& r1, const OUString& r2 ) const
-    {
-        return r1 < r2;
-    }
-};
-
 SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
     WeakComponentImplHelper2< XEmbeddedObjectResolver, XNameAccess >( maMutex ),
     maReplacementGraphicsContainerStorageName( XML_CONTAINERSTORAGE_NAME ),
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 2d41970..8c67a48 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -120,14 +120,7 @@ class SwChartDataProvider :
     typedef std::set< css::uno::WeakReference < css::chart2::data::XDataSequence >, lt_DataSequenceRef > Set_DataSequenceRef_t;
 
     // map of data-sequence sets for each table
-    struct lt_SwTable_Ptr
-    {
-        bool operator()( const SwTable *p1, const SwTable *p2 ) const
-        {
-            return p1 < p2;
-        }
-    };
-    typedef std::map< const SwTable *, Set_DataSequenceRef_t, lt_SwTable_Ptr > Map_Set_DataSequenceRef_t;
+    typedef std::map< const SwTable *, Set_DataSequenceRef_t > Map_Set_DataSequenceRef_t;
 
     // map of all data-sequences provided directly or indirectly (e.g. via
     // data-source) by this object. Since there is only one object of this type
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 2377038..f86ee1c 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -93,17 +93,9 @@ const char * dbg_out(const OUString & aStr)
     return aDbgOutResult.getStr();
 }
 
-struct CompareUShort
+map<sal_uInt16,OUString> & GetItemWhichMap()
 {
-    bool operator()(sal_uInt16 a, sal_uInt16 b) const
-    {
-        return a < b;
-    }
-};
-
-map<sal_uInt16,OUString,CompareUShort> & GetItemWhichMap()
-{
-    static map<sal_uInt16,OUString,CompareUShort> aItemWhichMap;
+    static map<sal_uInt16,OUString> aItemWhichMap;
     static bool bInitialized = false;
 
     if (! bInitialized)
diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
index 228dbf1..722ca60 100644
--- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
@@ -39,16 +39,7 @@ namespace {
         }
     };
 
-    struct SidebarWinOrder
-    {
-        bool operator()( const SidebarWinKey& rSidebarWinKeyA,
-                             const SidebarWinKey& rSidebarWinKeyB ) const
-        {
-            return rSidebarWinKeyA < rSidebarWinKeyB;
-        }
-    };
-
-    typedef std::map < SidebarWinKey, VclPtr<sw::sidebarwindows::SwSidebarWin>, SidebarWinOrder > SidebarWinContainer;
+    typedef std::map < SidebarWinKey, VclPtr<sw::sidebarwindows::SwSidebarWin> > SidebarWinContainer;
 
     struct FrameKey
     {
@@ -64,16 +55,7 @@ namespace {
         }
     };
 
-    struct FrameOrder
-    {
-        bool operator()( const FrameKey& rFrameKeyA,
-                             const FrameKey& rFrameKeyB ) const
-        {
-            return rFrameKeyA < rFrameKeyB;
-        }
-    };
-
-    typedef std::map < FrameKey, SidebarWinContainer, FrameOrder > FrameSidebarWinContainer_;
+    typedef std::map < FrameKey, SidebarWinContainer > FrameSidebarWinContainer_;
 }
 
 namespace sw { namespace sidebarwindows {
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
index 1cace69..7dd5a07 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
@@ -54,16 +54,7 @@ namespace tdoc_ucp {
     };
 
 
-    struct ltref
-    {
-        bool operator()(
-            const OUString & r1, const OUString & r2 ) const
-        {
-            return r1 < r2;
-        }
-    };
-
-    typedef std::map< OUString, StorageInfo, ltref > DocumentList;
+    typedef std::map< OUString, StorageInfo > DocumentList;
 
 
     class OfficeDocumentsManager :
diff --git a/ucb/source/ucp/webdav-neon/NeonLockStore.hxx b/ucb/source/ucp/webdav-neon/NeonLockStore.hxx
index 8a52f18..b0f968a 100644
--- a/ucb/source/ucp/webdav-neon/NeonLockStore.hxx
+++ b/ucb/source/ucp/webdav-neon/NeonLockStore.hxx
@@ -43,14 +43,6 @@ namespace webdav_ucp
 class TickerThread;
 class NeonSession;
 
-struct ltptr
-{
-    bool operator()( const NeonLock * p1, const NeonLock * p2 ) const
-    {
-        return p1 < p2;
-    }
-};
-
 struct LockInfo
 {
     rtl::Reference< NeonSession > xSession;
@@ -66,7 +58,7 @@ struct LockInfo
 
 };
 
-typedef std::map< NeonLock *, LockInfo, ltptr > LockInfoMap;
+typedef std::map< NeonLock *, LockInfo > LockInfoMap;
 
 class NeonLockStore
 {
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 73d3d78..4470576 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -62,15 +62,7 @@ inline void ImplSetPixel4( sal_uInt8* pScanline, long nX, const BYTE cIndex )
 // Helper class to manage Gdiplus::Bitmap instances inside of
 // WinSalBitmap
 
-struct Comparator
-{
-    bool operator()(WinSalBitmap* pA, WinSalBitmap* pB) const
-    {
-        return pA < pB;
-    }
-};
-
-typedef ::std::map< WinSalBitmap*, sal_uInt32, Comparator > EntryMap;
+typedef ::std::map< WinSalBitmap*, sal_uInt32 > EntryMap;
 static const sal_uInt32 nDefaultCycles(60);
 
 class GdiPlusBuffer : protected cppu::BaseMutex, public Timer
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index f36da5f..121ab34 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -49,14 +49,6 @@ using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 
-struct ltint32
-{
-  bool operator()(const sal_Int32 p, sal_Int32 q) const
-  {
-    return p < q;
-  }
-};
-
 struct ConnectionHint
 {
     css::uno::Reference< css::drawing::XShape > mxConnector;
@@ -76,7 +68,7 @@ struct XShapeCompareHelper
 
 /** this map store all glue point id mappings for shapes that had user defined glue points. This
     is needed because on insertion the glue points will get a new and unique id */
-typedef std::map<sal_Int32,sal_Int32,ltint32> GluePointIdMap;
+typedef std::map<sal_Int32,sal_Int32> GluePointIdMap;
 typedef std::map< css::uno::Reference < css::drawing::XShape >, GluePointIdMap, XShapeCompareHelper > ShapeGluePointsMap;
 
 /** this struct is created for each startPage() call and stores information that is needed during
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 98b5c46..11c05c6 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -52,15 +52,7 @@ using namespace ::com::sun::star;
 using namespace ::xmloff::token;
 using namespace ::svt;
 
-struct LessuInt32
-{
-    bool operator() (const sal_uInt32 rValue1, const sal_uInt32 rValue2) const
-    {
-        return rValue1 < rValue2;
-    }
-};
-
-typedef std::set< sal_uInt32, LessuInt32 >  SvXMLuInt32Set;
+typedef std::set< sal_uInt32 >  SvXMLuInt32Set;
 
 struct SvXMLEmbeddedTextEntry
 {


More information about the Libreoffice-commits mailing list