diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-25 16:49:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-26 07:30:35 +0100 |
commit | 276c722b0c13d84756da8e06fb94f58810c8849a (patch) | |
tree | 5e13c45c446b7485bb053553d929cc158f59b6e7 /sc | |
parent | 6c0f5f7f2a6cc122a738deb0a17353cca1cd5c7e (diff) |
flatten TabRanges
no need to declare this separately, saves one pointer hop
Change-Id: I14fd82a9448c43ddfa0b6179a3b79cf6d364130d
Reviewed-on: https://gerrit.libreoffice.org/69687
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dociter.hxx | 2 | ||||
-rw-r--r-- | sc/inc/segmenttree.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dociter.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/segmenttree.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlrowi.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index 77541cec1511..5bb957059b03 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -567,7 +567,7 @@ public: struct TabRanges { SCTAB mnTab; - std::shared_ptr<ScFlatBoolRowSegments> mpRanges; + ScFlatBoolRowSegments maRanges; TabRanges(SCTAB nTab); }; diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx index 8a7eb1ae0a8d..8414176d125d 100644 --- a/sc/inc/segmenttree.hxx +++ b/sc/inc/segmenttree.hxx @@ -56,11 +56,11 @@ public: class RangeIterator { public: - explicit RangeIterator(ScFlatBoolRowSegments& rSegs); + explicit RangeIterator(ScFlatBoolRowSegments const & rSegs); bool getFirst(RangeData& rRange); bool getNext(RangeData& rRange); private: - ScFlatBoolRowSegments& mrSegs; + ScFlatBoolRowSegments const & mrSegs; }; ScFlatBoolRowSegments(); diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 5031caa5666b..d9bb1c415b8e 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -2511,7 +2511,7 @@ const ScPatternAttr* ScDocAttrIterator::GetNext( SCCOL& rCol, SCROW& rRow1, SCRO } ScDocRowHeightUpdater::TabRanges::TabRanges(SCTAB nTab) : - mnTab(nTab), mpRanges(new ScFlatBoolRowSegments) + mnTab(nTab) { } @@ -2537,7 +2537,7 @@ void ScDocRowHeightUpdater::update() continue; ScFlatBoolRowSegments::RangeData aData; - ScFlatBoolRowSegments::RangeIterator aRangeItr(*rTabRanges.mpRanges); + ScFlatBoolRowSegments::RangeIterator aRangeItr(rTabRanges.maRanges); for (bool bFound = aRangeItr.getFirst(aData); bFound; bFound = aRangeItr.getNext(aData)) { if (!aData.mbValue) @@ -2559,7 +2559,7 @@ void ScDocRowHeightUpdater::update() sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev); ScFlatBoolRowSegments::RangeData aData; - ScFlatBoolRowSegments::RangeIterator aRangeItr(*rTabRanges.mpRanges); + ScFlatBoolRowSegments::RangeIterator aRangeItr(rTabRanges.maRanges); for (bool bFound = aRangeItr.getFirst(aData); bFound; bFound = aRangeItr.getNext(aData)) { if (!aData.mbValue) diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx index e7b35ea5dfd5..b47f1e7b9f3c 100644 --- a/sc/source/core/data/segmenttree.cxx +++ b/sc/source/core/data/segmenttree.cxx @@ -318,7 +318,7 @@ bool ScFlatBoolRowSegments::ForwardIterator::getValue(SCROW nPos, bool& rVal) return true; } -ScFlatBoolRowSegments::RangeIterator::RangeIterator(ScFlatBoolRowSegments& rSegs) : +ScFlatBoolRowSegments::RangeIterator::RangeIterator(ScFlatBoolRowSegments const & rSegs) : mrSegs(rSegs) { } diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index e2729da7c2c9..e0b6480a7fb3 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -210,7 +210,7 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/) rRecalcRanges.emplace_back(0); } rRecalcRanges.at(nSheet).mnTab = nSheet; - rRecalcRanges.at(nSheet).mpRanges->setTrue(nFirstRow, nCurrentRow); + rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow); } } } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 8e66516e2442..298c8197e6a4 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1361,7 +1361,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) ScDocRowHeightUpdater::TabRanges aRecalcRanges(0); ErrCode eError = DBaseImport( rMedium.GetPhysicalName(), - ScGlobal::GetCharsetValue(sItStr), aColWidthParam, *aRecalcRanges.mpRanges ); + ScGlobal::GetCharsetValue(sItStr), aColWidthParam, aRecalcRanges.maRanges ); aRecalcRowRangesArray.push_back(aRecalcRanges); if (eError != ERRCODE_NONE) |