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.
This commit is contained in:
parent
441b67559a
commit
195045b478
1 changed files with 12 additions and 8 deletions
|
@ -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 <sal/types.h>
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
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<ToolBarManager>
|
||||
{
|
||||
public:
|
||||
/** Use this method instead of the constructor to create new objects of
|
||||
this class.
|
||||
*/
|
||||
static ::std::auto_ptr<ToolBarManager> Create (
|
||||
static ::boost::shared_ptr<ToolBarManager> 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<ToolBarManager>& rpManager)
|
||||
: mpManager(rpManager) { mpManager->LockUpdate(); }
|
||||
~UpdateLock(void) { mpManager->UnlockUpdate(); }
|
||||
private:
|
||||
ToolBarManager& mrManager;
|
||||
::boost::shared_ptr<ToolBarManager> mpManager;
|
||||
};
|
||||
friend class UpdateLock;
|
||||
|
||||
|
@ -289,7 +293,7 @@ public:
|
|||
|
||||
private:
|
||||
class Implementation;
|
||||
::std::auto_ptr<Implementation> mpImpl;
|
||||
::boost::scoped_ptr<Implementation> mpImpl;
|
||||
|
||||
/** The ViewShellBase is used to get the XLayoutManager and to determine
|
||||
the plug in mode.
|
||||
|
|
Loading…
Reference in a new issue