cid#1546500 COPY_INSTEAD_OF_MOVE

and

cid#1546492 COPY_INSTEAD_OF_MOVE
cid#1546468 COPY_INSTEAD_OF_MOVE
cid#1546431 COPY_INSTEAD_OF_MOVE
cid#1546382 COPY_INSTEAD_OF_MOVE
cid#1546350 COPY_INSTEAD_OF_MOVE
cid#1546336 COPY_INSTEAD_OF_MOVE
cid#1546314 COPY_INSTEAD_OF_MOVE
cid#1546152 COPY_INSTEAD_OF_MOVE
cid#1546094 COPY_INSTEAD_OF_MOVE
cid#1546077 COPY_INSTEAD_OF_MOVE
cid#1546047 COPY_INSTEAD_OF_MOVE
cid#1545213 COPY_INSTEAD_OF_MOVE

Change-Id: Ia51df9f9cbde755db4d2685e34f22676ed5eceff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161141
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2023-12-21 20:39:31 +00:00
parent 557579ec55
commit 03d7ff28b3
16 changed files with 49 additions and 45 deletions

View File

@@ -84,8 +84,7 @@ ScaleData AxisHelper::createDefaultScale()
void AxisHelper::removeExplicitScaling( ScaleData& rScaleData )
{
uno::Any aEmpty;
rScaleData.Minimum = rScaleData.Maximum = rScaleData.Origin = aEmpty;
rScaleData.Minimum = rScaleData.Maximum = rScaleData.Origin = uno::Any();
rScaleData.Scaling = nullptr;
ScaleData aDefaultScale( createDefaultScale() );
rScaleData.IncrementData = aDefaultScale.IncrementData;

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -154,7 +154,8 @@ class VCL_PLUGIN_PUBLIC GraphicsRenderTests
void testDrawOpenBezierWithPolyLineB2D();
static OUString returnTestStatus(vcl::test::TestResult const result);
void runALLTests();
void appendTestResult(OUString aTestName, OUString aTestStatus, Bitmap aTestBitmap = Bitmap());
void appendTestResult(const OUString& rTestName, const OUString& rTestStatus,
const Bitmap& rTestBitmap = Bitmap());
public:
std::vector<VclTestResult>& getTestResults();
@@ -166,3 +167,5 @@ public:
{
}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

View File

@@ -615,10 +615,10 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OUString &rNam
if (!rName.isEmpty())
pDlg->SetCurPageId(rName);
auto pRequest = std::make_shared<SfxRequest>(rReq);
auto xRequest = std::make_shared<SfxRequest>(rReq);
rReq.Ignore(); // the 'old' request is not relevant any more
pDlg->StartExecuteAsync([pDlg, pOldSet, pRequest, this](sal_Int32 nResult){
pDlg->StartExecuteAsync([pDlg, pOldSet, xRequest=std::move(xRequest), this](sal_Int32 nResult){
bInFormatDialog = false;
if ( nResult == RET_OK )
@@ -631,7 +631,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OUString &rNam
ApplyAttributes(*pOutSet, *pOldSet);
pRequest->Done(*pOutSet);
xRequest->Done(*pOutSet);
}
pDlg->disposeOnce();

View File

@@ -163,8 +163,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
}
std::shared_ptr<SfxRequest> pReq = std::make_shared<SfxRequest>(rReq);
pDlg->StartExecuteAsync([this, pDlg, pReq](sal_Int32 nResult){
std::shared_ptr<SfxRequest> xReq = std::make_shared<SfxRequest>(rReq);
pDlg->StartExecuteAsync([this, pDlg, xReq = std::move(xReq)](sal_Int32 nResult){
std::vector<OUString> sTables;
if (RET_OK == nResult)
{
@@ -172,11 +172,11 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
for (auto a : aSelectedRows)
{
OUString sTable = pDlg->GetEntry(a);
pReq->AppendItem( SfxStringItem( FID_TABLE_SHOW, sTable ) );
xReq->AppendItem( SfxStringItem( FID_TABLE_SHOW, sTable ) );
sTables.push_back(sTable);
}
ShowTable( sTables );
pReq->Done();
xReq->Done();
}
pDlg->disposeOnce();
});

View File

@@ -561,10 +561,10 @@ void PresenterScreen::RequestShutdownPresenterScreen()
// asynchronously. The view and pane factories can only by disposed
// after that. Therefore, set up a listener and wait for the
// restoration.
rtl::Reference<PresenterScreen> pSelf (this);
rtl::Reference<PresenterScreen> xSelf(this);
PresenterFrameworkObserver::RunOnUpdateEnd(
xCC,
[pSelf](bool){ return pSelf->ShutdownPresenterScreen(); });
[xSelf=std::move(xSelf)](bool){ return xSelf->ShutdownPresenterScreen(); });
xCC->update();
}
}

View File

@@ -110,15 +110,15 @@ void FuTransform::DoExecute( SfxRequest& rReq )
assert(pDlg && "there must be a dialog at this point");
auto pRequest = std::make_shared<SfxRequest>(rReq);
auto xRequest = std::make_shared<SfxRequest>(rReq);
rReq.Ignore(); // the 'old' request is not relevant any more
pDlg->StartExecuteAsync([bWelded, pDlg, pRequest, this](sal_Int32 nResult){
pDlg->StartExecuteAsync([bWelded, pDlg, xRequest=std::move(xRequest), this](sal_Int32 nResult){
if (nResult == RET_OK)
{
pRequest->Done(*(pDlg->GetOutputItemSet()));
xRequest->Done(*(pDlg->GetOutputItemSet()));
// Page margin is already calculated at this point.
setUndo(mpView, pRequest->GetArgs(), false);
setUndo(mpView, xRequest->GetArgs(), false);
}
// deferred until the dialog ends

View File

@@ -712,10 +712,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if (!rReq.IsSynchronCall())
{
std::shared_ptr<SfxRequest> pReq = std::make_shared<SfxRequest>(rReq);
SfxTabDialogController::runAsync(xDlg, [pReq, aFunc](sal_Int32 nResult)
std::shared_ptr<SfxRequest> xReq = std::make_shared<SfxRequest>(rReq);
SfxTabDialogController::runAsync(xDlg, [xReq=std::move(xReq), aFunc](sal_Int32 nResult)
{
aFunc(nResult, *pReq);
aFunc(nResult, *xReq);
});
rReq.Ignore();
}

View File

@@ -198,9 +198,9 @@ void AnimationCommandNode::activate_st()
}
// deactivate ASAP:
auto self(getSelf());
std::shared_ptr<BaseNode> self(getSelf());
scheduleDeactivationEvent(
makeEvent( [self] () { self->deactivate(); },
makeEvent( [self=std::move(self)] () { self->deactivate(); },
"AnimationCommandNode::deactivate" ) );
}

View File

@@ -58,12 +58,12 @@ class NamePasswordRecord
OUString m_aPersistentPassword;
OUString m_aPersistentIV;
void InitArrays( bool bHasMemoryList, ::std::vector< OUString >&& aMemoryList,
void InitArrays( bool bHasMemoryList, const std::vector<OUString>& rMemoryList,
bool bHasPersistentList, const OUString& aPersistentList, const OUString& aPersistentIV )
{
m_bHasMemoryPasswords = bHasMemoryList;
if ( bHasMemoryList )
m_aMemoryPasswords = aMemoryList;
m_aMemoryPasswords = rMemoryList;
m_bHasPersistentPassword = bHasPersistentList;
if ( bHasPersistentList )
@@ -96,7 +96,7 @@ public:
, m_bHasMemoryPasswords( false )
, m_bHasPersistentPassword( false )
{
InitArrays( aRecord.m_bHasMemoryPasswords, std::vector(aRecord.m_aMemoryPasswords),
InitArrays( aRecord.m_bHasMemoryPasswords, aRecord.m_aMemoryPasswords,
aRecord.m_bHasPersistentPassword, aRecord.m_aPersistentPassword, aRecord.m_aPersistentIV );
}
@@ -109,7 +109,7 @@ public:
m_aMemoryPasswords.clear();
m_aPersistentPassword.clear();
m_aPersistentIV.clear();
InitArrays( aRecord.m_bHasMemoryPasswords, std::vector(aRecord.m_aMemoryPasswords),
InitArrays( aRecord.m_bHasMemoryPasswords, aRecord.m_aMemoryPasswords,
aRecord.m_bHasPersistentPassword, aRecord.m_aPersistentPassword, aRecord.m_aPersistentIV );
}
return *this;

View File

@@ -1942,9 +1942,9 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
{
::accessibility::ShapeTypeHandler& rShapeTypeHandler =
::accessibility::ShapeTypeHandler::Instance();
uno::Reference < XAccessible > xParent( pParentImpl );
::accessibility::AccessibleShapeInfo aShapeInfo(
xShape, xParent, this );
xShape, uno::Reference<XAccessible>(pParentImpl), this );
pAcc = rShapeTypeHandler.CreateAccessibleObject(
aShapeInfo, mpShapeMap->GetInfo() );

View File

@@ -4876,8 +4876,9 @@ void INetURLObject::SetExtension(std::u16string_view rTheExtension)
OUString INetURLObject::CutExtension()
{
OUString aTheExtension(getExtension(LAST_SEGMENT, false));
return removeExtension(LAST_SEGMENT, false)
? aTheExtension : OUString();
if (removeExtension(LAST_SEGMENT, false))
return aTheExtension;
return OUString();
}
bool INetURLObject::IsExoticProtocol() const

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -2482,10 +2482,10 @@ void GraphicsRenderTests::runALLTests()
testDrawOpenBezierWithPolyLineB2D();
}
void GraphicsRenderTests::appendTestResult(OUString aTestName, OUString aTestStatus,
Bitmap aTestBitmap)
void GraphicsRenderTests::appendTestResult(const OUString& rTestName, const OUString& rTestStatus,
const Bitmap& rTestBitmap)
{
m_aTestResult.push_back(VclTestResult(aTestName, aTestStatus, aTestBitmap));
m_aTestResult.push_back(VclTestResult(rTestName, rTestStatus, rTestBitmap));
}
std::vector<VclTestResult>& GraphicsRenderTests::getTestResults() { return m_aTestResult; }
@@ -2593,3 +2593,5 @@ void GraphicsRenderTests::run(bool storeResultBitmap)
}
logFile.WriteOString(OUStringToOString(writeResult, RTL_TEXTENCODING_UTF8));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

View File

@@ -282,7 +282,7 @@ public:
@param ref reference to the properties
*/
virtual void props(writerfilter::Reference<Properties>::Pointer_t ref) = 0;
virtual void props(const writerfilter::Reference<Properties>::Pointer_t& ref) = 0;
/**
Receives table.
@@ -290,7 +290,7 @@ public:
@param name name of the table
@param ref reference to the table
*/
virtual void table(Id name, writerfilter::Reference<Table>::Pointer_t ref) = 0;
virtual void table(Id name, const writerfilter::Reference<Table>::Pointer_t& ref) = 0;
/**
Receives a substream.
@@ -298,7 +298,7 @@ public:
@param name name of the substream
@param ref reference to the substream
*/
virtual void substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) = 0;
virtual void substream(Id name, const writerfilter::Reference<Stream>::Pointer_t& ref) = 0;
/**
Debugging: Receives information about current point in stream.

View File

@@ -235,7 +235,7 @@ void LoggedStream::positivePercentage(const OUString& rText)
#endif
}
void LoggedStream::props(writerfilter::Reference<Properties>::Pointer_t ref)
void LoggedStream::props(const writerfilter::Reference<Properties>::Pointer_t& ref)
{
#ifdef DBG_UTIL
mHelper.startElement("props");
@@ -248,7 +248,7 @@ void LoggedStream::props(writerfilter::Reference<Properties>::Pointer_t ref)
#endif
}
void LoggedStream::table(Id name, writerfilter::Reference<Table>::Pointer_t ref)
void LoggedStream::table(Id name, const writerfilter::Reference<Table>::Pointer_t& ref)
{
#ifdef DBG_UTIL
mHelper.startElement("table");
@@ -262,7 +262,7 @@ void LoggedStream::table(Id name, writerfilter::Reference<Table>::Pointer_t ref)
#endif
}
void LoggedStream::substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref)
void LoggedStream::substream(Id name, const writerfilter::Reference<Stream>::Pointer_t& ref)
{
#ifdef DBG_UTIL
mHelper.startElement("substream");

View File

@@ -67,9 +67,9 @@ public:
void positionOffset(const OUString& rText, bool bVertical) override;
void align(const OUString& rText, bool bVertical) override;
void positivePercentage(const OUString& rText) override;
void props(writerfilter::Reference<Properties>::Pointer_t ref) override;
void table(Id name, writerfilter::Reference<Table>::Pointer_t ref) override;
void substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) override;
void props(const writerfilter::Reference<Properties>::Pointer_t& ref) override;
void table(Id name, const writerfilter::Reference<Table>::Pointer_t& ref) override;
void substream(Id name, const writerfilter::Reference<Stream>::Pointer_t& ref) override;
void info(const std::string& info) override;
void startGlossaryEntry() override;
void endGlossaryEntry() override;

View File

@@ -1250,10 +1250,9 @@ void XMLEnhancedCustomShapeContext::endFastElement(sal_Int32 )
EquationHashMap::iterator aHashIter( aH.find( aEquationName ) );
if ( aHashIter != aH.end() )
nIndex = (*aHashIter).second;
OUString aNew = rEquation.subView( 0, nIndexOf + 1 ) +
rEquation = rEquation.subView( 0, nIndexOf + 1 ) +
OUString::number( nIndex ) +
rEquation.subView( nIndexOf + aEquationName.getLength() + 1 );
rEquation = aNew;
}
nIndexOf++;
}