diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-15 13:23:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-15 13:26:10 +0100 |
commit | 1cb01c477cf1e84f6e1b2ca1771a9af53d81dc59 (patch) | |
tree | e0f02913facb084320853801d40290b33e75d0b1 /sc/source/ui/view/viewfun3.cxx | |
parent | a1077b3cbdb847a452fccd15d9b834bc262cfb62 (diff) |
Resolves: fdo#47958 shrink cut/paste more and rework a bit
I'm concerned that the scoping of the dtor will cause events to happen in
different order to the original. So rework the require explicit Notify calls
rather than implicit dtor calls instead of going about the place putting in
scoping brackets
Change-Id: I7f3ac4ef3c073da74a9cc49888a59dec12805b0f
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 6698164fca99..5f4dac21e73e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1703,23 +1703,24 @@ void ScViewFunc::PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMark SelectionChanged(); + ScModelObj* pModelObj = HelperNotifyChanges::getMustPropagateChangesModel(*pDocSh); + if (!pModelObj) + return; + ScRangeList aChangeRanges; - HelperNotifyChanges aHelperNotifyChanges(&aChangeRanges, "cell-change"); - if (aHelperNotifyChanges.getMustPropagateChanges()) + for (size_t i = 0, n = rPasteRanges.size(); i < n; ++i) { - for (size_t i = 0, n = rPasteRanges.size(); i < n; ++i) + const ScRange& r = *rPasteRanges[i]; + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - const ScRange& r = *rPasteRanges[i]; - ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); - for (; itr != itrEnd; ++itr) - { - ScRange aChangeRange(r); - aChangeRange.aStart.SetTab(*itr); - aChangeRange.aEnd.SetTab(*itr); - aChangeRanges.Append(aChangeRange); - } + ScRange aChangeRange(r); + aChangeRange.aStart.SetTab(*itr); + aChangeRange.aEnd.SetTab(*itr); + aChangeRanges.Append(aChangeRange); } } + HelperNotifyChanges::Notify(*pModelObj, aChangeRanges); } |