diff options
author | Michael Stahl <mst@apache.org> | 2011-09-17 21:43:23 +0000 |
---|---|---|
committer | Michael Stahl <mst@apache.org> | 2011-09-17 21:43:23 +0000 |
commit | be42404ba844436584f4f475f2553b53af49ffbc (patch) | |
tree | 9b2276bf3f2296dfb88ed737fa92fd7158fa654a /sd/inc | |
parent | b72e5fbd8b3bf9239510936a39ec170a4c82f1b8 (diff) |
slidesorter1: #i116014# Outliner holds ViewShell as weak_ptr.
# HG changeset patch
# User Andre Fischer<andre.f.fischer@oracle.com>
# Date 1300869929 -3600
# Node ID dd74093681332c51934ab449c4b7c9eaec89359a
# Parent bca8ed5c98e5c645a6c69c7fb90cd3da84627212
Diffstat (limited to 'sd/inc')
-rwxr-xr-x | sd/inc/Outliner.hxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 45db437e9370..2eeebaec4454 100755 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -35,6 +35,8 @@ #include <editeng/SpellPortions.hxx> #include <memory> #include <boost/shared_ptr.hpp> +#include <boost/weak_ptr.hpp> +#include <boost/noncopyable.hpp> class Dialog; class SdPage; @@ -104,7 +106,8 @@ class Window; </p> */ class Outliner - : public SdrOutliner + : public SdrOutliner, + public ::boost::noncopyable { public: friend class ::sd::outliner::OutlinerContainer; @@ -193,8 +196,11 @@ private: /// The view which displays the searched objects. ::sd::View* mpView; - /// The view shell containing the view. - ::boost::shared_ptr<ViewShell> mpViewShell; + /** The view shell containing the view. It is held as weak + pointer to avoid keeping it alive when the view is changed + during searching. + */ + ::boost::weak_ptr<ViewShell> mpWeakViewShell; /// This window contains the view. ::sd::Window* mpWindow; /// The document on whose objects and pages this class operates. @@ -346,11 +352,6 @@ private: */ bool mbPrepareSpellingPending; - /** In this flag we store whether the view shell is valid and may be - accessed. - */ - bool mbViewShellValid; - /** Initialize the object iterator. Call this method after being invoked from the search or spellcheck dialog. It creates a new iterator pointing at the current object when this has not been done |