From 195045b478ad3808b273a7ddca90d0a6e63eaab4 Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Wed, 27 Jun 2007 14:43:41 +0000
Subject: [PATCH] INTEGRATION: CWS impress122 (1.4.50); FILE MERGED 2007/06/13
07:32:13 af 1.4.50.1: #141146# Made ToolBarManager a shared_ptr member of
ViewShellBase.
---
sd/source/ui/inc/ToolBarManager.hxx | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx
index 299e32492dc3..3c0fe79921a3 100644
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ToolBarManager.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: rt $ $Date: 2007-04-03 16:07:49 $
+ * last change: $Author: hr $ $Date: 2007-06-27 15:43:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -45,7 +45,9 @@
#endif
#include
-#include
+#include
+#include
+#include
class SdrView;
@@ -81,12 +83,13 @@ class ViewShellManager;
in a short time on a view shell switch.
*/
class ToolBarManager
+ : public ::boost::enable_shared_from_this
{
public:
/** Use this method instead of the constructor to create new objects of
this class.
*/
- static ::std::auto_ptr Create (
+ static ::boost::shared_ptr Create (
ViewShellBase& rBase,
tools::EventMultiplexer& rMultiplexer,
ViewShellManager& rViewShellManager);
@@ -274,10 +277,11 @@ public:
bar operations are made in a row.
*/
class UpdateLock { public:
- UpdateLock(ToolBarManager& rManager) : mrManager(rManager) { mrManager.LockUpdate(); }
- ~UpdateLock(void) { mrManager.UnlockUpdate(); }
+ UpdateLock(const ::boost::shared_ptr& rpManager)
+ : mpManager(rpManager) { mpManager->LockUpdate(); }
+ ~UpdateLock(void) { mpManager->UnlockUpdate(); }
private:
- ToolBarManager& mrManager;
+ ::boost::shared_ptr mpManager;
};
friend class UpdateLock;
@@ -289,7 +293,7 @@ public:
private:
class Implementation;
- ::std::auto_ptr mpImpl;
+ ::boost::scoped_ptr mpImpl;
/** The ViewShellBase is used to get the XLayoutManager and to determine
the plug in mode.