[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 4 12:05:30 UTC 2021
sc/source/filter/xml/xmlimprt.cxx | 8 ++++----
sc/source/filter/xml/xmlimprt.hxx | 6 +++---
sc/source/filter/xml/xmllabri.cxx | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 55c676623310ab8a44e426186f4339f6efd118dd
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Sep 3 20:38:48 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Sep 4 14:04:57 2021 +0200
no need to allocate ScMyLabelRange with unique_ptr
Change-Id: I67b7b865d3c48e31e5efff5151c516ca7c51fd27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 4c70da01c1ec..967f1049f811 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1233,17 +1233,17 @@ void ScXMLImport::SetLabelRanges()
table::CellRangeAddress aLabelRange;
table::CellRangeAddress aDataRange;
- for (const auto& rxLabelRange : maMyLabelRanges)
+ for (const auto& rLabelRange : maMyLabelRanges)
{
sal_Int32 nOffset1(0);
sal_Int32 nOffset2(0);
FormulaGrammar::AddressConvention eConv = FormulaGrammar::CONV_OOO;
assert(pDoc);
- if (ScRangeStringConverter::GetRangeFromString( aLabelRange, rxLabelRange->sLabelRangeStr, *pDoc, eConv, nOffset1 ) &&
- ScRangeStringConverter::GetRangeFromString( aDataRange, rxLabelRange->sDataRangeStr, *pDoc, eConv, nOffset2 ))
+ if (ScRangeStringConverter::GetRangeFromString( aLabelRange, rLabelRange.sLabelRangeStr, *pDoc, eConv, nOffset1 ) &&
+ ScRangeStringConverter::GetRangeFromString( aDataRange, rLabelRange.sDataRangeStr, *pDoc, eConv, nOffset2 ))
{
- if ( rxLabelRange->bColumnOrientation )
+ if ( rLabelRange.bColumnOrientation )
xColRanges->addNew( aLabelRange, aDataRange );
else
xRowRanges->addNew( aLabelRange, aDataRange );
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 596f8b5c5972..79c2dd9e4d75 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -82,7 +82,7 @@ struct ScMyLabelRange
bool bColumnOrientation;
};
-typedef std::list< std::unique_ptr<const ScMyLabelRange> > ScMyLabelRanges;
+typedef std::list<ScMyLabelRange> ScMyLabelRanges;
struct ScMyImportValidation
{
@@ -230,9 +230,9 @@ public:
void AddNamedExpression(SCTAB nTab, ScMyNamedExpression aNamedExp);
- void AddLabelRange(std::unique_ptr<const ScMyLabelRange> pMyLabelRange)
+ void AddLabelRange(ScMyLabelRange aMyLabelRange)
{
- maMyLabelRanges.push_back(std::move(pMyLabelRange));
+ maMyLabelRanges.push_back(std::move(aMyLabelRange));
}
void AddValidation(const ScMyImportValidation& rValidation) { maValidations.push_back(rValidation); }
diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx
index 07d8a0c6c042..e1289e4c1aaf 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -89,10 +89,10 @@ void SAL_CALL ScXMLLabelRangeContext::endFastElement( sal_Int32 /*nElement*/ )
// Label ranges must be stored as strings until all sheets are loaded
// (like named expressions).
- auto pLabelRange = std::make_unique<ScMyLabelRange>(
+ ScMyLabelRange aLabelRange(
ScMyLabelRange{sLabelRangeStr, sDataRangeStr, bColumnOrientation});
- GetScImport().AddLabelRange(std::move(pLabelRange));
+ GetScImport().AddLabelRange(std::move(aLabelRange));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list