Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 10 new defect(s) introduced to LibreOffice found with Coverity Scan. 8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 10 of 10 defect(s) ** CID 1591769: (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 611 in chart::ChartController::executeDispatch_InsertErrorBars(bool)() /chart2/source/controller/main/ChartController_Insert.cxx: 572 in chart::ChartController::executeDispatch_InsertErrorBars(bool)() ________________________________________________________________________________________________________ *** CID 1591769: (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 611 in chart::ChartController::executeDispatch_InsertErrorBars(bool)() 605 getChartModel(), 606 bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X); 607 608 aDlg->SetAxisMinorStepWidthForErrorBarDecimals( 609 InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getChartModel(), m_xChartView, u"" ) ); 610 >>> CID 1591769: (COPY_INSTEAD_OF_MOVE) >>> "aUndoGuard" is copied in call to copy constructor "std::shared_ptr<chart::UndoGuard>", when it could be moved instead. 611 weld::DialogController::runAsync(aDlg, [this, aDlg, aItemConverter, aUndoGuard](int nResult) { 612 if ( nResult == RET_OK ) 613 { 614 SfxItemSet aOutItemSet = aItemConverter->CreateEmptyItemSet(); 615 aDlg->FillItemSet( aOutItemSet ); 616 /chart2/source/controller/main/ChartController_Insert.cxx: 572 in chart::ChartController::executeDispatch_InsertErrorBars(bool)() 566 aDlg->SetAxisMinorStepWidthForErrorBarDecimals( 567 InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getChartModel(), 568 m_xChartView, m_aSelection.getSelectedCID())); 569 570 // note: when a user pressed "OK" but didn't change any settings in the 571 // dialog, the SfxTabDialog returns "Cancel" >>> CID 1591769: (COPY_INSTEAD_OF_MOVE) >>> "aUndoGuard" is copied in call to copy constructor "std::shared_ptr<chart::UndoLiveUpdateGuard>", when it could be moved instead. 572 SfxTabDialogController::runAsync(aDlg, [this, aDlg, aItemConverter, aUndoGuard](int nResult) { 573 if ( nResult == RET_OK || aDlg->DialogWasClosedWithOK() ) 574 { 575 const SfxItemSet* pOutItemSet = aDlg->GetOutputItemSet(); 576 if( pOutItemSet ) 577 { ** CID 1591768: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 291 in chart::ChartController::executeDispatch_InsertTitles()() ________________________________________________________________________________________________________ *** CID 1591768: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 291 in chart::ChartController::executeDispatch_InsertTitles()() 285 { 286 auto aDialogInput = std::make_shared<TitleDialogData>(); 287 aDialogInput->readFromModel( getChartModel() ); 288 289 SolarMutexGuard aGuard; 290 auto aDlg = std::make_shared<SchTitleDlg>(GetChartFrame(), *aDialogInput); >>> CID 1591768: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aUndoGuard" is copied in call to copy constructor "std::shared_ptr<chart::UndoGuard>", when it could be moved instead. 291 weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, aUndoGuard](int nResult){ 292 if ( nResult == RET_OK ) 293 { 294 // lock controllers till end of block 295 ControllerLockGuardUNO aCLGuard( getChartModel() ); 296 TitleDialogData aDialogOutput( impl_createReferenceSizeProvider() ); ** CID 1591767: (UNINIT_CTOR) /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() ________________________________________________________________________________________________________ *** CID 1591767: (UNINIT_CTOR) /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 73 { 74 nTab = nTable; 75 nCol = !bReverse ? maParam.nCol1 : maParam.nCol2; 76 nRow = !bReverse ? maParam.nRow1 : maParam.nRow2; 77 SCSIZE i; 78 if (!bMod) // Or else it's already inserted >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 79 return; 80 81 SCSIZE nCount = maParam.GetEntryCount(); 82 for (i = 0; (i < nCount) && (maParam.GetEntry(i).bDoQuery); ++i) 83 { 84 ScQueryEntry& rEntry = maParam.GetEntry(i); /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 73 { 74 nTab = nTable; 75 nCol = !bReverse ? maParam.nCol1 : maParam.nCol2; 76 nRow = !bReverse ? maParam.nRow1 : maParam.nRow2; 77 SCSIZE i; 78 if (!bMod) // Or else it's already inserted >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 79 return; 80 81 SCSIZE nCount = maParam.GetEntryCount(); 82 for (i = 0; (i < nCount) && (maParam.GetEntry(i).bDoQuery); ++i) 83 { 84 ScQueryEntry& rEntry = maParam.GetEntry(i); /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 73 { 74 nTab = nTable; 75 nCol = !bReverse ? maParam.nCol1 : maParam.nCol2; 76 nRow = !bReverse ? maParam.nRow1 : maParam.nRow2; 77 SCSIZE i; 78 if (!bMod) // Or else it's already inserted >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 79 return; 80 81 SCSIZE nCount = maParam.GetEntryCount(); 82 for (i = 0; (i < nCount) && (maParam.GetEntry(i).bDoQuery); ++i) 83 { 84 ScQueryEntry& rEntry = maParam.GetEntry(i); /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 85 ScQueryEntry::Item& rItem = rEntry.GetQueryItem(); 86 sal_uInt32 nIndex = 0; 87 bool bNumber = mrContext.GetFormatTable()->IsNumberFormat( 88 rItem.maString.getString(), nIndex, rItem.mfVal); 89 rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; 90 } >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 91 } 92 93 template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType > 94 void ScQueryCellIteratorBase< accessType, queryType >::PerformQuery() 95 { 96 assert(nTab < rDoc.GetTableCount() && "index out of bounds, FIX IT"); /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 85 ScQueryEntry::Item& rItem = rEntry.GetQueryItem(); 86 sal_uInt32 nIndex = 0; 87 bool bNumber = mrContext.GetFormatTable()->IsNumberFormat( 88 rItem.maString.getString(), nIndex, rItem.mfVal); 89 rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; 90 } >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 91 } 92 93 template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType > 94 void ScQueryCellIteratorBase< accessType, queryType >::PerformQuery() 95 { 96 assert(nTab < rDoc.GetTableCount() && "index out of bounds, FIX IT"); /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 85 ScQueryEntry::Item& rItem = rEntry.GetQueryItem(); 86 sal_uInt32 nIndex = 0; 87 bool bNumber = mrContext.GetFormatTable()->IsNumberFormat( 88 rItem.maString.getString(), nIndex, rItem.mfVal); 89 rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; 90 } >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 91 } 92 93 template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType > 94 void ScQueryCellIteratorBase< accessType, queryType >::PerformQuery() 95 { 96 assert(nTab < rDoc.GetTableCount() && "index out of bounds, FIX IT"); /sc/source/core/data/queryiter.cxx: 91 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 85 ScQueryEntry::Item& rItem = rEntry.GetQueryItem(); 86 sal_uInt32 nIndex = 0; 87 bool bNumber = mrContext.GetFormatTable()->IsNumberFormat( 88 rItem.maString.getString(), nIndex, rItem.mfVal); 89 rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; 90 } >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 91 } 92 93 template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType > 94 void ScQueryCellIteratorBase< accessType, queryType >::PerformQuery() 95 { 96 assert(nTab < rDoc.GetTableCount() && "index out of bounds, FIX IT"); /sc/source/core/data/queryiter.cxx: 79 in ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, (ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, ScInterpreterContext &, short, const ScQueryParam &, bool, bool)() 73 { 74 nTab = nTable; 75 nCol = !bReverse ? maParam.nCol1 : maParam.nCol2; 76 nRow = !bReverse ? maParam.nRow1 : maParam.nRow2; 77 SCSIZE i; 78 if (!bMod) // Or else it's already inserted >>> CID 1591767: (UNINIT_CTOR) >>> Non-static class member "bSortedBinarySearch" is not initialized in this constructor nor in any functions that it calls. 79 return; 80 81 SCSIZE nCount = maParam.GetEntryCount(); 82 for (i = 0; (i < nCount) && (maParam.GetEntry(i).bDoQuery); ++i) 83 { 84 ScQueryEntry& rEntry = maParam.GetEntry(i); ** CID 1591766: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/hintwin.cxx: 157 in ScOverlayHint::createOverlaySequence(int, int, const MapMode &, basegfx::B2DRange &) const() ________________________________________________________________________________________________________ *** CID 1591766: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/hintwin.cxx: 157 in ScOverlayHint::createOverlaySequence(int, int, const MapMode &, basegfx::B2DRange &) const() 151 152 basegfx::BColor aBorderColor(0.5, 0.5, 0.5); 153 drawinglayer::primitive2d::Primitive2DReference aBorder( 154 new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( 155 std::move(aPoly), aBorderColor)); 156 >>> CID 1591766: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aBg" is copied in a call to copy assignment "operator =", when it could be moved instead. 157 aSeq[0] = aBg; 158 aSeq[1] = aBorder; 159 160 return aSeq; 161 } 162 ** CID 1591765: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/hintwin.cxx: 158 in ScOverlayHint::createOverlaySequence(int, int, const MapMode &, basegfx::B2DRange &) const() ________________________________________________________________________________________________________ *** CID 1591765: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/view/hintwin.cxx: 158 in ScOverlayHint::createOverlaySequence(int, int, const MapMode &, basegfx::B2DRange &) const() 152 basegfx::BColor aBorderColor(0.5, 0.5, 0.5); 153 drawinglayer::primitive2d::Primitive2DReference aBorder( 154 new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( 155 std::move(aPoly), aBorderColor)); 156 157 aSeq[0] = aBg; >>> CID 1591765: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aBorder" is copied in a call to copy assignment "operator =", when it could be moved instead. 158 aSeq[1] = aBorder; 159 160 return aSeq; 161 } 162 163 drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlayObjectPrimitive2DSequence() ** CID 1591764: (USE_AFTER_FREE) /sc/source/core/data/column2.cxx: 1075 in ScColumn::GetOptimalHeight(sc::RowHeightContext &, int, int, unsigned short, int)() /sc/source/core/data/column2.cxx: 1075 in ScColumn::GetOptimalHeight(sc::RowHeightContext &, int, int, unsigned short, int)() ________________________________________________________________________________________________________ *** CID 1591764: (USE_AFTER_FREE) /sc/source/core/data/column2.cxx: 1075 in ScColumn::GetOptimalHeight(sc::RowHeightContext &, int, int, unsigned short, int)() 1069 { 1070 // only calculate the cell height when it's used later (#37928#) 1071 1072 if (rCxt.isForceAutoSize() || !(rDocument.GetRowFlags(nRow, nTab) & CRFlags::ManualSize) ) 1073 { 1074 aOptions.aPattern.setScPatternAttr(pPattern); >>> CID 1591764: (USE_AFTER_FREE) >>> Calling "setScPatternAttr" frees pointer "aOldPattern.mpScPatternAttr" which has already been freed. 1075 aOldPattern.setScPatternAttr(pPattern); 1076 sal_uInt16 nHeight = static_cast<sal_uInt16>( 1077 std::min( 1078 GetNeededSize( nRow, rCxt.getOutputDevice(), rCxt.getPPTX(), rCxt.getPPTY(), 1079 rCxt.getZoomX(), rCxt.getZoomY(), false, aOptions, 1080 &pPattern) / rCxt.getPPTY(), /sc/source/core/data/column2.cxx: 1075 in ScColumn::GetOptimalHeight(sc::RowHeightContext &, int, int, unsigned short, int)() 1069 { 1070 // only calculate the cell height when it's used later (#37928#) 1071 1072 if (rCxt.isForceAutoSize() || !(rDocument.GetRowFlags(nRow, nTab) & CRFlags::ManualSize) ) 1073 { 1074 aOptions.aPattern.setScPatternAttr(pPattern); >>> CID 1591764: (USE_AFTER_FREE) >>> Calling "setScPatternAttr" frees pointer "aOldPattern.mpScPatternAttr" which has already been freed. 1075 aOldPattern.setScPatternAttr(pPattern); 1076 sal_uInt16 nHeight = static_cast<sal_uInt16>( 1077 std::min( 1078 GetNeededSize( nRow, rCxt.getOutputDevice(), rCxt.getPPTX(), rCxt.getPPTY(), 1079 rCxt.getZoomX(), rCxt.getZoomY(), false, aOptions, 1080 &pPattern) / rCxt.getPPTY(), ** CID 1591763: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 510 in chart::ChartController::executeDispatch_InsertTrendline()() ________________________________________________________________________________________________________ *** CID 1591763: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 510 in chart::ChartController::executeDispatch_InsertTrendline()() 504 SolarMutexGuard aGuard; 505 auto aDialog = std::make_shared<SchAttribTabDlg>(GetChartFrame(), &aItemSet, &aDialogParameter, 506 &aViewElementListProvider, getChartModel()); 507 508 // note: when a user pressed "OK" but didn't change any settings in the 509 // dialog, the SfxTabDialog returns "Cancel" >>> CID 1591763: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aUndoGuard" is copied in call to copy constructor "std::shared_ptr<chart::UndoLiveUpdateGuard>", when it could be moved instead. 510 SfxTabDialogController::runAsync(aDialog, [this, aDialog, aItemConverter, aUndoGuard](int nResult) { 511 if ( nResult == RET_OK || aDialog->DialogWasClosedWithOK() ) 512 { 513 const SfxItemSet* pOutItemSet = aDialog->GetOutputItemSet(); 514 if( pOutItemSet ) 515 { ** CID 1591762: Error handling issues (UNCAUGHT_EXCEPT) /usr/include/c++/12/bits/shared_ptr_base.h: 611 in std::_Sp_counted_ptr_inplace<chart::UndoLiveUpdateGuard, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()() ________________________________________________________________________________________________________ *** CID 1591762: Error handling issues (UNCAUGHT_EXCEPT) /usr/include/c++/12/bits/shared_ptr_base.h: 611 in std::_Sp_counted_ptr_inplace<chart::UndoLiveUpdateGuard, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()() 605 std::forward<_Args>(__args)...); // might throw 606 } 607 608 ~_Sp_counted_ptr_inplace() noexcept { } 609 610 virtual void >>> CID 1591762: Error handling issues (UNCAUGHT_EXCEPT) >>> An exception of type "std::out_of_range" is thrown but the exception specification "noexcept" doesn't allow it to be thrown. This will result in a call to terminate(). 611 _M_dispose() noexcept 612 { 613 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); 614 } 615 616 // Override because the allocator needs to know the dynamic type ** CID 1591761: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 107 in chart::ChartController::executeDispatch_InsertAxes()() ________________________________________________________________________________________________________ *** CID 1591761: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController_Insert.cxx: 107 in chart::ChartController::executeDispatch_InsertAxes()() 101 rtl::Reference< Diagram > xDiagram = getFirstDiagram(); 102 AxisHelper::getAxisOrGridExistence( aDialogInput->aExistenceList, xDiagram ); 103 AxisHelper::getAxisOrGridPossibilities( aDialogInput->aPossibilityList, xDiagram ); 104 105 SolarMutexGuard aGuard; 106 auto aDlg = std::make_shared<SchAxisDlg>(GetChartFrame(), *aDialogInput); >>> CID 1591761: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aUndoGuard" is copied in call to copy constructor "std::shared_ptr<chart::UndoGuard>", when it could be moved instead. 107 weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, aUndoGuard](int nResult) { 108 if ( nResult == RET_OK ) 109 { 110 // lock controllers till end of block 111 ControllerLockGuardUNO aCLGuard( getChartModel() ); 112 ** CID 1591760: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController.cxx: 1348 in chart::ChartController::executeDispatch_ChartType()() ________________________________________________________________________________________________________ *** CID 1591760: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /chart2/source/controller/main/ChartController.cxx: 1348 in chart::ChartController::executeDispatch_ChartType()() 1342 auto aUndoGuard = std::make_shared<UndoLiveUpdateGuard>(SchResId(STR_ACTION_EDIT_CHARTTYPE), 1343 m_xUndoManager); 1344 1345 SolarMutexGuard aSolarGuard; 1346 //prepare and open dialog 1347 auto aDlg = std::make_shared<ChartTypeDialog>(GetChartFrame(), getChartModel()); >>> CID 1591760: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aUndoGuard" is copied in call to copy constructor "std::shared_ptr<chart::UndoLiveUpdateGuard>", when it could be moved instead. 1348 weld::DialogController::runAsync(aDlg, [this, aUndoGuard](int nResult) { 1349 if (nResult == RET_OK) 1350 { 1351 impl_adaptDataSeriesAutoResize(); 1352 aUndoGuard->commit(); 1353 } ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D20hq_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJingzmrTuXBHj2X4q-2FonHzZDwJ7TNg2bkkC-2FhkWF-2FzTNAyrnbVQwKSPb8TofskiiybAoxiwpBxUEYVsYrpHYtGmzcCDa8UzHFLDGbE7cNndu5WQHeAaR0dTH0KUR7z-2FIvF7MBuouVXujGAl0ITt1e2CLM9zVWgxj-2FNdCwaVun2mH8-3D