sc-perf: StartAllListeners: bail out early in cliboard or undo document
... and do not attempt to execute the overhead for all columns in the range
just to do nothing.
Change-Id: I88d26895cf641e8c71d7ccdf5534de8008070e61
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 4d59838..8964999 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -469,6 +469,9 @@ void ScDocument::StartNeededListeners( const std::shared_ptr<const sc::ColumnSet
void ScDocument::StartAllListeners( const ScRange& rRange )
{
if (IsClipOrUndo() || GetNoListening())
return;
std::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*this));
sc::StartListeningContext aStartCxt(*this, pPosSet);
sc::EndListeningContext aEndCxt(*this, pPosSet);