[Libreoffice-commits] core.git: comphelper/source cppuhelper/qa dbaccess/source embeddedobj/source embedserv/source framework/inc include/cppuhelper include/sfx2 linguistic/source svx/source sw/source ucbhelper/source ucb/source
Stephan Bergmann
sbergman at redhat.com
Mon Apr 14 22:47:10 PDT 2014
comphelper/source/property/genericpropertyset.cxx | 2 -
cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx | 4 +-
dbaccess/source/core/inc/ContentHelper.hxx | 6 +--
dbaccess/source/ui/inc/sbagrid.hxx | 9 +----
dbaccess/source/ui/inc/sbamultiplex.hxx | 2 -
embeddedobj/source/general/intercept.cxx | 6 +--
embedserv/source/embed/intercept.cxx | 6 +--
framework/inc/dispatch/menudispatcher.hxx | 9 +----
framework/inc/dispatch/popupmenudispatcher.hxx | 9 +----
framework/inc/stdtypes.h | 8 ----
include/cppuhelper/interfacecontainer.h | 2 -
include/sfx2/unoctitm.hxx | 9 +----
linguistic/source/lngopt.hxx | 20 +-----------
svx/source/unodraw/shapepropertynotifier.cxx | 8 +---
sw/source/core/uibase/inc/unomailmerge.hxx | 16 +--------
ucb/source/cacher/contentresultsetwrapper.hxx | 11 +-----
ucb/source/core/ucbstore.cxx | 18 -----------
ucb/source/sorter/sortresult.cxx | 36 +---------------------
ucb/source/ucp/file/bc.cxx | 7 +---
ucbhelper/source/provider/contenthelper.cxx | 7 +---
ucbhelper/source/provider/resultset.cxx | 19 +----------
21 files changed, 37 insertions(+), 177 deletions(-)
New commits:
commit fa0ffdbeb5a12b51c5d9202a5d7709d713a719f1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Apr 15 07:44:14 2014 +0200
cppu::OMultiTypeInterfaceContainerHelperVar hashImpl param is unused
...since f059134fab0f91b7a15594ad06536a13fbfae034 "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
diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index 55ce6cd..6badb46 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -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;
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
index 3efd35d..838a33a 100644
--- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
+++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
@@ -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] =
{
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index bc3f595..0cd416b 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -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
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index ef9b4db..7d14bb5 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -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 >&);
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
index ba23e75..4828bccd 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -185,7 +185,7 @@ namespace dbaui
,public listenerclass \
{ \
typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< \
- OUString, OUStringHash > ListenerContainerMap; \
+ OUString > ListenerContainerMap; \
ListenerContainerMap m_aListeners; \
\
public: \
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 23d2cf8..d64b49c 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -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)
{
}
};
diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx
index 7db42b7..750c74a 100644
--- a/embedserv/source/embed/intercept.cxx
+++ b/embedserv/source/embed/intercept.cxx
@@ -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)
{
}
};
diff --git a/framework/inc/dispatch/menudispatcher.hxx b/framework/inc/dispatch/menudispatcher.hxx
index 4fa2000..977c385 100644
--- a/framework/inc/dispatch/menudispatcher.hxx
+++ b/framework/inc/dispatch/menudispatcher.hxx
@@ -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
diff --git a/framework/inc/dispatch/popupmenudispatcher.hxx b/framework/inc/dispatch/popupmenudispatcher.hxx
index 7c2c4e7..8c60489 100644
--- a/framework/inc/dispatch/popupmenudispatcher.hxx
+++ b/framework/inc/dispatch/popupmenudispatcher.hxx
@@ -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
diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index 9accf59..3d23bdd 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -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
diff --git a/include/cppuhelper/interfacecontainer.h b/include/cppuhelper/interfacecontainer.h
index fade8bb..7dfff29 100644
--- a/include/cppuhelper/interfacecontainer.h
+++ b/include/cppuhelper/interfacecontainer.h
@@ -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:
diff --git a/include/sfx2/unoctitm.hxx b/include/sfx2/unoctitm.hxx
index 75d2457..6e8d572 100644
--- a/include/sfx2/unoctitm.hxx
+++ b/include/sfx2/unoctitm.hxx
@@ -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 >
{
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 2500c39..93806dd 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -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
diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx
index 6125864..63e2348 100644
--- a/svx/source/unodraw/shapepropertynotifier.cxx
+++ b/svx/source/unodraw/shapepropertynotifier.cxx
@@ -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()
{
diff --git a/sw/source/core/uibase/inc/unomailmerge.hxx b/sw/source/core/uibase/inc/unomailmerge.hxx
index a0780f4..3aeaa02 100644
--- a/sw/source/core/uibase/inc/unomailmerge.hxx
+++ b/sw/source/core/uibase/inc/unomailmerge.hxx
@@ -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;
diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx
index 9148a02..7041cd5 100644
--- a/ucb/source/cacher/contentresultsetwrapper.hxx
+++ b/ucb/source/cacher/contentresultsetwrapper.hxx
@@ -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
{
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 07f4533..d6ba6e7 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -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
{
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 8b62034..85eb0e8 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -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
{
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 130c8bd..de2f777 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -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
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index f758b93..b99794b 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -83,11 +83,8 @@ typedef boost::unordered_map
>
PropertiesEventListenerMap;
-typedef cppu::OMultiTypeInterfaceContainerHelperVar
-<
- OUString,
- OUStringHash
-> PropertyChangeListeners;
+typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString>
+ PropertyChangeListeners;
struct ContentImplHelper_Impl
{
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index 8c9fac6..421b6aa 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -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
{
More information about the Libreoffice-commits
mailing list