summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-30 19:02:14 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-30 22:07:47 +0100
commitfe25701ae9bdf3b762967f084d5e78166f681e54 (patch)
tree5c6fa80b93dd8bd27667309b08ac0f0d6a814c97 /sc
parenta08b519ef1fe4dc3ffd6ab8884068b5db38e1100 (diff)
cid#1545421 COPY_INSTEAD_OF_MOVE
and cid#1545403 COPY_INSTEAD_OF_MOVE cid#1545397 COPY_INSTEAD_OF_MOVE cid#1545376 COPY_INSTEAD_OF_MOVE cid#1545339 COPY_INSTEAD_OF_MOVE cid#1545288 COPY_INSTEAD_OF_MOVE Change-Id: I0e24a3fc7148d0b7ff8126debe3cddbb4fbdd713 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161453 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/charthelper.cxx3
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx4
2 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 82e11c055077..df6c825a31d3 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -393,8 +393,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument& rDoc, co
ScChartListenerCollection* pCollection = rDoc.GetChartListenerCollection();
if (pCollection && !pCollection->findByName(aChartName))
{
- ScRangeList aRangeList( rRangesVector[ nRangeList++ ] );
- ScRangeListRef rRangeList( new ScRangeList( aRangeList ) );
+ ScRangeListRef rRangeList(new ScRangeList(rRangesVector[nRangeList++]));
ScChartListener* pChartListener = new ScChartListener( aChartName, rDoc, rRangeList );
pCollection->insert( pChartListener );
pChartListener->StartListeningTo();
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index b90a3a664ba2..2e5b9f844a0e 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -64,7 +64,7 @@ namespace
// global functions (->at the end of the file):
static bool lcl_CheckRepeatString( std::u16string_view aStr, const ScDocument& rDoc, bool bIsRow, ScRange* pRange );
-static void lcl_GetRepeatRangeString( std::optional<ScRange> oRange, const ScDocument& rDoc, bool bIsRow, OUString& rStr );
+static void lcl_GetRepeatRangeString( const std::optional<ScRange>& oRange, const ScDocument& rDoc, bool bIsRow, OUString& rStr );
#if 0
// this method is useful when debugging address flags.
@@ -763,7 +763,7 @@ static bool lcl_CheckRepeatString( std::u16string_view aStr, const ScDocument& r
return true;
}
-static void lcl_GetRepeatRangeString( std::optional<ScRange> oRange, const ScDocument& rDoc, bool bIsRow, OUString& rStr )
+static void lcl_GetRepeatRangeString( const std::optional<ScRange>& oRange, const ScDocument& rDoc, bool bIsRow, OUString& rStr )
{
rStr.clear();
if (!oRange)