summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-11-25 10:15:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-25 10:15:50 +0000
commit88e5419578e282461fb7c1a9f697f731aabef400 (patch)
tree5635cc44e6889fb5a49febffe8120c9318184635 /sc
parent91aff4d665e1c683ba40209d6ddf8699d93f7918 (diff)
cppcheck: methods can be const
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx10
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.hxx8
2 files changed, 10 insertions, 8 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 79c0d24eb1f8..436747afff91 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -746,18 +746,20 @@ sal_Bool ScRowFormatRanges::GetNext(ScMyRowFormatRange& aFormatRange)
return sal_False;
}
-sal_Int32 ScRowFormatRanges::GetMaxRows()
+sal_Int32 ScRowFormatRanges::GetMaxRows() const
{
- ScMyRowFormatRangesList::iterator aItr(aRowFormatRanges.begin());
- ScMyRowFormatRangesList::iterator aEndItr(aRowFormatRanges.end());
+ ScMyRowFormatRangesList::const_iterator aItr(aRowFormatRanges.begin());
+ ScMyRowFormatRangesList::const_iterator aEndItr(aRowFormatRanges.end());
sal_Int32 nMaxRows = MAXROW + 1;
if (aItr != aEndItr)
+ {
while (aItr != aEndItr)
{
if ((*aItr).nRepeatRows < nMaxRows)
nMaxRows = (*aItr).nRepeatRows;
++aItr;
}
+ }
else
{
DBG_ERROR("no ranges found");
@@ -765,7 +767,7 @@ sal_Int32 ScRowFormatRanges::GetMaxRows()
return nMaxRows;
}
-sal_Int32 ScRowFormatRanges::GetSize()
+sal_Int32 ScRowFormatRanges::GetSize() const
{
return nSize;
}
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index bf7ab6303de1..c5d17f007b3f 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -139,8 +139,8 @@ public:
const sal_Int32 nLastRow, const sal_Int32 nLastCol,
const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc);
- const ScMyDefaultStyleList* GetRowDefaults() { return pRowDefaults; }
- const ScMyDefaultStyleList* GetColDefaults() { return pColDefaults; }
+ const ScMyDefaultStyleList* GetRowDefaults() const { return pRowDefaults; }
+ const ScMyDefaultStyleList* GetColDefaults() const { return pColDefaults; }
};
struct ScMyRowFormatRange
@@ -177,8 +177,8 @@ public:
void Clear();
void AddRange(ScMyRowFormatRange& rFormatRange, const sal_Int32 nStartRow);
sal_Bool GetNext(ScMyRowFormatRange& rFormatRange);
- sal_Int32 GetMaxRows();
- sal_Int32 GetSize();
+ sal_Int32 GetMaxRows() const;
+ sal_Int32 GetSize() const;
void Sort();
};