[Libreoffice-commits] .: animations/source sd/inc sd/source slideshow/source

Fridrich Strba fridrich at kemper.freedesktop.org
Sat Feb 5 16:04:23 PST 2011


 animations/source/animcore/targetpropertiescreator.cxx                      |    6 +++---
 sd/inc/CustomAnimationPreset.hxx                                            |    8 ++++----
 sd/inc/TransitionPreset.hxx                                                 |    4 ++--
 sd/source/filter/eppt/pptx-epptooxml.cxx                                    |    2 +-
 sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx |    4 ++--
 sd/source/ui/framework/configuration/ResourceFactoryManager.hxx             |    4 ++--
 sd/source/ui/framework/module/ModuleController.cxx                          |    6 +++---
 sd/source/ui/framework/tools/FrameworkHelper.cxx                            |    3 ++-
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx                           |    2 +-
 sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx                           |    2 +-
 sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx                      |    2 +-
 sd/source/ui/toolpanel/TaskPaneFocusManager.cxx                             |    4 ++--
 sd/source/ui/toolpanel/controls/MasterPageObserver.cxx                      |    6 +++---
 sd/source/ui/tools/IconCache.cxx                                            |    4 ++--
 sd/source/ui/unoidl/facreg.cxx                                              |    4 ++--
 sd/source/ui/view/ViewShellManager.cxx                                      |    6 +++---
 slideshow/source/engine/eventmultiplexer.cxx                                |    2 +-
 slideshow/source/engine/slide/layermanager.hxx                              |    4 ++--
 18 files changed, 37 insertions(+), 36 deletions(-)

New commits:
commit ea6acd9fcf785b68670b10cbbe3f74bb977815f8
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Sat Feb 5 21:40:28 2011 +0100

    Migrating to boost unordered containers

diff --git a/animations/source/animcore/targetpropertiescreator.cxx b/animations/source/animcore/targetpropertiescreator.cxx
index 3aaa8b8..cdacbea 100644
--- a/animations/source/animcore/targetpropertiescreator.cxx
+++ b/animations/source/animcore/targetpropertiescreator.cxx
@@ -50,7 +50,7 @@
 #include <animations/animationnodehelper.hxx>
 
 #include <vector>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 
 using namespace ::com::sun::star;
@@ -142,7 +142,7 @@ namespace animcore
              */
             sal_Int16							mnParagraphIndex;
 
-            /// Comparison needed for hash_map
+            /// Comparison needed for boost::unordered_map
             bool operator==( const ShapeHashKey& rRHS ) const
             {
                 return mxRef == rRHS.mxRef && mnParagraphIndex == rRHS.mnParagraphIndex;
@@ -150,7 +150,7 @@ namespace animcore
         };
 
         // A hash map which maps a XShape to the corresponding vector of initial properties
-        typedef ::std::hash_map< ShapeHashKey,
+        typedef ::boost::unordered_map< ShapeHashKey,
                                  VectorOfNamedValues,
                                  ::std::size_t (*)(const ShapeHashKey&) > XShapeHash;
 
diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx
index 8bc510e..fb2a7b7 100644
--- a/sd/inc/CustomAnimationPreset.hxx
+++ b/sd/inc/CustomAnimationPreset.hxx
@@ -36,12 +36,12 @@
 #include <comphelper/stl_types.hxx>
 #include <CustomAnimationEffect.hxx>
 
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 namespace sd {
 
-typedef std::hash_map< rtl::OUString, CustomAnimationEffectPtr, comphelper::UStringHash, comphelper::UStringEqual > EffectsSubTypeMap;
-typedef std::hash_map< rtl::OUString, rtl::OUString, comphelper::UStringHash, comphelper::UStringEqual > UStringMap;
+typedef boost::unordered_map< rtl::OUString, CustomAnimationEffectPtr, comphelper::UStringHash, comphelper::UStringEqual > EffectsSubTypeMap;
+typedef boost::unordered_map< rtl::OUString, rtl::OUString, comphelper::UStringHash, comphelper::UStringEqual > UStringMap;
 typedef std::vector< rtl::OUString > UStringList;
 
 class CustomAnimationPreset
@@ -80,7 +80,7 @@ private:
 };
 
 typedef boost::shared_ptr< CustomAnimationPreset > CustomAnimationPresetPtr;
-typedef std::hash_map<rtl::OUString, CustomAnimationPresetPtr, comphelper::UStringHash, comphelper::UStringEqual> EffectDescriptorMap;
+typedef boost::unordered_map<rtl::OUString, CustomAnimationPresetPtr, comphelper::UStringHash, comphelper::UStringEqual> EffectDescriptorMap;
 typedef std::vector< CustomAnimationPresetPtr > EffectDescriptorList;
 
 struct PresetCategory
diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx
index 8be992e..dbc7497 100644
--- a/sd/inc/TransitionPreset.hxx
+++ b/sd/inc/TransitionPreset.hxx
@@ -35,7 +35,7 @@
 #include <comphelper/stl_types.hxx>
 
 #include <list>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 namespace com { namespace sun { namespace star { 
     namespace animations { class XAnimationNode; }
