diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-30 12:19:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-02 13:04:57 +0200 |
commit | 1463625ae26900d2461fd72a5a2c894b9f1b8726 (patch) | |
tree | 7639fb6a495920de972f1cae4c9c99a7aaaa77db /sc/inc/table.hxx | |
parent | fae405c522ce95bdfaedcbcae407226b4e1c487d (diff) |
dynamic column container: fix some more for loops
and add reverse-iterator functionality
Change-Id: Ide7ee9d2152871d414246303d76c91da36557524
Reviewed-on: https://gerrit.libreoffice.org/41727
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r-- | sc/inc/table.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 3113ef6d8cd0..4c734c7d7823 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -132,6 +132,7 @@ class ScColumnsRange final explicit Iterator(std::vector<ScColumn*>::const_iterator colIter) : maColIter(colIter) {} Iterator& operator++() { maColIter++; return *this;} + Iterator& operator--() { maColIter--; return *this;} bool operator==(Iterator other) const {return maColIter == other.maColIter;} bool operator!=(Iterator other) const {return !(*this == other);} @@ -141,6 +142,8 @@ class ScColumnsRange final ScColumnsRange(Iterator nBegin, Iterator nEnd) : maBegin(nBegin), maEnd(nEnd) {} const Iterator & begin() { return maBegin; } const Iterator & end() { return maEnd; } + std::reverse_iterator<Iterator> rbegin() { return std::reverse_iterator<Iterator>(maEnd); } + std::reverse_iterator<Iterator> rend() { return std::reverse_iterator<Iterator>(maBegin); } private: const Iterator maBegin; const Iterator maEnd; |