summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-03-29 12:34:47 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-03-29 14:24:55 +0200
commitfaa6b71493a3a6be674a01243fc2f52db4398214 (patch)
tree2bc99b75f5171875bc824bdc37459f20fec5926e /sc
parentac520c337bd3799366a1fd1dbda0baabb299e3bc (diff)
do not provide non-const iterators for ScMarkData internals
It's a bad idea, and it's actually not needed. Change-Id: Ic1022bc4774a33abbc37158539881a15792bc282 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132266 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/markdata.hxx3
-rw-r--r--sc/source/ui/view/viewdata.cxx4
2 files changed, 2 insertions, 5 deletions
diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index ddc550f4bd42..80d683f168b1 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -158,11 +158,8 @@ public:
const ScRangeList& GetRightEnvelope() const { return aRightEnvelope; }
// iterators for table access
- typedef std::set<SCTAB>::iterator iterator;
typedef std::set<SCTAB>::const_iterator const_iterator;
typedef std::set<SCTAB>::const_reverse_iterator const_reverse_iterator;
- iterator begin() { return maTabMarked.begin(); }
- iterator end() { return maTabMarked.end(); }
const_iterator begin() const { return maTabMarked.begin(); }
const_iterator end() const { return maTabMarked.end(); }
const_reverse_iterator rbegin() const { return maTabMarked.rbegin(); }
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index b77172ce9ba8..d7aa279c7413 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1022,7 +1022,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, bool bAll )
std::vector< SCTAB > vTabs; // Empty for all tabs
if ( !bAll ) // get selected tabs
{
- ScMarkData::iterator itr = maMarkData.begin(), itrEnd = maMarkData.end();
+ ScMarkData::const_iterator itr = maMarkData.begin(), itrEnd = maMarkData.end();
vTabs.insert(vTabs.begin(), itr, itrEnd);
}
SetZoomType( eNew, vTabs );
@@ -1096,7 +1096,7 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, bool bAl
std::vector< SCTAB > vTabs;
if ( !bAll ) // get selected tabs
{
- ScMarkData::iterator itr = maMarkData.begin(), itrEnd = maMarkData.end();
+ ScMarkData::const_iterator itr = maMarkData.begin(), itrEnd = maMarkData.end();
vTabs.insert(vTabs.begin(), itr, itrEnd);
}
SetZoom( rNewX, rNewY, vTabs );