diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-03 21:42:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-20 15:22:48 +0100 |
commit | 7919625d8103a75dec30ba8ee216105528e0a15b (patch) | |
tree | c48515881b518ae489a32a27269fe9fbfc1b2f6e | |
parent | cedbc8f534b149a609b95380568035453faa5078 (diff) |
configitem leak: if we create a FrameView we presumably have to delete it
-rw-r--r-- | sd/source/ui/inc/SlideSorterViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx index f8e0bdb03e85..1a5ab8261c48 100644 --- a/sd/source/ui/inc/SlideSorterViewShell.hxx +++ b/sd/source/ui/inc/SlideSorterViewShell.hxx @@ -199,6 +199,8 @@ private: ::boost::shared_ptr<SlideSorter> mpSlideSorter; bool mbIsArrangeGUIElementsPending; + bool m_bCreatedOwnFrameView; + SlideSorterViewShell ( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 17cbe0b6d9e2..ee66b10c1825 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -136,9 +136,15 @@ SlideSorterViewShell::SlideSorterViewShell ( meShellType = ST_SLIDE_SORTER; if (pFrameViewArgument != NULL) + { mpFrameView = pFrameViewArgument; + m_bCreatedOwnFrameView = false; + } else + { mpFrameView = new FrameView(GetDoc()); + m_bCreatedOwnFrameView = true; + } GetFrameView()->Connect(); SetName (String (RTL_CONSTASCII_USTRINGPARAM("SlideSorterViewShell"))); @@ -171,6 +177,8 @@ SlideSorterViewShell::~SlideSorterViewShell (void) (void)e; OSL_FAIL("sd::SlideSorterViewShell::~SlideSorterViewShell(), exception caught!" ); } + if (m_bCreatedOwnFrameView) + delete mpFrameView; } |