summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-06 11:57:54 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-06 12:03:59 +0100
commit0fa31bed9a7a0666df26a1016d74df3ec15b40f9 (patch)
tree679aea468eef96285855e2a4b7316ee2f0de37d6
parent4ae9b3ab10c882bd9c25b1f1303325a0ecd7fc06 (diff)
Default OMultiTypeInferfaceContainerHelperVar equalImpl parameter
...and assorted OUStringHash clean up Change-Id: I779904e1275e8df88f567beb388d1d11af9e9671
-rw-r--r--comphelper/source/property/genericpropertyset.cxx3
-rw-r--r--dbaccess/source/core/inc/ContentHelper.hxx8
-rw-r--r--dbaccess/source/ui/inc/sbamultiplex.hxx3
-rw-r--r--embeddedobj/source/general/intercept.cxx25
-rw-r--r--embedserv/source/embed/intercept.cxx28
-rw-r--r--framework/inc/dispatch/menudispatcher.hxx3
-rw-r--r--framework/inc/dispatch/popupmenudispatcher.hxx3
-rw-r--r--framework/inc/stdtypes.h3
-rw-r--r--include/cppuhelper/interfacecontainer.h5
-rw-r--r--include/sfx2/unoctitm.hxx3
-rw-r--r--linguistic/source/lngopt.hxx5
-rw-r--r--svx/source/unodraw/shapepropertynotifier.cxx2
-rw-r--r--sw/source/ui/inc/unomailmerge.hxx4
-rw-r--r--ucb/source/cacher/contentresultsetwrapper.hxx18
-rw-r--r--ucb/source/core/ucbstore.cxx24
-rw-r--r--ucb/source/ucp/file/bc.cxx2
-rw-r--r--ucb/source/ucp/file/filglob.hxx18
-rw-r--r--ucb/source/ucp/file/filnot.hxx3
-rw-r--r--ucb/source/ucp/file/shell.hxx6
-rw-r--r--ucbhelper/source/provider/contenthelper.cxx19
-rw-r--r--ucbhelper/source/provider/resultset.cxx19
21 files changed, 29 insertions, 175 deletions
diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index 1261db323f7e..feb803ef1dad 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -30,7 +30,6 @@
#include <osl/mutex.hxx>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
-#include <comphelper/stl_types.hxx>
#include <comphelper/servicehelper.hxx>
#include <rtl/uuid.h>
@@ -62,7 +61,7 @@ namespace comphelper
{
private:
GenericAnyMapImpl maAnyMap;
- ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString, OUStringHash,UStringEqual> m_aListener;
+ ::cppu::OMultiTypeInterfaceContainerHelperVar<OUString, OUStringHash> m_aListener;
protected:
virtual void _setPropertyValues( const PropertyMapEntry** ppEntries, const Any* pValues ) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException );
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index 26cdd3d22f05..9f443672c562 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -34,13 +34,16 @@
#include <cppuhelper/compbase9.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/uno3.hxx>
-#include <comphelper/stl_types.hxx>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/sdbcx/XRename.hpp>
#include <connectivity/sqlerror.hxx>
#include <boost/shared_ptr.hpp>
+namespace com { namespace sun { namespace star { namespace beans {
+ struct PropertyValue;
+} } } }
+
namespace dbaccess
{
class ODatabaseModelImpl;
@@ -76,8 +79,7 @@ namespace dbaccess
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString,
- OUStringHash,
- ::comphelper::UStringEqual
+ OUStringHash
> PropertyChangeListenerContainer;
typedef ::comphelper::OBaseMutex OContentHelper_MBASE;
typedef ::cppu::WeakComponentImplHelper9 < ::com::sun::star::ucb::XContent
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
index e4ee39090fe7..9a09a883e766 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -39,7 +39,6 @@
#include <com/sun/star/sdb/XRowSetApproveListener.hpp>
#include <com/sun/star/sdbc/XRowSetListener.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
-#include <comphelper/stl_types.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/queryinterface.hxx>
@@ -186,7 +185,7 @@ namespace dbaui
,public listenerclass \
{ \
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< \
- OUString, OUStringHash, ::comphelper::UStringEqual > ListenerContainerMap; \
+ OUString, OUStringHash > ListenerContainerMap; \
ListenerContainerMap m_aListeners; \
\
public: \
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 0f328cb27652..cda4dab82421 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -31,35 +31,14 @@ using namespace ::com::sun::star;
uno::Sequence< OUString > Interceptor::m_aInterceptedURL(IUL);
-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();
- }
-};
-
-
-
class StatusChangeListenerContainer
: public ::cppu::OMultiTypeInterfaceContainerHelperVar<
-OUString,hashOUString,equalOUString>
+OUString,OUStringHash>
{
public:
StatusChangeListenerContainer( ::osl::Mutex& aMutex )
: cppu::OMultiTypeInterfaceContainerHelperVar<
- OUString,hashOUString,equalOUString>(aMutex)
+ OUString,OUStringHash>(aMutex)
{
}
};
diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx
index eba61b4b55d1..7db42b7dd9cb 100644
--- a/embedserv/source/embed/intercept.cxx
+++ b/embedserv/source/embed/intercept.cxx
@@ -32,38 +32,14 @@ using namespace ::com::sun::star;
uno::Sequence< OUString > Interceptor::m_aInterceptedURL(IUL);
-
-
-
-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();
- }
-};
-
-
-
class StatusChangeListenerContainer
: public ::cppu::OMultiTypeInterfaceContainerHelperVar<
-OUString,hashOUString,equalOUString>
+OUString,OUStringHash>
{
public:
StatusChangeListenerContainer( ::osl::Mutex& aMutex )
: cppu::OMultiTypeInterfaceContainerHelperVar<
- OUString,hashOUString,equalOUString>(aMutex)
+ OUString,OUStringHash>(aMutex)
{
}
};
diff --git a/framework/inc/dispatch/menudispatcher.hxx b/framework/inc/dispatch/menudispatcher.hxx
index 21f1da739b25..7a957d5fa233 100644
--- a/framework/inc/dispatch/menudispatcher.hxx
+++ b/framework/inc/dispatch/menudispatcher.hxx
@@ -54,8 +54,7 @@ namespace framework{
*//*-*************************************************************************************************************/
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString ,
- OUStringHash,
- std::equal_to< OUString > > IMPL_ListenerHashContainer;
+ OUStringHash > IMPL_ListenerHashContainer;
/*-************************************************************************************************************//**
diff --git a/framework/inc/dispatch/popupmenudispatcher.hxx b/framework/inc/dispatch/popupmenudispatcher.hxx
index 6fafe87b8f42..c2fe7de91ef5 100644
--- a/framework/inc/dispatch/popupmenudispatcher.hxx
+++ b/framework/inc/dispatch/popupmenudispatcher.hxx
@@ -57,8 +57,7 @@ namespace framework{
*//*-*************************************************************************************************************/
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString ,
- OUStringHash,
- std::equal_to< OUString > > IMPL_ListenerHashContainer;
+ OUStringHash > IMPL_ListenerHashContainer;
/*-************************************************************************************************************//**
diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index 7a5f08f18628..79523bb4f523 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -170,8 +170,7 @@ typedef BaseHash< sal_Int32 > NameToHandleHash;
So it's better to declare it one times only!
*/
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString ,
- OUStringHash,
- ::std::equal_to< OUString > > ListenerHash;
+ OUStringHash > ListenerHash;
} // namespace framework
diff --git a/include/cppuhelper/interfacecontainer.h b/include/cppuhelper/interfacecontainer.h
index 223148f586e6..860529db3f8a 100644
--- a/include/cppuhelper/interfacecontainer.h
+++ b/include/cppuhelper/interfacecontainer.h
@@ -19,6 +19,9 @@
#ifndef INCLUDED_CPPUHELPER_INTERFACECONTAINER_H
#define INCLUDED_CPPUHELPER_INTERFACECONTAINER_H
+#include <sal/config.h>
+
+#include <functional>
#include <vector>
#include <osl/mutex.hxx>
#include <rtl/alloc.h>
@@ -293,7 +296,7 @@ inline void OInterfaceContainerHelper::notifyEach( void ( SAL_CALL ListenerT::*N
@see OInterfaceIteratorHelper
@see OInterfaceContainerHelper
*/
-template< class key , class hashImpl , class equalImpl >
+template< class key , class hashImpl , class equalImpl = std::equal_to<key> >
class OMultiTypeInterfaceContainerHelperVar
{
public:
diff --git a/include/sfx2/unoctitm.hxx b/include/sfx2/unoctitm.hxx
index 2641c455566b..9682827f7310 100644
--- a/include/sfx2/unoctitm.hxx
+++ b/include/sfx2/unoctitm.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SFX2_UNOCTITM_HXX
#define INCLUDED_SFX2_UNOCTITM_HXX
-#include <functional>
#include <com/sun/star/frame/XNotifyingDispatch.hpp>
#include <com/sun/star/frame/XDispatchResultListener.hpp>
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
@@ -77,7 +76,7 @@ struct SfxStatusDispatcher_Impl_hashType
{ return s.hashCode(); }
};
-typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString, SfxStatusDispatcher_Impl_hashType, std::equal_to< OUString > > SfxStatusDispatcher_Impl_ListenerContainer ;
+typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString, SfxStatusDispatcher_Impl_hashType > SfxStatusDispatcher_Impl_ListenerContainer ;
class SfxStatusDispatcher : public ::cppu::WeakImplHelper1< css::frame::XNotifyingDispatch >
{
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 528b853a6c99..4d68370331ea 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -20,8 +20,6 @@
#ifndef INCLUDED_LINGUISTIC_SOURCE_LNGOPT_HXX
#define INCLUDED_LINGUISTIC_SOURCE_LNGOPT_HXX
-#include <functional>
-
#include <uno/lbnames.h>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -85,8 +83,7 @@ struct PropHashType_Impl
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
sal_Int32,
- PropHashType_Impl,
- std::equal_to< sal_Int32 >
+ PropHashType_Impl
> OPropertyListenerContainerHelper;
diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx
index ed2d7ede90e6..2a401e7161fa 100644
--- a/svx/source/unodraw/shapepropertynotifier.cxx
+++ b/svx/source/unodraw/shapepropertynotifier.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <comphelper/stl_types.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weak.hxx>
#include <tools/diagnose_ex.h>
@@ -66,7 +65,6 @@ namespace svx
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar < OUString
, OUStringHash
- , ::comphelper::UStringEqual
> PropertyChangeListenerContainer;
//====================================================================
diff --git a/sw/source/ui/inc/unomailmerge.hxx b/sw/source/ui/inc/unomailmerge.hxx
index b9c5e1f382dc..9b9a4c1c450b 100644
--- a/sw/source/ui/inc/unomailmerge.hxx
+++ b/sw/source/ui/inc/unomailmerge.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_UI_INC_UNOMAILMERGE_HXX
#define INCLUDED_SW_SOURCE_UI_INC_UNOMAILMERGE_HXX
-#include <functional>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <unotools/configitem.hxx>
@@ -72,8 +71,7 @@ struct PropHashType_Impl
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
sal_Int32,
- PropHashType_Impl,
- std::equal_to< sal_Int32 >
+ PropHashType_Impl
> OPropertyListenerContainerHelper;
////////////////////////////////////////////////////////////
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
@@ -101,24 +101,6 @@ OUString makeHierarchalNameSegment( const OUString & rIn )
#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:
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index 2f1fde05a1f1..8b9159a1d08e 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -106,27 +106,10 @@ PropertiesEventListenerMap;
//
//=========================================================================
-struct equalStr
-{
- bool operator()( const OUString& s1, const OUString& s2 ) const
- {
- return !!( s1 == s2 );
- }
-};
-
-struct hashStr
-{
- size_t operator()( const OUString& rName ) const
- {
- return rName.hashCode();
- }
-};
-
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
OUString,
- hashStr,
- equalStr
+ OUStringHash
> PropertyChangeListeners;
//=========================================================================
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index 858ebbad77d3..beed2f1873c2 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -120,27 +120,10 @@ public:
//
//=========================================================================
-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
+ OUStringHash
> PropertyChangeListenerContainer;
//=========================================================================