summaryrefslogtreecommitdiff
path: root/sc/source/core/data/document10.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-11-21 11:57:23 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-11-21 11:58:53 -0500
commit880f94b86ad8559081839fc444bfa1a589fdec29 (patch)
tree7e9925dc131398ce75c8f2d61dddc36b1c9c6d7c /sc/source/core/data/document10.cxx
parentf085b0ab07edbf812a179a5679487386834fe38a (diff)
Handle group area listeners correctly when deleting cells.
Change-Id: Ic37084ed670f53e0354056f7bef54229971dd7c2
Diffstat (limited to 'sc/source/core/data/document10.cxx')
-rw-r--r--sc/source/core/data/document10.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index c426a196cf56..48e933c9dfc5 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -384,4 +384,26 @@ void ScDocument::SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArra
}
}
+namespace {
+
+class StartNeededListenersHandler : std::unary_function<ScTable*, void>
+{
+ boost::shared_ptr<sc::StartListeningContext> mpCxt;
+public:
+ StartNeededListenersHandler( ScDocument& rDoc ) : mpCxt(new sc::StartListeningContext(rDoc)) {}
+
+ void operator() (ScTable* p)
+ {
+ if (p)
+ p->StartListeners(*mpCxt, false);
+ }
+};
+
+}
+
+void ScDocument::StartNeededListeners()
+{
+ std::for_each(maTabs.begin(), maTabs.end(), StartNeededListenersHandler(*this));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */