loplugin:moveparam in editeng

Change-Id: I08aed09b0acd283d700bdf75f650e93dba7c7b85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123341
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-10-10 17:31:04 +02:00
parent e3fc69457d
commit 6af0da482d
8 changed files with 14 additions and 14 deletions

View File

@@ -68,7 +68,7 @@ public:
WrongList();
const std::vector<editeng::MisspellRange>& GetRanges() const { return maRanges;}
void SetRanges( const std::vector<editeng::MisspellRange>& rRanges );
void SetRanges( std::vector<editeng::MisspellRange>&& rRanges );
bool IsValid() const;
void SetValid();

View File

@@ -56,9 +56,9 @@ namespace accessibility
// owner is responsible for possible child death
}
void AccessibleParaManager::SetAdditionalChildStates( const VectorOfStates& rChildStates )
void AccessibleParaManager::SetAdditionalChildStates( VectorOfStates&& rChildStates )
{
maChildStates = rChildStates;
maChildStates = std::move(rChildStates);
}
void AccessibleParaManager::SetNum( sal_Int32 nNumParas )

View File

@@ -150,9 +150,9 @@ void EditSpellWrapper::CheckSpellTo()
WrongList::WrongList() : mnInvalidStart(0), mnInvalidEnd(Valid) {}
void WrongList::SetRanges( const std::vector<editeng::MisspellRange>& rRanges )
void WrongList::SetRanges( std::vector<editeng::MisspellRange>&&rRanges )
{
maRanges = rRanges;
maRanges = std::move(rRanges);
}
bool WrongList::IsValid() const

View File

@@ -1376,7 +1376,7 @@ void ImpEditEngine::SetAllMisspellRanges( const std::vector<editeng::MisspellRan
pNode->CreateWrongList();
WrongList* pWrongList = pNode->GetWrongList();
pWrongList->SetRanges(rParaRanges.maRanges);
pWrongList->SetRanges(std::vector(rParaRanges.maRanges));
}
}

View File

@@ -105,7 +105,7 @@ namespace accessibility
(text paragraph). The state values are defined in
css::accessibility::AccessibleStateType.
*/
void SetAdditionalChildStates( const VectorOfStates& rChildStates );
void SetAdditionalChildStates( VectorOfStates&& rChildStates );
/** Set the number of paragraphs

View File

@@ -258,7 +258,7 @@ public:
This function has to be called before querying for
any children (e.g. with GetChild()).
*/
void SetAdditionalChildStates(const VectorOfStates& rChildStates);
void SetAdditionalChildStates(VectorOfStates&& rChildStates);
/** Update the visible children

View File

@@ -271,7 +271,7 @@ void ScAccessiblePreviewCell::CreateTextHelper()
// paragraphs in preview are transient
::accessibility::AccessibleTextHelper::VectorOfStates aChildStates;
aChildStates.push_back( AccessibleStateType::TRANSIENT );
mpTextHelper->SetAdditionalChildStates( aChildStates );
mpTextHelper->SetAdditionalChildStates( std::move(aChildStates) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -122,7 +122,7 @@ namespace accessibility
return mnStartIndex;
}
void SetAdditionalChildStates( const VectorOfStates& rChildStates );
void SetAdditionalChildStates( VectorOfStates&& rChildStates );
void Dispose();
@@ -350,9 +350,9 @@ namespace accessibility
}
}
void AccessibleTextHelper_Impl::SetAdditionalChildStates( const VectorOfStates& rChildStates )
void AccessibleTextHelper_Impl::SetAdditionalChildStates( VectorOfStates&& rChildStates )
{
maParaManager.SetAdditionalChildStates( rChildStates );
maParaManager.SetAdditionalChildStates( std::move(rChildStates) );
}
void AccessibleTextHelper_Impl::SetChildFocus( sal_Int32 nChild, bool bHaveFocus )
@@ -1644,9 +1644,9 @@ namespace accessibility
#endif
}
void AccessibleTextHelper::SetAdditionalChildStates( const VectorOfStates& rChildStates )
void AccessibleTextHelper::SetAdditionalChildStates( VectorOfStates&& rChildStates )
{
mpImpl->SetAdditionalChildStates( rChildStates );
mpImpl->SetAdditionalChildStates( std::move(rChildStates) );
}
void AccessibleTextHelper::UpdateChildren()