diff options
author | Oliver Bolte <obo@openoffice.org> | 2007-01-23 06:14:31 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2007-01-23 06:14:31 +0000 |
commit | c18b99ee6039448678d869fcee53ddeb38c7845a (patch) | |
tree | 5e8670ec80762861d0ae12ead99f69520ed65d97 /sfx2 | |
parent | c087c7b5a113d7338e1f5431415365439f3ca2d8 (diff) |
INTEGRATION: CWS fwk58 (1.27.44); FILE MERGED
2006/12/06 17:16:07 mba 1.27.44.1: #138817#: listen for destruction of bindings also for floating windows
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index fc41b3396f29..5e142b618f03 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -4,9 +4,9 @@ * * $RCSfile: basedlgs.cxx,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: vg $ $Date: 2006-11-01 18:26:52 $ + * last change: $Author: obo $ $Date: 2007-01-23 07:14:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -93,14 +93,28 @@ void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } -class SfxFloatingWindow_Impl +class SfxFloatingWindow_Impl : public SfxListener { public: ByteString aWinState; SfxChildWindow* pMgr; BOOL bConstructed; + void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); }; +void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint ) +{ + if ( rHint.IsA(TYPE(SfxSimpleHint)) ) + { + switch( ( (SfxSimpleHint&) rHint ).GetId() ) + { + case SFX_HINT_DYING: + pMgr->Destroy(); + break; + } + } +} + // class SfxModalDefParentHelper ----------------------------------------- SfxModalDefParentHelper::SfxModalDefParentHelper( Window *pWindow) @@ -522,6 +536,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, sal_uInt32 nId = GetHelpId(); SetHelpId(0); SetUniqueId( nId ); + if ( pBindinx ) + pImp->StartListening( *pBindinx ); } // ----------------------------------------------------------------------- @@ -539,6 +555,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, sal_uInt32 nId = GetHelpId(); SetHelpId(0); SetUniqueId( nId ); + if ( pBindinx ) + pImp->StartListening( *pBindinx ); } //------------------------------------------------------------------------- |