diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-20 13:38:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-20 13:42:30 +0200 |
commit | 9df18fd92c0eb3153576f60b4b95a8cf96469eef (patch) | |
tree | 2e6946b98e5562915f480851b6cd01bd9c857776 /configmgr | |
parent | 3bb30a68e0604b3006f367fdb4c0a797846c23bc (diff) |
Revert "fdo#75757: remove inheritance to std::map"
This reverts commit a2deca9d755710bd543fd0caaea0352ac746396d: config_map had
been introduced on purpose with bfb978334cea775b8ae5c40ceea050ea0660d80a
"configmgr: faster / simpler compare for keys."
Change-Id: I3ae0edc4d23977c6537bd2f462f90a702266de6d
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/access.hxx | 8 | ||||
-rw-r--r-- | configmgr/source/components.hxx | 5 | ||||
-rw-r--r-- | configmgr/source/config_map.hxx | 3 | ||||
-rw-r--r-- | configmgr/source/data.hxx | 2 | ||||
-rw-r--r-- | configmgr/source/nodemap.hxx | 3 |
5 files changed, 12 insertions, 9 deletions
diff --git a/configmgr/source/access.hxx b/configmgr/source/access.hxx index d8db2a81c17e..807f2a2a9724 100644 --- a/configmgr/source/access.hxx +++ b/configmgr/source/access.hxx @@ -487,7 +487,7 @@ private: bool theDirectlyModified); }; - typedef std::map< OUString, ModifiedChild, LengthContentsCompare > ModifiedChildren; + typedef config_map< ModifiedChild > ModifiedChildren; rtl::Reference< ChildAccess > getModifiedChild( ModifiedChildren::iterator const & childIterator); @@ -516,7 +516,7 @@ private: rtl::Reference< Access > getNotificationRoot(); - typedef std::map< OUString, ChildAccess *, LengthContentsCompare > WeakChildMap; + typedef config_map< ChildAccess * > WeakChildMap; typedef std::multiset< @@ -536,7 +536,7 @@ private: com::sun::star::beans::XPropertyChangeListener > > PropertyChangeListenersElement; - typedef std::map< OUString, PropertyChangeListenersElement, LengthContentsCompare > + typedef config_map< PropertyChangeListenersElement > PropertyChangeListeners; typedef @@ -545,7 +545,7 @@ private: com::sun::star::beans::XVetoableChangeListener > > VetoableChangeListenersElement; - typedef std::map< OUString, VetoableChangeListenersElement, LengthContentsCompare > + typedef config_map< VetoableChangeListenersElement > VetoableChangeListeners; typedef diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index abd40b8880a7..48c1f7a73199 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -148,8 +148,9 @@ private: typedef std::set< RootAccess * > WeakRootSet; typedef - std::map< OUString, com::sun::star::uno::Reference< - com::sun::star::beans::XPropertySet >, LengthContentsCompare > + config_map< + com::sun::star::uno::Reference< + com::sun::star::beans::XPropertySet > > ExternalServices; class WriteThread; diff --git a/configmgr/source/config_map.hxx b/configmgr/source/config_map.hxx index 943d409a1287..0e9f614bb5cd 100644 --- a/configmgr/source/config_map.hxx +++ b/configmgr/source/config_map.hxx @@ -9,6 +9,7 @@ #ifndef CONFIG_MAP_HXX #define CONFIG_MAP_HXX +#include <map> #include <rtl/ustring.hxx> // The realisation here is that while a map is a reasonably compact @@ -27,6 +28,8 @@ struct LengthContentsCompare } }; +template< class T > struct config_map : public std::map< OUString, T, LengthContentsCompare > { }; + #endif // CONFIG_MAP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/configmgr/source/data.hxx b/configmgr/source/data.hxx index 3dd8d08fc899..17a0e1dec879 100644 --- a/configmgr/source/data.hxx +++ b/configmgr/source/data.hxx @@ -86,7 +86,7 @@ struct Data: private boost::noncopyable { OUString const & url); private: - typedef std::map< OUString, rtl::Reference< ExtensionXcu >, LengthContentsCompare > + typedef config_map< rtl::Reference< ExtensionXcu > > ExtensionXcuAdditions; rtl::Reference< Node > root_; diff --git a/configmgr/source/nodemap.hxx b/configmgr/source/nodemap.hxx index 1c01aa39fca0..a000b30aef96 100644 --- a/configmgr/source/nodemap.hxx +++ b/configmgr/source/nodemap.hxx @@ -21,14 +21,13 @@ #define INCLUDED_CONFIGMGR_SOURCE_NODEMAP_HXX #include <sal/config.h> -#include <map> #include "config_map.hxx" #include <rtl/ref.hxx> #include <node.hxx> namespace configmgr { -typedef std::map< OUString, rtl::Reference< Node >, LengthContentsCompare > NodeMapImpl; +typedef config_map< rtl::Reference< Node > > NodeMapImpl; class NodeMap { NodeMapImpl maImpl; |