diff options
author | Tobias Lippert <drtl@fastmail.fm> | 2015-08-02 14:51:23 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-04 06:43:02 +0000 |
commit | 431957118d7bbf96bf78e142df9decbcaff6475b (patch) | |
tree | c49163a8c1f041a4381d0ee034622bceaf9fefbd /sc/inc | |
parent | 8eca4da70506e1e6c2e4b600262cced93aba8c96 (diff) |
fdo#68016 Speed up ScChartListenerCollection::EndListeningHiddenRange
The listeners were stored in a std::list which is not efficient for
the lookup required in EndListeningHiddenRange()
The list was replaced by an std::unodered_map which allows faster
look-up.
Change-Id: Iec7a33b18aa91e7d2917dc8feb98bf9b20ce804e
Reviewed-on: https://gerrit.libreoffice.org/17437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/chartlis.hxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 98d3850ffd2e..0f74e869852c 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -28,10 +28,10 @@ #include "externalrefmgr.hxx" #include <vector> -#include <list> #include <boost/scoped_ptr.hpp> #include <boost/ptr_container/ptr_map.hpp> +#include <unordered_map> #include <unordered_set> class ScDocument; @@ -128,13 +128,6 @@ public: class ScChartListenerCollection { public: - struct RangeListenerItem - { - ScRange maRange; - ScChartHiddenRangeListener* mpListener; - explicit RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p); - }; - typedef boost::ptr_map<OUString, ScChartListener> ListenersType; typedef std::unordered_set<OUString, OUStringHash> StringSetType; private: @@ -145,7 +138,9 @@ private: SC_CLCUPDATE_RUNNING, SC_CLCUPDATE_MODIFIED } meModifiedDuringUpdate; - ::std::list<RangeListenerItem> maHiddenListeners; + + std::unordered_multimap<ScChartHiddenRangeListener*, ScRange> maHiddenListeners; + StringSetType maNonOleObjectNames; Idle aIdle; |