@@ -50,7 +50,7 @@ namespace sd {
 class TransitionPreset;
 typedef boost::shared_ptr< TransitionPreset > TransitionPresetPtr;
 typedef std::list< TransitionPresetPtr > TransitionPresetList;
-typedef std::hash_map< rtl::OUString, rtl::OUString, comphelper::UStringHash, comphelper::UStringEqual > UStringMap;
+typedef boost::unordered_map< rtl::OUString, rtl::OUString, comphelper::UStringHash, comphelper::UStringEqual > UStringMap;
 
 class TransitionPreset
 {
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 741ba03..dc20e6e 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -26,7 +26,7 @@
  *
  ************************************************************************/
 
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <stdio.h>
 #include <oox/drawingml/chart/chartconverter.hxx>
 #include <oox/core/tokens.hxx>
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx
index 6bdb4ce..ed5d80d 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.hxx
@@ -35,7 +35,7 @@
 
 #include <comphelper/stl_types.hxx>
 #include <vector>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 namespace css = ::com::sun::star;
 
@@ -127,7 +127,7 @@ private:
         css::uno::Any maUserData;
     };
     typedef ::std::vector<ListenerDescriptor> ListenerList;
-    typedef ::std::hash_map
+    typedef ::boost::unordered_map
         <rtl::OUString,
          ListenerList,
          ::comphelper::UStringHash,
diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx
index 69e8acb..fda86ae 100644
--- a/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx
+++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx
@@ -35,7 +35,7 @@
 #include <com/sun/star/util/XURLTransformer.hpp>
 #include <osl/mutex.hxx>
 #include <comphelper/stl_types.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 namespace css = ::com::sun::star;
 
@@ -94,7 +94,7 @@ public:
 
 private:
     ::osl::Mutex maMutex;
-    typedef ::std::hash_map<
+    typedef ::boost::unordered_map<
         ::rtl::OUString,
         css::uno::Reference<css::drawing::framework::XResourceFactory>,
         ::comphelper::UStringHash,
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index c3870be..645d4a0 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -34,7 +34,7 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/stl_types.hxx>
 #include <boost/bind.hpp>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 #include <tools/diagnose_ex.h>
 
@@ -56,7 +56,7 @@ static const sal_uInt32 snStartupPropertyCount (1);
 
 
 class ModuleController::ResourceToFactoryMap
-    : public ::std::hash_map<
+    : public ::boost::unordered_map<
     rtl::OUString,
     rtl::OUString,
     ::comphelper::UStringHash,
@@ -68,7 +68,7 @@ public:
 
 
 class ModuleController::LoadedFactoryContainer
-    : public ::std::hash_map<
+    : public ::boost::unordered_map<
     rtl::OUString,
     WeakReference<XInterface>,
     ::comphelper::UStringHash,
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 48eb8fa..4b44552 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -54,6 +54,7 @@
 #include <osl/doublecheckedlocking.h>
 #include <osl/getglobalmutex.hxx>
 #include <tools/diagnose_ex.h>
+#include <boost/unordered_map.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -301,7 +302,7 @@ namespace
     drawing framework and the enums defined in the ViewShell class.
 */
 class FrameworkHelper::ViewURLMap
-    : public ::std::hash_map<
+    : public ::boost::unordered_map<
           rtl::OUString,
           ViewShell::ShellType,
           ::comphelper::UStringHash,
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index fdf1aaf..c4729ae 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -99,7 +99,7 @@ public:
 };
 
 class BitmapCache::CacheBitmapContainer
