Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 16 new defect(s) introduced to LibreOffice found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 16 of 16 defect(s) ** CID 1588088: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/drawfunc/drawsh.cxx: 565 in ScDrawShell::ExecuteTextAttrDlg(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588088: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/drawfunc/drawsh.cxx: 565 in ScDrawShell::ExecuteTextAttrDlg(SfxRequest &)() 559 weld::Window* pWin = rViewData.GetDialogParent(); 560 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView)); 561 562 auto xRequest = std::make_shared<SfxRequest>(rReq); 563 rReq.Ignore(); // the 'old' request is not relevant any more 564 pDlg->StartExecuteAsync( >>> CID 1588088: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 565 [pDlg, xRequest, bHasMarked, pView] (sal_Int32 nResult)->void 566 { 567 if ( RET_OK == nResult ) 568 { 569 if ( bHasMarked ) 570 pView->SetAttributes( *pDlg->GetOutputItemSet() ); ** CID 1588087: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshf.cxx: 695 in ScTabViewShell::ExecuteMoveTable(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588087: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshf.cxx: 695 in ScTabViewShell::ExecuteMoveTable(SfxRequest &)() 689 690 // We support direct renaming of sheet only when one sheet 691 // is selected. 692 pDlg->EnableRenameTable(nTabSelCount == 1); 693 694 std::shared_ptr<SfxRequest> pReq = std::make_shared<SfxRequest>(rReq); >>> CID 1588087: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "pReq" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 695 pDlg->StartExecuteAsync([this, pDlg, pReq, 696 nContextMenuTab](sal_Int32 nResult) { 697 698 OUString aTableName; 699 sal_uInt16 nDocument = 0; 700 SCTAB nTargetIndex = -1; ** CID 1588086: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /svx/source/dialog/grfflt.cxx: 266 in handleGraphicFilterDialog(const VclPtr<AbstractGraphicFilterDialog> &, const Graphic &, std::function<void (GraphicObject)>)() ________________________________________________________________________________________________________ *** CID 1588086: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /svx/source/dialog/grfflt.cxx: 266 in handleGraphicFilterDialog(const VclPtr<AbstractGraphicFilterDialog> &, const Graphic &, std::function<void (GraphicObject)>)() 260 261 static void handleGraphicFilterDialog(const VclPtr<AbstractGraphicFilterDialog>& pDlg, 262 const Graphic& aInputGraphic, 263 std::function<void(GraphicObject)> f) 264 { 265 pDlg->StartExecuteAsync( >>> CID 1588086: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "f" is copied in call to copy constructor "std::function<void (GraphicObject)>", when it could be moved instead. 266 [pDlg, aInputGraphic, f] (sal_Int32 nResult)->void 267 { 268 if (nResult == RET_OK) 269 { 270 Graphic aOutputGraphic = pDlg->GetFilteredGraphic( aInputGraphic, 1.0, 1.0 ); 271 f(aOutputGraphic); ** CID 1588085: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshf.cxx: 818 in ScTabViewShell::ExecuteMoveTable(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588085: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshf.cxx: 818 in ScTabViewShell::ExecuteMoveTable(SfxRequest &)() 812 // is selected. 813 pDlg->EnableRenameTable(nTabSelCount == 1); 814 815 auto xRequest = std::make_shared<SfxRequest>(rReq); 816 rReq.Ignore(); // the 'old' request is not relevant any more 817 pDlg->StartExecuteAsync( >>> CID 1588085: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 818 [this, pDlg, xRequest] (sal_Int32 nResult)->void 819 { 820 if (nResult == RET_OK) 821 { 822 DoMoveTableFromDialog(*xRequest, pDlg); 823 } ** CID 1588084: (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshb.cxx: 528 in ScTabViewShell::ExecDrawIns(SfxRequest &)() /sc/source/ui/view/tabvwshb.cxx: 410 in ScTabViewShell::ExecDrawIns(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588084: (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshb.cxx: 528 in ScTabViewShell::ExecDrawIns(SfxRequest &)() 522 } 523 524 VclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog(pWin->GetFrameWeld(), rDoc.GetLinkManager())); 525 auto xRequest = std::make_shared<SfxRequest>(rReq); 526 rReq.Ignore(); // the 'old' request is not relevant any more 527 pDlg->StartExecuteAsync( >>> CID 1588084: (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 528 [this, pDlg, xRequest] (sal_Int32 /*nResult*/)->void 529 { 530 GetViewFrame().GetBindings().Invalidate( SID_LINKS ); 531 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator 532 pDlg->disposeOnce(); 533 xRequest->Done(); /sc/source/ui/view/tabvwshb.cxx: 410 in ScTabViewShell::ExecDrawIns(SfxRequest &)() 404 VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); 405 VclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog( 406 pWin->GetFrameWeld(), xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE)); 407 auto xRequest = std::make_shared<SfxRequest>(rReq); 408 rReq.Ignore(); // the 'old' request is not relevant any more 409 pDialog->StartExecuteAsync( >>> CID 1588084: (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 410 [pDialog, xRequest] (sal_Int32 nResult)->void 411 { 412 if (nResult == RET_OK) 413 pDialog->Apply(); 414 pDialog->disposeOnce(); 415 xRequest->Done(); ** CID 1588083: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/drawfunc/drtxtob.cxx: 894 in ScDrawTextObjectBar::ExecuteAttr(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588083: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/drawfunc/drtxtob.cxx: 894 in ScDrawTextObjectBar::ExecuteAttr(SfxRequest &)() 888 { 889 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 890 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(mrViewData.GetDialogParent(), &aEditAttr, pView)); 891 auto xRequest = std::make_shared<SfxRequest>(rReq); 892 rReq.Ignore(); // the 'old' request is not relevant any more 893 pDlg->StartExecuteAsync( >>> CID 1588083: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 894 [this, pDlg, pArgs, aNewAttr, bSet, xRequest, pView] (sal_Int32 nResult) mutable -> void 895 { 896 if ( RET_OK == nResult ) 897 aNewAttr.Put( *pDlg->GetOutputItemSet() ); 898 899 pDlg->disposeOnce(); ** CID 1588082: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/drwtxtsh.cxx: 448 in SwDrawTextShell::ExecDraw(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588082: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/drwtxtsh.cxx: 448 in SwDrawTextShell::ExecDraw(SfxRequest &)() 442 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( 443 GetView().GetFrameWeld(), 444 &aNewAttr, m_pSdrView )); 445 auto xRequest = std::make_shared<SfxRequest>(rReq); 446 rReq.Ignore(); // the 'old' request is not relevant any more 447 pDlg->StartExecuteAsync( >>> CID 1588082: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 448 [this, pDlg, xRequest] (sal_Int32 nResult)->void 449 { 450 if (nResult == RET_OK) 451 { 452 if (m_pSdrView->AreObjectsMarked()) 453 { ** CID 1588081: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sd/source/ui/func/futxtatt.cxx: 67 in sd::FuTextAttrDlg::DoExecute(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588081: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sd/source/ui/func/futxtatt.cxx: 67 in sd::FuTextAttrDlg::DoExecute(SfxRequest &)() 61 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(rReq.GetFrameWeld(), &aNewAttr, mpView)); 62 63 auto xRequest = std::make_shared<SfxRequest>(rReq); 64 rReq.Ignore(); // the 'old' request is not relevant any more 65 auto pView = mpView; // copy vars we need, FuTextAttrDlg object will be gone by the time the dialog completes 66 pDlg->StartExecuteAsync( >>> CID 1588081: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 67 [pDlg, xRequest, pView] (sal_Int32 nResult)->void 68 { 69 if (nResult == RET_OK) 70 { 71 xRequest->Done( *pDlg->GetOutputItemSet() ); 72 pView->SetAttributes( *xRequest->GetArgs() ); ** CID 1588080: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sd/source/ui/table/tableobjectbar.cxx: 135 in sd::ui::table::TableObjectBar::Execute(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588080: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sd/source/ui/table/tableobjectbar.cxx: 135 in sd::ui::table::TableObjectBar::Execute(SfxRequest &)() 129 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 130 vcl::Window* pWin = mpView->GetViewShell()->GetParentWindow(); 131 VclPtr<SvxAbstractInsRowColDlg> pDlg( pFact->CreateSvxInsRowColDlg(pWin ? pWin->GetFrameWeld() : nullptr, 132 nSlotId == SID_TABLE_INSERT_COL_DLG, 133 SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) ); 134 pDlg->StartExecuteAsync( >>> CID 1588080: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 135 [pDlg, xRequest, nSlotId, xController, pBindings] (sal_Int32 nResult) mutable ->void 136 { 137 if (nResult == RET_OK) 138 { 139 sal_uInt16 nCount = pDlg->getInsertCount(); 140 bool bInsertAfter = !pDlg->isInsertBefore(); ** CID 1588079: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/uiview/viewdlg2.cxx: 73 in SwView::ExecDlgExt(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588079: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/uiview/viewdlg2.cxx: 73 in SwView::ExecDlgExt(SfxRequest &)() 67 const uno::Reference<frame::XModel> xModel(GetCurrentDocument()); 68 VclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog( 69 GetFrameWeld(), xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE)); 70 auto xRequest = std::make_shared<SfxRequest>(rReq); 71 rReq.Ignore(); // the 'old' request is not relevant any more 72 pDialog->StartExecuteAsync( >>> CID 1588079: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 73 [pDialog, xRequest] (sal_Int32 nResult)->void 74 { 75 if (nResult == RET_OK) 76 pDialog->Apply(); 77 pDialog->disposeOnce(); 78 xRequest->Done(); ** CID 1588078: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/drawdlg.cxx: 68 in SwDrawShell::ExecDrawDlg(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588078: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/drawdlg.cxx: 68 in SwDrawShell::ExecDrawDlg(SfxRequest &)() 62 { 63 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 64 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(rReq.GetFrameWeld(), &aNewAttr, pView)); 65 auto xRequest = std::make_shared<SfxRequest>(rReq); 66 rReq.Ignore(); // the 'old' request is not relevant any more 67 pDlg->StartExecuteAsync( >>> CID 1588078: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 68 [pDlg, xRequest, pView, pSh] (sal_Int32 nResult)->void 69 { 70 if (nResult == RET_OK) 71 { 72 if (pView->AreObjectsMarked()) 73 { ** CID 1588077: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/tabsh.cxx: 999 in SwTableShell::Execute(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588077: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/tabsh.cxx: 999 in SwTableShell::Execute(SfxRequest &)() 993 auto xRequest = std::make_shared<SfxRequest>(rReq); 994 rReq.Ignore(); // the 'old' request is not relevant any more 995 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 996 VclPtr<SvxAbstractInsRowColDlg> pDlg(pFact->CreateSvxInsRowColDlg(GetView().GetFrameWeld(), 997 nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand())); 998 pDlg->StartExecuteAsync( >>> CID 1588077: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 999 [this, pDlg, xRequest, nSlot] (sal_Int32 nResult)->void 1000 { 1001 if (nResult == RET_OK) 1002 { 1003 const TypedWhichId<SfxUInt16Item> nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) 1004 ? FN_TABLE_INSERT_COL_AFTER : FN_TABLE_INSERT_ROW_AFTER; ** CID 1588076: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshf.cxx: 894 in ScTabViewShell::ExecuteInsertTable(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588076: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/tabvwshf.cxx: 894 in ScTabViewShell::ExecuteInsertTable(SfxRequest &)() 888 auto xRequest = std::make_shared<SfxRequest>(rReq); 889 rReq.Ignore(); // the 'old' request is not relevant any more 890 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); 891 VclPtr<AbstractScInsertTableDlg> pDlg(pFact->CreateScInsertTableDlg(GetFrameWeld(), rViewData, 892 nTabSelCount, nSlot == FID_INS_TABLE_EXT)); 893 pDlg->StartExecuteAsync( >>> CID 1588076: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 894 [this, pDlg, xRequest] (sal_Int32 nResult)->void 895 { 896 if (nResult == RET_OK) 897 DoInsertTableFromDialog(*xRequest, pDlg); 898 pDlg->disposeOnce(); 899 } ** CID 1588075: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/ui/dialog/macassgn.cxx: 116 in SwMacroAssignDlg::INetFormatDlg(weld::Window *, SwWrtShell &, const SvxMacroItem &, std::function<void (const SvxMacroItem &)>)() ________________________________________________________________________________________________________ *** CID 1588075: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/ui/dialog/macassgn.cxx: 116 in SwMacroAssignDlg::INetFormatDlg(weld::Window *, SwWrtShell &, const SvxMacroItem &, std::function<void (const SvxMacroItem &)>)() 110 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 111 VclPtr<SfxAbstractDialog> pMacroDlg( pFact->CreateEventConfigDialog(pParent, aSet, 112 rSh.GetView().GetViewFrame().GetFrame().GetFrameInterface() ) ); 113 if ( !pMacroDlg ) 114 return; 115 pMacroDlg->StartExecuteAsync( >>> CID 1588075: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "onItemSelectedFunc" is copied in call to copy constructor "std::function<void (SvxMacroItem const &)>", when it could be moved instead. 116 [pMacroDlg, onItemSelectedFunc] (sal_Int32 nResult)->void 117 { 118 if (nResult == RET_OK) 119 { 120 const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); 121 if( const SvxMacroItem* pItem = pOutSet->GetItemIfSet( RES_FRMMACRO, false )) ** CID 1588074: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /svx/source/dialog/grfflt.cxx: 271 in handleGraphicFilterDialog(const VclPtr<AbstractGraphicFilterDialog> &, const Graphic &, std::function<void (GraphicObject)>)::[lambda(int) (instance 1)]::operator ()(int) const() ________________________________________________________________________________________________________ *** CID 1588074: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /svx/source/dialog/grfflt.cxx: 271 in handleGraphicFilterDialog(const VclPtr<AbstractGraphicFilterDialog> &, const Graphic &, std::function<void (GraphicObject)>)::[lambda(int) (instance 1)]::operator ()(int) const() 265 pDlg->StartExecuteAsync( 266 [pDlg, aInputGraphic, f] (sal_Int32 nResult)->void 267 { 268 if (nResult == RET_OK) 269 { 270 Graphic aOutputGraphic = pDlg->GetFilteredGraphic( aInputGraphic, 1.0, 1.0 ); >>> CID 1588074: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aOutputGraphic" is passed-by-value as parameter to "GraphicObject::GraphicObject(Graphic)" when it could be moved instead. 271 f(aOutputGraphic); 272 } 273 pDlg->disposeOnce(); 274 } 275 ); 276 } ** CID 1588073: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/drwbassh.cxx: 148 in SwDrawBaseShell::Execute(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1588073: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sw/source/uibase/shells/drwbassh.cxx: 148 in SwDrawBaseShell::Execute(SfxRequest &)() 142 143 auto xRequest = std::make_shared<SfxRequest>(rReq); 144 rReq.Ignore(); // the 'old' request is not relevant any more 145 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); 146 VclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg(GetView().GetFrameWeld(), aSet, pSh)); 147 pDlg->StartExecuteAsync( >>> CID 1588073: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xRequest" is copied in call to copy constructor "std::shared_ptr<SfxRequest>", when it could be moved instead. 148 [pDlg, pSh, xRequest] (sal_Int32 nResult)->void 149 { 150 if (nResult == RET_OK) 151 { 152 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); 153 if(const SfxInt16Item* pWrapItem = pOutSet->GetItemIfSet(FN_DRAW_WRAP_DLG, false)) ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DskP3_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiom4gbofWEtWX8-2B-2Fhi2QvlvrVPy19-2BKWklkUEaUQAo5SWpO0qfGxbDM-2FleAokMqDtcgFnUHaxaKM3rpRnDz-2FWeRZOsMmu1fuS4SZ6wT1LSpK8VzaOzacd3zMudZqJdhqG6ilJH-2FQz9cacaZxn8xDZZ2QszNhylozIDavph3sINQU-3D