diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-27 21:29:30 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-27 21:35:02 -0500 |
commit | cf70996311af2081b2e5920ad27094a0774bdd05 (patch) | |
tree | c318d2299dc9f9212d9bb06a161c918bfe624434 /sc/qa | |
parent | 03f7a342011a4f69cfcbec7af3e4f1a2e835618b (diff) |
Remove all uses of GetMarkRowRanges() and use GetMarkedRowSpans().
And ditto with its column variant. The former created a heap array of
1 million elements (=MAXROWCOUNT). There is no need for this memory
wastage.
Change-Id: I07845966c51cdcbdc676cd0d249f6420a19b9c5e
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 474700bd8e97..4df450cd01eb 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -48,6 +48,7 @@ #include "dpsave.hxx" #include "dpshttab.hxx" #include <scopetools.hxx> +#include <columnspanset.hxx> #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/drawing/XControlShape.hpp> @@ -2335,12 +2336,11 @@ void ScFiltersTest::testOptimalHeightReset() nHeight = sc::TwipsToHMM( pDoc->GetRowHeight(nRow, nTab, false) ); // set optimal height for empty row 2 - SCCOLROW nRowArr[2]; - nRowArr[0] = nRowArr[1] = 2; - rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, true, true ); + std::vector<sc::ColRowSpan> aRowArr(1, sc::ColRowSpan(2,2)); + rFunc.SetWidthOrHeight(false, aRowArr, nTab, SC_SIZE_OPTIMAL, 0, true, true); // retrieve optimal height - int nOptimalHeight = sc::TwipsToHMM( pDoc->GetRowHeight( nRowArr[0], nTab, false) ); + int nOptimalHeight = sc::TwipsToHMM( pDoc->GetRowHeight(aRowArr[0].mnStart, nTab, false) ); // check if the new height of A1 ( after delete ) is now the optimal height of an empty cell CPPUNIT_ASSERT_EQUAL(nOptimalHeight, nHeight ); |