summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-09 17:28:19 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-11 14:54:14 +0200
commitb1fe17f280b24e78e7ee55d4762dc64a98d6f302 (patch)
tree819aecb52d9c92a3cf6b640c52da8cfcf6a077fa /sc/source/core/data
parent51178765e8afe33ebbb2016219cff869d88ca07f (diff)
Simplify Sequences initializations (sc)
Change-Id: I0c581b3a900a6b89c0f4e203310d65600545987f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116929 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/dptabsrc.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b74bfd0ba152..1950c8500d39 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -410,9 +410,7 @@ uno::Sequence<double> ScDPSource::getFilteredResults(
double fVal = maResFilterSet.getLeafResult(aFilters[0]);
if (!std::isnan(fVal))
{
- uno::Sequence<double> aRet(1);
- aRet[0] = fVal;
- return aRet;
+ return { fVal };
}
}
@@ -1988,7 +1986,7 @@ uno::Sequence<sheet::MemberResult> SAL_CALL ScDPLevel::getResults()
if (pRes)
return *pRes;
- return uno::Sequence<sheet::MemberResult>(0); //TODO: Error?
+ return {}; //TODO: Error?
}
OUString SAL_CALL ScDPLevel::getName()
@@ -2059,7 +2057,7 @@ uno::Sequence<sal_Int16> ScDPLevel::getSubTotals() const
tools::Long nSrcDim = pSource->GetSourceDim( nDim );
if ( !pSource->SubTotalAllowed( nSrcDim ) )
- return uno::Sequence<sal_Int16>(0);
+ return {};
return aSubTotals;
}