diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-28 22:33:29 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-29 21:59:48 -0400 |
commit | a916b6ff7fdf1bcb1182e72e4a5bf2f901c698da (patch) | |
tree | 3ce23438a1975e9f46988db9e1f9fadd64d9da4a /basic | |
parent | 5a827671d16ff5e927fc3dd4a01e6c32ea05d891 (diff) |
Detach all DocBasicItem objects upon process termination.
To prevent rogue DocBasicItem objects (which are global objects) from
attempting to stop listening after the main app is dead.
Change-Id: I68a667137ca4e0eff18278f4d2d5dd67466eaf34
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 3d3842840b32..922df3e82b8e 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -80,6 +80,11 @@ public: void startListening(); void stopListening(); + void setDisposed( bool bDisposed ) + { + mbDisposed = bDisposed; + } + virtual void SAL_CALL queryClosing( const lang::EventObject& rSource, sal_Bool bGetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL notifyClosing( const lang::EventObject& rSource ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -2007,7 +2012,16 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic ) return xModel; } - +void StarBASIC::DetachAllDocBasicItems() +{ + DocBasicItemMap& rItems = GaDocBasicItems::get(); + DocBasicItemMap::iterator it = rItems.begin(), itEnd = rItems.end(); + for (; it != itEnd; ++it) + { + DocBasicItemRef xItem = it->second; + xItem->setDisposed(true); + } +} // #118116 Implementation Collection object |