summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-28 22:33:29 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-29 22:00:48 -0400
commit9832a2482f157d34f7323327dc20eaf5e11da3fd (patch)
tree6e03b6b7eb4f6144184007486aa6797802cb04db /basic
parentad9e67a7c08f9ceb3b4c228e3d9241c4ed54a7c8 (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 (cherry picked from commit a916b6ff7fdf1bcb1182e72e4a5bf2f901c698da)
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sb.cxx16
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