summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-30 12:19:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-02 13:04:57 +0200
commit1463625ae26900d2461fd72a5a2c894b9f1b8726 (patch)
tree7639fb6a495920de972f1cae4c9c99a7aaaa77db /sc/inc
parentfae405c522ce95bdfaedcbcae407226b4e1c487d (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')
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/table.hxx3
2 files changed, 4 insertions, 1 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 45f450e59462..6e91927719a4 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2322,7 +2322,7 @@ public:
void SwapNonEmpty( sc::TableValues& rValues );
void finalizeOutlineImport();
- ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
+ SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
private:
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;