[Libreoffice-commits] core.git: editeng/source include/editeng
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 7 14:23:22 UTC 2021
editeng/source/editeng/impedit4.cxx | 2 +-
editeng/source/editeng/misspellrange.cxx | 4 ++--
editeng/source/outliner/outliner.cxx | 2 +-
editeng/source/outliner/outlobj.cxx | 8 ++++----
include/editeng/misspellrange.hxx | 2 +-
include/editeng/outlobj.hxx | 4 ++--
6 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit a5a6071264d27b9dcfa47fe2f399951edd7301c2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 6 21:01:06 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Oct 7 16:22:48 2021 +0200
loplugin:moveparam in editeng
Change-Id: Id8118e5f5b7acbff4f04935560c663b36093a5fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 879274a2a667..d6071f2a355a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1359,7 +1359,7 @@ void ImpEditEngine::GetAllMisspellRanges( std::vector<editeng::MisspellRanges>&
if (!pWrongList)
continue;
- aRanges.emplace_back(i, pWrongList->GetRanges());
+ aRanges.emplace_back(i, std::vector(pWrongList->GetRanges()));
}
aRanges.swap(rRanges);
diff --git a/editeng/source/editeng/misspellrange.cxx b/editeng/source/editeng/misspellrange.cxx
index 40fe5dd1b76e..562a9905c27d 100644
--- a/editeng/source/editeng/misspellrange.cxx
+++ b/editeng/source/editeng/misspellrange.cxx
@@ -13,8 +13,8 @@ namespace editeng {
MisspellRange::MisspellRange(size_t nStart, size_t nEnd) : mnStart(nStart), mnEnd(nEnd) {}
-MisspellRanges::MisspellRanges(sal_Int32 nParagraph, const std::vector<MisspellRange>& rRanges) :
- mnParagraph(nParagraph), maRanges(rRanges) {}
+MisspellRanges::MisspellRanges(sal_Int32 nParagraph, std::vector<MisspellRange>&& rRanges) :
+ mnParagraph(nParagraph), maRanges(std::move(rRanges)) {}
}
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 4eacd5d76d82..c827b13a5937 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -381,7 +381,7 @@ std::optional<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 nStartPa
aParagraphDataVector[nPara-nStartPara] = *GetParagraph(nPara);
}
- OutlinerParaObject aPObj(std::move(xText), aParagraphDataVector, bIsEditDoc);
+ OutlinerParaObject aPObj(std::move(xText), std::move(aParagraphDataVector), bIsEditDoc);
aPObj.SetOutlinerMode(GetOutlinerMode());
return aPObj;
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 0c0050ebaded..e6dc6e691c6c 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -29,9 +29,9 @@
#include <o3tl/safeint.hxx>
#include <libxml/xmlwriter.h>
-OutlinerParaObjData::OutlinerParaObjData( std::unique_ptr<EditTextObject> pEditTextObject, const ParagraphDataVector& rParagraphDataVector, bool bIsEditDoc ) :
+OutlinerParaObjData::OutlinerParaObjData( std::unique_ptr<EditTextObject> pEditTextObject, ParagraphDataVector&& rParagraphDataVector, bool bIsEditDoc ) :
mpEditTextObject(std::move(pEditTextObject)),
- maParagraphDataVector(rParagraphDataVector),
+ maParagraphDataVector(std::move(rParagraphDataVector)),
mbIsEditDoc(bIsEditDoc)
{
if( maParagraphDataVector.empty() && (mpEditTextObject->GetParagraphCount() != 0) )
@@ -62,8 +62,8 @@ bool OutlinerParaObjData::isWrongListEqual(const OutlinerParaObjData& rCompare)
}
OutlinerParaObject::OutlinerParaObject(
- std::unique_ptr<EditTextObject> xTextObj, const ParagraphDataVector& rParagraphDataVector, bool bIsEditDoc ) :
- mpImpl(OutlinerParaObjData(std::move(xTextObj), rParagraphDataVector, bIsEditDoc))
+ std::unique_ptr<EditTextObject> xTextObj, ParagraphDataVector&& rParagraphDataVector, bool bIsEditDoc ) :
+ mpImpl(OutlinerParaObjData(std::move(xTextObj), std::move(rParagraphDataVector), bIsEditDoc))
{
}
diff --git a/include/editeng/misspellrange.hxx b/include/editeng/misspellrange.hxx
index d67fc82f592c..f46c25e2261c 100644
--- a/include/editeng/misspellrange.hxx
+++ b/include/editeng/misspellrange.hxx
@@ -29,7 +29,7 @@ struct MisspellRanges
sal_Int32 mnParagraph;
std::vector<MisspellRange> maRanges;
- MisspellRanges(sal_Int32 nParagraph, const std::vector<MisspellRange>& rRanges);
+ MisspellRanges(sal_Int32 nParagraph, std::vector<MisspellRange>&& rRanges);
};
}
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx
index 8ba1dedb3f16..1703cf09cf34 100644
--- a/include/editeng/outlobj.hxx
+++ b/include/editeng/outlobj.hxx
@@ -44,7 +44,7 @@ struct EDITENG_DLLPUBLIC OutlinerParaObjData
bool mbIsEditDoc;
// constructor
- OutlinerParaObjData( std::unique_ptr<EditTextObject> pEditTextObject, const ParagraphDataVector& rParagraphDataVector, bool bIsEditDoc );
+ OutlinerParaObjData( std::unique_ptr<EditTextObject> pEditTextObject, ParagraphDataVector&& rParagraphDataVector, bool bIsEditDoc );
OutlinerParaObjData( const OutlinerParaObjData& r );
@@ -74,7 +74,7 @@ friend class std::optional<OutlinerParaObject>;
public:
// constructors/destructor
- OutlinerParaObject(std::unique_ptr<EditTextObject>, const ParagraphDataVector&, bool bIsEditDoc);
+ OutlinerParaObject(std::unique_ptr<EditTextObject>, ParagraphDataVector&&, bool bIsEditDoc);
OutlinerParaObject( std::unique_ptr<EditTextObject> );
OutlinerParaObject( const OutlinerParaObject&);
OutlinerParaObject(OutlinerParaObject&&) noexcept;
More information about the Libreoffice-commits
mailing list