WIP : tdf#120270 : ScUndoDragDrop - Notifying listeners of the area...

is not enough. This needs to be done recursively, ie notify the
listeners, notify the listeners of the listeners and so on.
ScDocument::BroadcastCells() seems to do exactly that, so lets
use it here intead of collect+notify.

But the removal of duplicate listeners is probably not done in
BroadcastCells(). Need some work on that, else this may cause
performance issues.

Change-Id: Ifa273fea5f08af661958cd9b4c3d01d9044b8727
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 1393a8b..3bcd41b8 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1382,17 +1382,7 @@ void ScUndoDragDrop::Undo()
        DoUndo(aDestRange);
        DoUndo(aSrcRange);

        // Notify all area listeners whose listened areas are partially moved, to
        // recalculate.
        std::vector<SvtListener*> aListeners;
        rDoc.CollectAllAreaListeners(aListeners, aSrcRange, sc::AreaPartialOverlap);

        // Remove any duplicate listener entries.  We must ensure that we notify
        // each unique listener only once.
        std::sort(aListeners.begin(), aListeners.end());
        aListeners.erase(std::unique(aListeners.begin(), aListeners.end()), aListeners.end());

        std::for_each(aListeners.begin(), aListeners.end(), DataChangeNotifier());
        rDoc.BroadcastCells(aSrcRange, SfxHintId::ScDataChanged, false);
    }
    else
        DoUndo(aDestRange);