summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-19 16:55:35 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-19 16:55:35 +0100
commit40af27d941ab578a341eefc63163b92d399262e7 (patch)
treeb14c91bfa447356ed378a41e3cc0288f4f0247d9
parent94deef9b29346a027b88f934b0ca83ef6a8bf846 (diff)
even simpler way to get the whole range
-rw-r--r--sc/source/core/data/clipparam.cxx23
1 files changed, 1 insertions, 22 deletions
diff --git a/sc/source/core/data/clipparam.cxx b/sc/source/core/data/clipparam.cxx
index 002e0c4ee264..3935141976af 100644
--- a/sc/source/core/data/clipparam.cxx
+++ b/sc/source/core/data/clipparam.cxx
@@ -112,28 +112,7 @@ SCROW ScClipParam::getPasteRowSize()
ScRange ScClipParam::getWholeRange() const
{
- ScRange aWhole;
- size_t nRangeSize = maRanges.size();
- if (nRangeSize < 1)
- return aWhole;
- aWhole = *maRanges[0];
- for ( size_t i = 1; i < nRangeSize; ++i )
- {
- const ScRange* p = maRanges[i];
-
- if (aWhole.aStart.Col() > p->aStart.Col())
- aWhole.aStart.SetCol(p->aStart.Col());
-
- if (aWhole.aStart.Row() > p->aStart.Row())
- aWhole.aStart.SetRow(p->aStart.Row());
-
- if (aWhole.aEnd.Col() < p->aEnd.Col())
- aWhole.aEnd.SetCol(p->aEnd.Col());
-
- if (aWhole.aEnd.Row() < p->aEnd.Row())
- aWhole.aEnd.SetRow(p->aEnd.Row());
- }
- return aWhole;
+ return maRanges.Combine();
}
void ScClipParam::transpose()