cppu::OMultiTypeInterfaceContainerHelperVar hashImpl param is unused

...since f059134fab "INTEGRATION: CWS
cppuhelpshrink: #i72766# save memory in cppuhelper, using a vector instead of a
hash_map" (but a dummy "void" default is left in place for backwards
compatibility).

Change-Id: I3bb0af8158f34737d41c344464f3cf944e2891ed
This commit is contained in:
Stephan Bergmann
2014-04-15 07:44:14 +02:00
parent c2ffc9e180
commit fa0ffdbeb5
21 changed files with 37 additions and 177 deletions

View File

@@ -58,7 +58,7 @@ namespace comphelper
{
private:
GenericAnyMapImpl maAnyMap;
::cppu::OMultiTypeInterfaceContainerHelperVar<OUString, OUStringHash> m_aListener;
cppu::OMultiTypeInterfaceContainerHelperVar<OUString> m_aListener;
protected:
virtual void _setPropertyValues( const PropertyMapEntry** ppEntries, const Any* pValues ) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) SAL_OVERRIDE;

View File

@@ -237,8 +237,8 @@ namespace cppu_ifcontainer
void testOMultiTypeInterfaceContainerHelperVar()
{
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar<
const char*, rtl::CStringHash, rtl::CStringEqual> StrContainer;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<
char const *, void, rtl::CStringEqual> StrContainer;
const char *pTypes[nTests] =
{

View File

@@ -77,10 +77,8 @@ namespace dbaccess
typedef ::boost::shared_ptr<OContentHelper_Impl> TContentPtr;
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString,
OUStringHash
> PropertyChangeListenerContainer;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyChangeListenerContainer;
typedef ::comphelper::OBaseMutex OContentHelper_MBASE;
typedef ::cppu::WeakComponentImplHelper9 < ::com::sun::star::ucb::XContent
, ::com::sun::star::ucb::XCommandProcessor

View File

@@ -48,12 +48,6 @@ namespace dbaui
bool operator() (const ::com::sun::star::util::URL& x, const ::com::sun::star::util::URL& y) const {return x.Complete == y.Complete ? true : false;}
};
struct SbaURLHash
{
sal_Int32 operator() (const ::com::sun::star::util::URL& x) const {return x.Complete.hashCode();}
};
// SbaXGridControl
class SbaXStatusMultiplexer;
class SbaXGridControl
:public FmXGridControl
@@ -103,7 +97,8 @@ namespace dbaui
:public FmXGridPeer
,public ::com::sun::star::frame::XDispatch
{
::cppu::OMultiTypeInterfaceContainerHelperVar< ::com::sun::star::util::URL,SbaURLHash , SbaURLCompare> m_aStatusListeners;
cppu::OMultiTypeInterfaceContainerHelperVar<
css::util::URL, void, SbaURLCompare> m_aStatusListeners;
public:
SbaXGridPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);

View File

@@ -185,7 +185,7 @@ namespace dbaui
,public listenerclass \
{ \
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< \
OUString, OUStringHash > ListenerContainerMap; \
OUString > ListenerContainerMap; \
ListenerContainerMap m_aListeners; \
\
public: \

View File

@@ -32,13 +32,11 @@ using namespace ::com::sun::star;
uno::Sequence< OUString > Interceptor::m_aInterceptedURL(IUL);
class StatusChangeListenerContainer
: public ::cppu::OMultiTypeInterfaceContainerHelperVar<
OUString,OUStringHash>
: public cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
{
public:
StatusChangeListenerContainer( ::osl::Mutex& aMutex )
: cppu::OMultiTypeInterfaceContainerHelperVar<
OUString,OUStringHash>(aMutex)
: cppu::OMultiTypeInterfaceContainerHelperVar<OUString>(aMutex)
{
}
};

View File

@@ -33,13 +33,11 @@ using namespace ::com::sun::star;
uno::Sequence< OUString > Interceptor::m_aInterceptedURL(IUL);
class StatusChangeListenerContainer
: public ::cppu::OMultiTypeInterfaceContainerHelperVar<
OUString,OUStringHash>
: public cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
{
public:
StatusChangeListenerContainer( ::osl::Mutex& aMutex )
: cppu::OMultiTypeInterfaceContainerHelperVar<
OUString,OUStringHash>(aMutex)
: cppu::OMultiTypeInterfaceContainerHelperVar<OUString>(aMutex)
{
}
};

View File

@@ -47,13 +47,8 @@
namespace framework{
/*-************************************************************************************************************
We must save information about our listener and URL for listening.
We implement this as a hashtable for strings.
*//*-*************************************************************************************************************/
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString ,
OUStringHash > IMPL_ListenerHashContainer;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
IMPL_ListenerHashContainer;
/*-************************************************************************************************************
@short helper for desktop only(!) to create new tasks on demand for dispatches

View File

@@ -49,13 +49,8 @@
namespace framework{
/*-************************************************************************************************************
We must save information about our listener and URL for listening.
We implement this as a hashtable for strings.
*//*-*************************************************************************************************************/
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString ,
OUStringHash > IMPL_ListenerHashContainer;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
IMPL_ListenerHashContainer;
/*-************************************************************************************************************
@short helper for desktop only(!) to create new tasks on demand for dispatches

View File

@@ -152,13 +152,7 @@ typedef BaseHash< OUString > OUStringHashMap;
*/
typedef BaseHash< sal_Int32 > NameToHandleHash;
/**
Sometimes we need this template to implement listener container ...
and we need it at different positions ...
So it's better to declare it one times only!
*/
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString ,
OUStringHash > ListenerHash;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString> ListenerHash;
} // namespace framework

View File

@@ -296,7 +296,7 @@ inline void OInterfaceContainerHelper::notifyEach( void ( SAL_CALL ListenerT::*N
@see OInterfaceIteratorHelper
@see OInterfaceContainerHelper
*/
template< class key , class hashImpl , class equalImpl = std::equal_to<key> >
template< class key, class hashImpl = void, class equalImpl = std::equal_to<key> >
class OMultiTypeInterfaceContainerHelperVar
{
public:

View File

@@ -70,13 +70,8 @@ public:
void ReleaseBindings();
};
struct SfxStatusDispatcher_Impl_hashType
{
size_t operator()(const OUString& s) const
{ return s.hashCode(); }
};
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString, SfxStatusDispatcher_Impl_hashType > SfxStatusDispatcher_Impl_ListenerContainer ;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
SfxStatusDispatcher_Impl_ListenerContainer;
class SfxStatusDispatcher : public ::cppu::WeakImplHelper1< css::frame::XNotifyingDispatch >
{

View File

@@ -66,24 +66,8 @@ public:
GetActiveConvDics() const { return pData->aActiveConvDics; }
};
// uses templates from <cppuhelper/interfacecontainer.h>
// helper function call class
struct PropHashType_Impl
{
size_t operator()(const sal_Int32 &s) const { return s; }
};
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
sal_Int32,
PropHashType_Impl
> OPropertyListenerContainerHelper;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<sal_Int32>
OPropertyListenerContainerHelper;
class LinguProps :
public cppu::WeakImplHelper5

View File

@@ -63,12 +63,8 @@ namespace svx
typedef ::boost::unordered_map< ShapeProperty, PPropertyValueProvider, ShapePropertyHash > PropertyProviders;
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar < OUString
, OUStringHash
> PropertyChangeListenerContainer;
//= IPropertyValueProvider
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyChangeListenerContainer;
IPropertyValueProvider::~IPropertyValueProvider()
{

View File

@@ -56,20 +56,8 @@ namespace com { namespace sun { namespace star {
}}}
// uses templates from <cppuhelper/interfacecontainer.h>
// and <unotools/configitem.hxx>
// helper function call class
struct PropHashType_Impl
{
size_t operator()(const sal_Int32 &s) const { return s; }
};
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
sal_Int32,
PropHashType_Impl
> OPropertyListenerContainerHelper;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<sal_Int32>
OPropertyListenerContainerHelper;
class SwNewDBMgr;
class MailMergeExecuteFinalizer;

View File

@@ -48,15 +48,8 @@ class ContentResultSetWrapper
, public com::sun::star::sdbc::XRow
{
protected:
//class PropertyChangeListenerContainer_Impl.
typedef cppu::OMultiTypeInterfaceContainerHelperVar
< OUString, OUStringHash >
PropertyChangeListenerContainer_Impl;
// class ReacquireableGuard
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyChangeListenerContainer_Impl;
class ReacquireableGuard
{

View File

@@ -1119,23 +1119,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
return Reference< XInterface >();
}
// PropertyListeners_Impl.
typedef OMultiTypeInterfaceContainerHelperVar
<
OUString,
OUStringHash
> PropertyListeners_Impl;
// PersistentPropertySet_Impl.
typedef OMultiTypeInterfaceContainerHelperVar<OUString> PropertyListeners_Impl;
struct PersistentPropertySet_Impl
{

View File

@@ -111,40 +111,8 @@ public:
throw( RuntimeException, std::exception ) SAL_OVERRIDE;
};
// 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 OMultiTypeInterfaceContainerHelperVar
<
OUString,
hashStr_Impl,
equalStr_Impl
> PropertyChangeListenerContainer_Impl;
// class PropertyChangeListeners_Impl
typedef OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyChangeListenerContainer_Impl;
class PropertyChangeListeners_Impl : public PropertyChangeListenerContainer_Impl
{

View File

@@ -54,11 +54,8 @@ using namespace com::sun::star::ucb;
#define THROW_WHERE ""
#endif
// PropertyListeners
typedef cppu::OMultiTypeInterfaceContainerHelperVar< OUString,OUStringHash >
PropertyListeners_impl;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyListeners_impl;
class fileaccess::PropertyListeners
: public PropertyListeners_impl

View File

@@ -83,11 +83,8 @@ typedef boost::unordered_map
>
PropertiesEventListenerMap;
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
OUString,
OUStringHash
> PropertyChangeListeners;
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyChangeListeners;
struct ContentImplHelper_Impl
{

View File

@@ -122,23 +122,8 @@ public:
throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
};
// PropertyChangeListenerContainer.
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
OUString,
OUStringHash
> PropertyChangeListenerContainer;
// class PropertyChangeListeners.
typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
PropertyChangeListenerContainer;
class PropertyChangeListeners : public PropertyChangeListenerContainer
{