From 0fa31bed9a7a0666df26a1016d74df3ec15b40f9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 6 Dec 2013 11:57:54 +0100 Subject: Default OMultiTypeInferfaceContainerHelperVar equalImpl parameter ...and assorted OUStringHash clean up Change-Id: I779904e1275e8df88f567beb388d1d11af9e9671 --- ucb/source/cacher/contentresultsetwrapper.hxx | 18 +----------------- ucb/source/core/ucbstore.cxx | 24 ++---------------------- ucb/source/ucp/file/bc.cxx | 2 +- ucb/source/ucp/file/filglob.hxx | 18 ------------------ ucb/source/ucp/file/filnot.hxx | 3 +-- ucb/source/ucp/file/shell.hxx | 6 +----- 6 files changed, 6 insertions(+), 65 deletions(-) (limited to 'ucb') diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index 7d1b3bf65740..9874049d55e0 100644 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.hxx @@ -52,24 +52,8 @@ protected: //-------------------------------------------------------------------------- //class PropertyChangeListenerContainer_Impl. - struct equalStr_Impl - { - bool operator()( const OUString& s1, const OUString& s2 ) const - { - return !!( s1 == s2 ); - } - }; - - struct hashStr_Impl - { - size_t operator()( const OUString& rName ) const - { - return rName.hashCode(); - } - }; - typedef cppu::OMultiTypeInterfaceContainerHelperVar - < OUString , hashStr_Impl , equalStr_Impl > + < OUString, OUStringHash > PropertyChangeListenerContainer_Impl; //-------------------------------------------------------------------------- // class ReacquireableGuard diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 73b28354a93d..04a961fb4e6c 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -100,24 +100,6 @@ OUString makeHierarchalNameSegment( const OUString & rIn ) // true->async. update; false->sync. update #define CFGPROPERTY_LAZYWRITE "lazywrite" -//========================================================================= - -struct equalString_Impl -{ - bool operator()( const OUString& s1, const OUString& s2 ) const - { - return !!( s1 == s2 ); - } -}; - -struct hashString_Impl -{ - size_t operator()( const OUString & rName ) const - { - return rName.hashCode(); - } -}; - //========================================================================= // // PropertySetMap_Impl. @@ -128,8 +110,7 @@ typedef boost::unordered_map < OUString, PersistentPropertySet*, - hashString_Impl, - equalString_Impl + OUStringHash > PropertySetMap_Impl; @@ -1207,8 +1188,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess( typedef OMultiTypeInterfaceContainerHelperVar < OUString, - hashString_Impl, - equalString_Impl + OUStringHash > PropertyListeners_Impl; //========================================================================= diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 73f734dff0f2..4658864ea9cd 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -51,7 +51,7 @@ using namespace com::sun::star::ucb; // PropertyListeners -typedef cppu::OMultiTypeInterfaceContainerHelperVar< OUString,hashOUString,equalOUString > +typedef cppu::OMultiTypeInterfaceContainerHelperVar< OUString,OUStringHash > PropertyListeners_impl; class fileaccess::PropertyListeners diff --git a/ucb/source/ucp/file/filglob.hxx b/ucb/source/ucp/file/filglob.hxx index fbb6d8b266e3..ebf569adad40 100644 --- a/ucb/source/ucp/file/filglob.hxx +++ b/ucb/source/ucp/file/filglob.hxx @@ -28,24 +28,6 @@ namespace fileaccess { class BaseContent; - struct equalOUString - { - bool operator()( const OUString& rKey1, const OUString& rKey2 ) const - { - return !!( rKey1 == rKey2 ); - } - }; - - - struct hashOUString - { - size_t operator()( const OUString& rName ) const - { - return rName.hashCode(); - } - }; - - /******************************************************************************/ /* */ /* Helper functions */ diff --git a/ucb/source/ucp/file/filnot.hxx b/ucb/source/ucp/file/filnot.hxx index 8bb76d1536a9..152773892d43 100644 --- a/ucb/source/ucp/file/filnot.hxx +++ b/ucb/source/ucp/file/filnot.hxx @@ -83,8 +83,7 @@ namespace fileaccess { typedef boost::unordered_map< OUString, com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::uno::XInterface > >, - hashOUString, - equalOUString > ListenerMap; + OUStringHash > ListenerMap; class PropertyChangeNotifier { diff --git a/ucb/source/ucp/file/shell.hxx b/ucb/source/ucp/file/shell.hxx index 12a7b7edd773..7228fbba2d01 100644 --- a/ucb/source/ucp/file/shell.hxx +++ b/ucb/source/ucp/file/shell.hxx @@ -76,10 +76,6 @@ namespace fileaccess { public: // Type definitions - typedef OUString UniquePath; - typedef equalOUString eUniquePath; - typedef hashOUString hUniquePath; - class MyProperty { private: @@ -155,7 +151,7 @@ namespace fileaccess { com::sun::star::uno::Reference< com::sun::star::beans::XPropertyAccess > xA; }; - typedef boost::unordered_map< UniquePath,UnqPathData,hUniquePath,eUniquePath > ContentMap; + typedef boost::unordered_map< OUString,UnqPathData,OUStringHash > ContentMap; public: -- cgit