summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-01 08:43:26 +0200
committerNoel Grandin <noel@peralex.com>2016-09-01 11:05:21 +0200
commitd1f2d52e21aff9bf0e70ed3da261102eaa609f54 (patch)
treee0b1a3d5e6939af452de5899f4bf16ae355e0625 /sc
parent3069878c60da990a603754ced4a64be4e7855538 (diff)
std::list<sal_Int32> to vector
Change-Id: I468689916e508e65cbe37d7b1123f47b63d9b08b
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.cxx8
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.hxx5
2 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
index 7d5677fffe98..c5bc808a120d 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
@@ -140,9 +140,8 @@ void ScMyOpenCloseColumnRowGroup::CloseGroup()
void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField)
{
ScMyFieldGroupVec::iterator aItr(aTableEnd.begin());
- ScMyFieldGroupVec::iterator aEndItr(aTableEnd.end());
bool bReady(false);
- while(!bReady && aItr != aEndItr)
+ while(!bReady && aItr != aTableEnd.end())
{
if (*aItr == nField)
{
@@ -158,8 +157,7 @@ sal_Int32 ScMyOpenCloseColumnRowGroup::GetLast()
{
sal_Int32 maximum(-1);
ScMyFieldGroupVec::iterator i(aTableEnd.begin());
- ScMyFieldGroupVec::iterator endi(aTableEnd.end());
- while (i != endi)
+ while (i != aTableEnd.end())
{
if (*i > maximum)
maximum = *i;
@@ -171,7 +169,7 @@ sal_Int32 ScMyOpenCloseColumnRowGroup::GetLast()
void ScMyOpenCloseColumnRowGroup::Sort()
{
aTableStart.sort();
- aTableEnd.sort();
+ std::sort(aTableEnd.begin(), aTableEnd.end());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
index 0ec24a7356a2..007e8a61df70 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLCOLUMNROWGROUPEXPORT_HXX
#include <list>
+#include <vector>
#include <rtl/ustring.hxx>
#include <sal/types.h>
@@ -34,8 +35,8 @@ struct ScMyColumnRowGroup
bool operator< (const ScMyColumnRowGroup& rGroup) const;
};
-typedef std::list <ScMyColumnRowGroup> ScMyColumnRowGroupVec;
-typedef std::list <sal_Int32> ScMyFieldGroupVec;
+typedef std::list<ScMyColumnRowGroup> ScMyColumnRowGroupVec;
+typedef std::vector<sal_Int32> ScMyFieldGroupVec;
class ScXMLExport;
class ScMyOpenCloseColumnRowGroup