diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-07-14 09:18:57 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-07-14 09:18:57 +0000 |
commit | 52ec808902c828beed66965b1290cba71afa4147 (patch) | |
tree | 01a15b3fc5d9bccddcdd6f47cac6920490543db3 /sd/source/ui/toolpanel/ControlContainer.cxx | |
parent | 2673f87d5c518905b2016528cebca142e0d7343c (diff) |
INTEGRATION: CWS impress51 (1.5.40); FILE MERGED
2005/05/20 14:21:12 af 1.5.40.3: #i48247# Added missing guard of mpNode being NULL.
2005/05/18 11:49:25 af 1.5.40.2: #i48247# Not calling back to TreeNode when that already has been destroyed.
2005/05/04 14:47:49 af 1.5.40.1: #i48247# Calling listeners when adding and removing children.
Diffstat (limited to 'sd/source/ui/toolpanel/ControlContainer.cxx')
-rw-r--r-- | sd/source/ui/toolpanel/ControlContainer.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sd/source/ui/toolpanel/ControlContainer.cxx b/sd/source/ui/toolpanel/ControlContainer.cxx index 859a842c607f..e5834a72d0a5 100644 --- a/sd/source/ui/toolpanel/ControlContainer.cxx +++ b/sd/source/ui/toolpanel/ControlContainer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ControlContainer.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: vg $ $Date: 2005-03-23 14:02:26 $ + * last change: $Author: kz $ $Date: 2005-07-14 10:18:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -58,12 +58,11 @@ * * ************************************************************************/ -#include "ControlContainer.hxx" -#include "TitledControl.hxx" -#ifdef DEBUG -#include "../inc/TextLogger.hxx" -#endif +#include "taskpane/ControlContainer.hxx" + +#include "taskpane/TaskPaneTreeNode.hxx" + #include <vcl/window.hxx> #ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> @@ -84,6 +83,8 @@ ControlContainer::ControlContainer (TreeNode* pNode) ControlContainer::~ControlContainer (void) { + // Set mpNode to NULL so that no one calls it from now on. + mpNode = NULL; DeleteChildren(); } @@ -97,8 +98,10 @@ void ControlContainer::DeleteChildren (void) for (I=maControlList.begin(); I!=Iend; ++I) delete *I; maControlList.clear(); -} + if (mpNode != NULL) + mpNode->FireStateChangeEvent(EID_ALL_CHILDREN_REMOVED); +} @@ -113,6 +116,9 @@ sal_uInt32 ControlContainer::AddControl (::std::auto_ptr<TreeNode> pControl) ListHasChanged (); + if (mpNode != NULL) + mpNode->FireStateChangeEvent(EID_CHILD_ADDED, pControl.get()); + return nIndex; } |