New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Wed Jun 12 21:50:52 UTC 2024
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
26 new defect(s) introduced to LibreOffice found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 20 of 26 defect(s)
** CID 1603634: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 450 in EditUndoSetStyleSheet::EditUndoSetStyleSheet(EditEngine *, int, rtl::OUString, SfxStyleFamily, rtl::OUString, SfxStyleFamily, SfxItemSet)()
________________________________________________________________________________________________________
*** CID 1603634: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 450 in EditUndoSetStyleSheet::EditUndoSetStyleSheet(EditEngine *, int, rtl::OUString, SfxStyleFamily, rtl::OUString, SfxStyleFamily, SfxItemSet)()
444 EditSelection aNewSel = GetEditEngine()->MoveParagraphs(nParagraphs, nDest);
445 GetEditEngine()->GetActiveView()->getImpl().SetEditSelection( aNewSel );
446 }
447
448 EditUndoSetStyleSheet::EditUndoSetStyleSheet(
449 EditEngine* pEE, sal_Int32 nP, OUString _aPrevName, SfxStyleFamily ePrevFam,
>>> CID 1603634: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter _aPrevParaAttribs of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
450 OUString _aNewName, SfxStyleFamily eNewFam, SfxItemSet _aPrevParaAttribs) :
451 EditUndo(EDITUNDO_STYLESHEET, pEE),
452 nPara(nP),
453 aPrevName(std::move(_aPrevName)),
454 aNewName(std::move(_aNewName)),
455 ePrevFamily(ePrevFam),
** CID 1603633: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 503 in EditUndoSetAttribs::EditUndoSetAttribs(EditEngine *, const ESelection &, SfxItemSet)()
________________________________________________________________________________________________________
*** CID 1603633: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 503 in EditUndoSetAttribs::EditUndoSetAttribs(EditEngine *, const ESelection &, SfxItemSet)()
497 {
498 DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" );
499 GetEditEngine()->SetParaAttribsOnly( nPara, aNewItems );
500 lcl_DoSetSelection( GetEditEngine()->GetActiveView(), nPara );
501 }
502
>>> CID 1603633: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter aNewItems of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
503 EditUndoSetAttribs::EditUndoSetAttribs(EditEngine* pEE, const ESelection& rESel, SfxItemSet aNewItems) :
504 EditUndo(EDITUNDO_ATTRIBS, pEE),
505 aESel(rESel),
506 aNewAttribs(std::move(aNewItems)),
507 nSpecial(SetAttribsMode::NONE),
508 m_bSetSelection(true),
** CID 1603632: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/ui/docshell/docsh4.cxx: 1972 in ScDocShell::ExecutePageStyle(const SfxViewShell &, SfxRequest &, short)::[lambda(int) (instance 1)]::operator ()(int) const()
________________________________________________________________________________________________________
*** CID 1603632: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/ui/docshell/docsh4.cxx: 1972 in ScDocShell::ExecutePageStyle(const SfxViewShell &, SfxRequest &, short)::[lambda(int) (instance 1)]::operator ()(int) const()
1966 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
1967
1968 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScStyleDlg(GetActiveDialogParent(), *pStyleSheet, true));
1969
1970 auto xRequest = std::make_shared<SfxRequest>(rReq);
1971 rReq.Ignore(); // the 'old' request is not relevant any more
>>> CID 1603632: Performance inefficiencies (PASS_BY_VALUE)
>>> Capturing variable "aOldData" of type "ScStyleSaveData" (size 168 bytes) by value, which exceeds the low threshold of 128 bytes.
1972 pDlg->StartExecuteAsync([this, pDlg, xRequest=std::move(xRequest), pStyleSheet, aOldData,
1973 aOldName, &rStyleSet, nCurTab, &rCaller, bUndo](sal_Int32 nResult) {
1974 if ( nResult == RET_OK )
1975 {
1976 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
1977
** CID 1603631: Null pointer dereferences (NULL_RETURNS)
________________________________________________________________________________________________________
*** CID 1603631: Null pointer dereferences (NULL_RETURNS)
/sd/source/ui/dlg/tpaction.cxx: 144 in SdTPAction::SetView(const sd::View *)()
138 {
139 mpDoc = pDocSh->GetDoc();
140 SfxViewFrame* pFrame = pDocSh->GetViewShell()->GetViewFrame();
141 m_xLbTree->SetViewFrame( pFrame );
142 m_xLbTreeDocument->SetViewFrame( pFrame );
143
>>> CID 1603631: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pDocSh->GetItem(TypedWhichId<SvxColorListItem>(10179))->GetColorList()" when calling "operator =".
144 pColList = pDocSh->GetItem( SID_COLOR_TABLE )->GetColorList();
145 DBG_ASSERT( pColList.is(), "No color table available!" );
146 }
147 else
148 {
149 OSL_FAIL("sd::SdTPAction::SetView(), no docshell or viewshell?");
** CID 1603630: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/ui/view/tabvwsha.cxx: 1584 in ScTabViewShell::ExecuteStyleEdit(SfxRequest &, SfxStyleSheetBase *, unsigned short, unsigned short, bool, bool, ScStyleSaveData &, ScStyleSaveData &, SfxStyleFamily, bool, bool, SdrObject *, ESelection)::[lambda(int) (instance 1)]::operator ()(int)()
________________________________________________________________________________________________________
*** CID 1603630: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/ui/view/tabvwsha.cxx: 1584 in ScTabViewShell::ExecuteStyleEdit(SfxRequest &, SfxStyleSheetBase *, unsigned short, unsigned short, bool, bool, ScStyleSaveData &, ScStyleSaveData &, SfxStyleFamily, bool, bool, SdrObject *, ESelection)::[lambda(int) (instance 1)]::operator ()(int)()
1578 pDlg = pFact->CreateScStyleDlg(pDialogParent, *pStyleSheet, bPage);
1579
1580 auto xRequest = std::make_shared<SfxRequest>(rReq);
1581 rReq.Ignore(); // the 'old' request is not relevant any more
1582 pDlg->StartExecuteAsync(
1583 [this, pDlg, xRequest=std::move(xRequest), pStyleSheet, nRetMask, xOldSet, nSlotId, bAddUndo, bUndo,
>>> CID 1603630: Performance inefficiencies (PASS_BY_VALUE)
>>> Capturing variable "aNewData" of type "ScStyleSaveData" (size 168 bytes) by value, which exceeds the low threshold of 128 bytes.
1584 aOldData=rOldData, aNewData=rNewData, aOldName, eFamily, bStyleToMarked, bListAction,
1585 pEditObject, aSelection]
1586 (sal_Int32 nResult) mutable -> void
1587 {
1588 SetInFormatDialog(false);
1589 ExecuteStyleEditDialog(pDlg, pStyleSheet, nResult, nRetMask, xOldSet, nSlotId,
** CID 1603629: Performance inefficiencies (PASS_BY_VALUE)
/sd/source/ui/view/drawview.cxx: 285 in sd::DrawView::SetMasterAttributes(SdrObject *, const SdPage &, SfxItemSet, SfxStyleSheetBasePool *, bool &, bool, bool)()
________________________________________________________________________________________________________
*** CID 1603629: Performance inefficiencies (PASS_BY_VALUE)
/sd/source/ui/view/drawview.cxx: 285 in sd::DrawView::SetMasterAttributes(SdrObject *, const SdPage &, SfxItemSet, SfxStyleSheetBasePool *, bool &, bool, bool)()
279 bOk = ::sd::View::SetAttributes(rSet, bReplaceAll);
280 }
281
282 return bOk;
283 }
284
>>> CID 1603629: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter rSet of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
285 void DrawView::SetMasterAttributes( SdrObject* pObject, const SdPage& rPage, SfxItemSet rSet, SfxStyleSheetBasePool* pStShPool, bool& bOk, bool bMaster, bool bSlide )
286 {
287 SdrInventor nInv = pObject->GetObjInventor();
288
289 if (nInv != SdrInventor::Default)
290 return;
** CID 1603628: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/ui/drawfunc/drtxtob.cxx: 894 in ScDrawTextObjectBar::ExecuteAttr(SfxRequest &)::[lambda(int) (instance 1)]::operator ()(int)()
________________________________________________________________________________________________________
*** CID 1603628: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/ui/drawfunc/drtxtob.cxx: 894 in ScDrawTextObjectBar::ExecuteAttr(SfxRequest &)::[lambda(int) (instance 1)]::operator ()(int)()
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 1603628: Performance inefficiencies (PASS_BY_VALUE)
>>> Capturing variable "aNewAttr" of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
894 [this, pDlg, pArgs, aNewAttr, bSet, xRequest=std::move(xRequest), pView] (sal_Int32 nResult) mutable -> void
895 {
896 if ( RET_OK == nResult )
897 aNewAttr.Put( *pDlg->GetOutputItemSet() );
898
899 pDlg->disposeOnce();
** CID 1603627: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/filter/inc/eeparser.hxx: 85 in ScEEParseEntry::ScEEParseEntry(SfxItemSet)()
________________________________________________________________________________________________________
*** CID 1603627: Performance inefficiencies (PASS_BY_VALUE)
/sc/source/filter/inc/eeparser.hxx: 85 in ScEEParseEntry::ScEEParseEntry(SfxItemSet)()
79 aItemSet( *pPool ),
80 nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0),
81 nTwips(0), nColOverlap(1), nRowOverlap(1),
82 nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true)
83 {}
84
>>> CID 1603627: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter _aItemSet of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
85 ScEEParseEntry( SfxItemSet _aItemSet ) :
86 aItemSet(std::move( _aItemSet )),
87 nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0),
88 nTwips(0), nColOverlap(1), nRowOverlap(1),
89 nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true)
90 {}
** CID 1603626: Null pointer dereferences (NULL_RETURNS)
________________________________________________________________________________________________________
*** CID 1603626: Null pointer dereferences (NULL_RETURNS)
/sw/source/core/doc/doclay.cxx: 211 in SwDoc::MakeFlySection_(const SwPosition &, const SwContentNode &, RndStdIds, const SfxItemSet *, SwFrameFormat *)()
205 pAnchor->GetPageNum() == 0 ) )
206 {
207 // set it again, needed for Undo
208 SwFormatAnchor aAnch( pFormat->GetAnchor() );
209 if (pAnchor && (RndStdIds::FLY_AT_FLY == pAnchor->GetAnchorId()))
210 {
>>> CID 1603626: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "rAnchPos->GetNode()->FindFlyStartNode()" when calling "SwPosition".
211 SwPosition aPos( *rAnchPos.GetNode().FindFlyStartNode() );
212 aAnch.SetAnchor( &aPos );
213 eAnchorId = RndStdIds::FLY_AT_FLY;
214 }
215 else
216 {
** CID 1603625: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/core/undo/rolbck.cxx: 1022 in SwHistoryChangeCharFormat::SwHistoryChangeCharFormat(SfxItemSet, rtl::OUString)()
________________________________________________________________________________________________________
*** CID 1603625: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/core/undo/rolbck.cxx: 1022 in SwHistoryChangeCharFormat::SwHistoryChangeCharFormat(SfxItemSet, rtl::OUString)()
1016 {
1017 m_pFlyFormat->SetFormatAttr( aChain );
1018 }
1019 }
1020
1021 // -> #i27615#
>>> CID 1603625: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter aSet of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
1022 SwHistoryChangeCharFormat::SwHistoryChangeCharFormat(SfxItemSet aSet,
1023 OUString sFormat)
1024 : SwHistoryHint(HSTRY_CHGCHARFMT)
1025 , m_OldSet(std::move(aSet)), m_Format(std::move(sFormat))
1026 {
1027 }
** CID 1603624: API usage errors (INVALIDATE_ITERATOR)
/sw/source/filter/xml/xmltble.cxx: 292 in SwXMLTableFrameFormatsSort_Impl::AddRow(SwFrameFormat &, std::basic_string_view<char16_t, std::char_traits<char16_t>>, unsigned int)()
________________________________________________________________________________________________________
*** CID 1603624: API usage errors (INVALIDATE_ITERATOR)
/sw/source/filter/xml/xmltble.cxx: 292 in SwXMLTableFrameFormatsSort_Impl::AddRow(SwFrameFormat &, std::basic_string_view<char16_t, std::char_traits<char16_t>>, unsigned int)()
286 continue;
287
288 if( pHasTextChangesOnly && (!pHasTextChangesOnly->GetValue() != !pTestHasTextChangesOnly->GetValue()) )
289 continue;
290
291 // found!
>>> CID 1603624: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "this->m_rFormatMap->find(pTestFormat)" though it is already past the end of its container.
292 auto const oName(m_rFormatMap.find(pTestFormat)->second);
293 assert(oName);
294 m_rFormatMap.try_emplace(&rFrameFormat, oName);
295 return {};
296 }
297
** CID 1603623: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/uibase/shells/textsh.cxx: 536 in SwTextShell::ExecInsert(SfxRequest &)::[lambda(int) (instance 2)]::operator ()(int) const()
________________________________________________________________________________________________________
*** CID 1603623: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/uibase/shells/textsh.cxx: 536 in SwTextShell::ExecInsert(SfxRequest &)::[lambda(int) (instance 2)]::operator ()(int) const()
530 SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
531 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
532 VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog(u"FrameDialog"_ustr,
533 GetView().GetViewFrame(),
534 GetView().GetFrameWeld(),
535 aSet));
>>> CID 1603623: Performance inefficiencies (PASS_BY_VALUE)
>>> Capturing variable "aSet" of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
536 pDlg->StartExecuteAsync([aSet, pDlg, nSlot, this](sal_Int32 nResult) {
537 if (nResult == RET_OK && pDlg->GetOutputItemSet())
538 {
539 SwFlyFrameAttrMgr aAttrMgr( true, GetShellPtr(), Frmmgr_Type::TEXT, nullptr );
540 //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point
541 SwWrtShell& rShell = GetShell();
** CID 1603622: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 218 in EditUndoConnectParas::EditUndoConnectParas(EditEngine *, int, unsigned short, SfxItemSet, SfxItemSet, const SfxStyleSheet *, const SfxStyleSheet *, bool)()
________________________________________________________________________________________________________
*** CID 1603622: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 218 in EditUndoConnectParas::EditUndoConnectParas(EditEngine *, int, unsigned short, SfxItemSet, SfxItemSet, const SfxStyleSheet *, const SfxStyleSheet *, bool)()
212
213 pEE->GetActiveView()->getImpl().SetEditSelection( EditSelection( aPaM, aPaM ) );
214 }
215
216 EditUndoConnectParas::EditUndoConnectParas(
217 EditEngine* pEE, sal_Int32 nN, sal_uInt16 nSP,
>>> CID 1603622: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter _aLeftParaAttribs of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
218 SfxItemSet _aLeftParaAttribs, SfxItemSet _aRightParaAttribs,
219 const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, bool bBkwrd) :
220 EditUndo(EDITUNDO_CONNECTPARAS, pEE),
221 nNode(nN),
222 nSepPos(nSP),
223 aLeftParaAttribs(std::move(_aLeftParaAttribs)),
** CID 1603621: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/core/undo/unattr.cxx: 753 in SwUndoAttr::SwUndoAttr(const SwPaM &, SfxItemSet, SetAttrMode)()
________________________________________________________________________________________________________
*** CID 1603621: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/core/undo/unattr.cxx: 753 in SwUndoAttr::SwUndoAttr(const SwPaM &, SfxItemSet, SetAttrMode)()
747 uno::Any aValue;
748 pItem->QueryValue(aValue, RES_TXTATR_CHARFMT);
749 aValue >>= m_aChrFormatName;
750 }
751 }
752
>>> CID 1603621: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter aSet of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
753 SwUndoAttr::SwUndoAttr( const SwPaM& rRange, SfxItemSet aSet,
754 const SetAttrMode nFlags )
755 : SwUndo( SwUndoId::INSATTR, &rRange.GetDoc() ), SwUndRng( rRange )
756 , m_AttrSet(std::move( aSet ))
757 , m_pHistory( new SwHistory )
758 , m_nNodeIndex( NODE_OFFSET_MAX )
** CID 1603620: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/filter/html/svxcss1.cxx: 670 in SvxCSS1MapEntry::SvxCSS1MapEntry(SfxItemSet, const SvxCSS1PropertyInfo &)()
________________________________________________________________________________________________________
*** CID 1603620: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/filter/html/svxcss1.cxx: 670 in SvxCSS1MapEntry::SvxCSS1MapEntry(SfxItemSet, const SvxCSS1PropertyInfo &)()
664
665 rItemSet.Put( *aBoxItem );
666
667 DestroyBorderInfos();
668 }
669
>>> CID 1603620: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter aItemSet of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
670 SvxCSS1MapEntry::SvxCSS1MapEntry( SfxItemSet aItemSet,
671 const SvxCSS1PropertyInfo& rProp ) :
672 m_aItemSet(std::move( aItemSet )),
673 m_aPropInfo( rProp )
674 {}
675
** CID 1603619: Performance inefficiencies (PASS_BY_VALUE)
/cui/source/options/dbregister.cxx: 53 in svx::RegistrationItemSetHolder::RegistrationItemSetHolder(SfxItemSet)()
________________________________________________________________________________________________________
*** CID 1603619: Performance inefficiencies (PASS_BY_VALUE)
/cui/source/options/dbregister.cxx: 53 in svx::RegistrationItemSetHolder::RegistrationItemSetHolder(SfxItemSet)()
47
48 using namespace ::com::sun::star::ui::dialogs;
49 using namespace ::svt;
50
51 // class RegistrationItemSetHolder -------------------------------------------------
52
>>> CID 1603619: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter _aMasterSet of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
53 RegistrationItemSetHolder::RegistrationItemSetHolder( SfxItemSet _aMasterSet )
54 :m_aRegistrationItems(std::move( _aMasterSet ))
55 {
56 DbRegisteredNamesConfig::GetOptions( m_aRegistrationItems );
57 }
58
** CID 1603618: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/uibase/shells/drwtxtex.cxx: 370 in SwDrawTextShell::Execute(SfxRequest &)::[lambda(int) (instance 1)]::operator ()(int)()
________________________________________________________________________________________________________
*** CID 1603618: Performance inefficiencies (PASS_BY_VALUE)
/sw/source/uibase/shells/drwtxtex.cxx: 370 in SwDrawTextShell::Execute(SfxRequest &)::[lambda(int) (instance 1)]::operator ()(int)()
364 pDlg->SetCurPageId(pItem->GetValue());
365 }
366
367 auto xRequest = std::make_shared<SfxRequest>(rReq);
368 rReq.Ignore(); // the 'old' request is not relevant any more
369 pDlg->StartExecuteAsync(
>>> CID 1603618: Performance inefficiencies (PASS_BY_VALUE)
>>> Capturing variable "aNewAttr2" of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
370 [this, pDlg, xRequest=std::move(xRequest), nEEWhich, aNewAttr2=aNewAttr, pOLV, bRestoreSelection, aOldSelection] (sal_Int32 nResult) mutable ->void
371 {
372 if (nResult == RET_OK)
373 {
374 xRequest->Done( *( pDlg->GetOutputItemSet() ) );
375 aNewAttr2.Put(*pDlg->GetOutputItemSet());
** CID 1603617: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editdoc.cxx: 554 in ContentAttribsInfo::ContentAttribsInfo(SfxItemSet)()
________________________________________________________________________________________________________
*** CID 1603617: Performance inefficiencies (PASS_BY_VALUE)
/editeng/source/editeng/editdoc.cxx: 554 in ContentAttribsInfo::ContentAttribsInfo(SfxItemSet)()
548 assert(rParas.SafeGetObject(i)->GetNode() != nullptr);
549 assert(rParas.SafeGetObject(i)->GetNode() == rDoc.GetObject(i));
550 }
551 }
552 #endif
553
>>> CID 1603617: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter aParaAttribs of type "SfxItemSet" (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.
554 ContentAttribsInfo::ContentAttribsInfo( SfxItemSet aParaAttribs ) :
555 aPrevParaAttribs(std::move( aParaAttribs))
556 {
557 }
558
559 void ContentAttribsInfo::AppendCharAttrib(EditCharAttrib* pNew)
** CID 1603616: Null pointer dereferences (NULL_RETURNS)
________________________________________________________________________________________________________
*** CID 1603616: Null pointer dereferences (NULL_RETURNS)
/sfx2/source/doc/objstor.cxx: 3055 in SfxObjectShell::DoSave_Impl(const SfxItemSet *)()
3049 // Save the original interaction handler
3050 Any aOriginalInteract;
3051 if (const SfxUnoAnyItem *pItem = pRetrMedium->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false))
3052 {
3053 aOriginalInteract = pItem->GetValue();
3054 // The original pRetrMedium and potential replacement pMediumTmp have the same interaction handler at this point
>>> CID 1603616: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pMediumTmp->GetItemSet()->GetItemIfSet(TypedWhichId<SfxUnoAnyItem>(6675), false)->GetValue()" when calling "operator ==".
3055 assert(pMediumTmp->GetItemSet().GetItemIfSet(SID_INTERACTIONHANDLER, false)->GetValue() == aOriginalInteract);
3056 }
3057
3058 // an interaction handler here can acquire only in case of GUI Saving
3059 // and should be removed after the saving is done
3060 css::uno::Reference< XInteractionHandler > xInteract;
** CID 1603615: API usage errors (INVALIDATE_ITERATOR)
/sw/source/filter/xml/xmltble.cxx: 483 in SwXMLTableFrameFormatsSort_Impl::AddCell(SwFrameFormat &, std::basic_string_view<char16_t, std::char_traits<char16_t>>, unsigned int, unsigned int, bool)()
________________________________________________________________________________________________________
*** CID 1603615: API usage errors (INVALIDATE_ITERATOR)
/sw/source/filter/xml/xmltble.cxx: 483 in SwXMLTableFrameFormatsSort_Impl::AddCell(SwFrameFormat &, std::basic_string_view<char16_t, std::char_traits<char16_t>>, unsigned int, unsigned int, bool)()
477 continue;
478
479 if( pHasTextChangesOnly && (!pHasTextChangesOnly->GetValue() != !pTestHasTextChangesOnly->GetValue()) )
480 continue;
481
482 // found!
>>> CID 1603615: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "this->m_rFormatMap->find(pTestFormat)" though it is already past the end of its container.
483 auto const oName(m_rFormatMap.find(pTestFormat)->second);
484 assert(oName);
485 m_rFormatMap.try_emplace(&rFrameFormat, oName);
486 return {};
487 }
488
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DPWAe_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtGn3f73tBW8Z5htJi0IqKThHbLvVFW465pzWTn63QZOWYkLjEyUB0yjlVFOg3lcLYJfhYZhVN4fFuQc-2B-2BZFBgLMSERzjX1nxjIQESpgsQmvvwsxyAWBBdo9nyByOp9JOT7aod3joP01t5o5a7moKXCYXX3CRGLcBpkGXYGdo32sM-3D
More information about the LibreOffice
mailing list