-    : public ::std::hash_map<CacheKey, CacheEntry, CacheHash>
+    : public ::boost::unordered_map<CacheKey, CacheEntry, CacheHash>
 {
 public:
     CacheBitmapContainer (void) {}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index bedf563..320a880 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -35,7 +35,7 @@ class SdrPage;
 #include <osl/mutex.hxx>
 #include <memory>
 #include <boost/shared_ptr.hpp>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 namespace sd { namespace slidesorter { namespace cache {
 
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 849a1a7..32f3174 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -133,7 +133,7 @@ namespace sd { namespace slidesorter { namespace cache {
 /** Container for the active caches.
 */
 class PageCacheManager::PageCacheContainer
-    : public ::std::hash_map<CacheDescriptor,
+    : public ::boost::unordered_map<CacheDescriptor,
                              ::boost::shared_ptr<PageCacheManager::Cache>,
                              CacheDescriptor::Hash,
                              CacheDescriptor::Equal>
diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx
index cd543a4..bb8718f 100644
--- a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx
@@ -35,7 +35,7 @@
 #include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/event.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 namespace {
 
@@ -65,7 +65,7 @@ namespace sd { namespace toolpanel {
 
 
 class FocusManager::LinkMap
-    : public ::std::hash_multimap< ::Window*, EventDescriptor, WindowHash>
+    : public ::boost::unordered_multimap< ::Window*, EventDescriptor, WindowHash>
 {
 };
 
diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
index b7e51a8..865dafe 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
@@ -34,7 +34,7 @@
 #include <algorithm>
 #include "drawdoc.hxx"
 #include "sdpage.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <set>
 #include <vector>
 #include <svl/lstner.hxx>
@@ -93,7 +93,7 @@ private:
         size_t operator()(SdDrawDocument* argument) const 
         { return reinterpret_cast<unsigned long>(argument); }
     };
-    typedef ::std::hash_map<SdDrawDocument*,
+    typedef ::boost::unordered_map<SdDrawDocument*,
                             MasterPageObserver::MasterPageNameSet,
                             DrawDocHash>
         MasterPageContainer;
@@ -194,7 +194,7 @@ void MasterPageObserver::Implementation::RegisterDocument (
     SdDrawDocument& rDocument)
 {
     // Gather the names of all the master pages in the given document.
-    MasterPageContainer::data_type aMasterPageSet;
+    MasterPageContainer::mapped_type aMasterPageSet;
     USHORT nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD);
     for (USHORT nIndex=0; nIndex<nMasterPageCount; nIndex++)
     {
diff --git a/sd/source/ui/tools/IconCache.cxx b/sd/source/ui/tools/IconCache.cxx
index 0b06335..80f68a7 100644
--- a/sd/source/ui/tools/IconCache.cxx
+++ b/sd/source/ui/tools/IconCache.cxx
@@ -32,7 +32,7 @@
 #include "tools/IconCache.hxx"
 
 #include "sdresid.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <osl/doublecheckedlocking.h>
 #include <osl/getglobalmutex.hxx>
 
@@ -51,7 +51,7 @@ private:
     */
     static IconCache* mpInstance;
 
-    typedef ::std::hash_map<USHORT,Image> ImageContainer;
+    typedef ::boost::unordered_map<USHORT,Image> ImageContainer;
     ImageContainer maContainer;
 
     Image GetIcon (USHORT nResourceId);
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index b9e43b1..ee65697 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -43,7 +43,7 @@
 #define INCLUDED_STRING_H
 #endif
 #include <comphelper/stl_types.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <boost/shared_ptr.hpp>
 
 using namespace rtl;
@@ -255,7 +255,7 @@ enum FactoryId
     SlideLayoutControllerFactoryId,
     InsertSlideControllerFactoryId,
 };
-typedef ::std::hash_map<OUString, FactoryId, comphelper::UStringHash, comphelper::UStringEqual> FactoryMap;
+typedef ::boost::unordered_map<OUString, FactoryId, comphelper::UStringHash, comphelper::UStringEqual> FactoryMap;
 
 
 namespace {
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index fb7db4b..48ea008 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -40,7 +40,7 @@
 #include <svx/svxids.hrc>
 #include <svx/fmshell.hxx>
 
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <iterator>
 
 #undef VERBOSE
@@ -177,7 +177,7 @@ private:
     mutable ::osl::Mutex maMutex;
 
     class ShellHash{public: size_t operator()(const SfxShell* p) const { return (size_t)p;} };
-    typedef ::std::hash_multimap<const SfxShell*,SharedShellFactory,ShellHash>
+    typedef ::boost::unordered_multimap<const SfxShell*,SharedShellFactory,ShellHash>
         FactoryList;
     FactoryList maShellFactories;
 
@@ -189,7 +189,7 @@ private:
     ActiveShellList maActiveViewShells;
 
     typedef ::std::list<ShellDescriptor> SubShellSubList;
-    typedef ::std::hash_map<const SfxShell*,SubShellSubList,ShellHash> SubShellList;
+    typedef ::boost::unordered_map<const SfxShell*,SubShellSubList,ShellHash> SubShellList;
     SubShellList maActiveSubShells;
     
     /** In this member we remember what shells we have pushed on the shell
diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx
index 4f5ecd4..2fdd52b 100644
--- a/slideshow/source/engine/eventmultiplexer.cxx
+++ b/slideshow/source/engine/eventmultiplexer.cxx
@@ -62,7 +62,7 @@
 #include <boost/bind.hpp>
 
 #include <vector>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <algorithm>
 
 using namespace ::com::sun::star;
diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx
index cf5e013..0e3990e 100644
--- a/slideshow/source/engine/slide/layermanager.hxx
+++ b/slideshow/source/engine/slide/layermanager.hxx
@@ -42,7 +42,7 @@
 
 #include <vector>
 #include <map>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <algorithm>
 #include <functional>
 
@@ -245,7 +245,7 @@ namespace slideshow
 
                 Provides quicker lookup than ShapeSet for simple mappings
              */
-            typedef ::std::hash_map<
+            typedef ::boost::unordered_map<
                 ::com::sun::star::uno::Reference<
                     ::com::sun::star::drawing::XShape >,
                 ShapeSharedPtr,


More information about the Libreoffice-commits mailing list