summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-02 21:03:21 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-10-02 21:06:04 +0200
commit62d542e9b1bb1b442562951d21100fd61be5f0c7 (patch)
tree866c33719243c2f0a2c58d3da22071f93348f5e6 /sc
parent0fd2e787974853b48c54ed7a165ee7edda80af64 (diff)
Remove undefined elements after std::unique
Change-Id: Ifebd1124fa081d50797904175d90e6d26d50ab7f
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);