summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/macromgr.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
index 29e66cc5f1ab..4cb5e41403f8 100644
--- a/sc/source/ui/docshell/macromgr.cxx
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -77,7 +77,9 @@ public:
// Remove duplicates.
std::sort(rCellList.begin(), rCellList.end());
- std::unique(rCellList.begin(), rCellList.end());
+ auto last = std::unique(rCellList.begin(), rCellList.end());
+ rCellList.erase(last, rCellList.end());
+
// exception safe copy
vector<ScFormulaCell*> temp(rCellList);
rCells.swap(temp);