Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 5 new defect(s) introduced to LibreOffice found with Coverity Scan. 1 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 5 of 5 defect(s) ** CID 1517258: (NULL_RETURNS) ________________________________________________________________________________________________________ *** CID 1517258: (NULL_RETURNS) /sd/source/ui/view/drviews9.cxx: 346 in sd::DrawViewShell::AttrExec(SfxRequest &)() 340 aAttr.ClearItem (XATTR_FILLSTYLE); 341 342 for ( i = 0; i < nCounts; i ++) 343 { 344 const XGradientEntry* pEntry = pGradientList->GetGradient(i); 345 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "operator ==". 346 if (pEntry->GetName () == pName->GetValue ()) 347 { 348 XGradient aGradient(pEntry->GetGradient()); 349 350 if (rReq.GetSlot () == SID_SETGRADSTARTCOLOR) aGradient.SetStartColor (aColor); 351 else aGradient.SetEndColor (aColor); /sd/source/ui/view/drviews9.cxx: 619 in sd::DrawViewShell::AttrExec(SfxRequest &)() 613 ::tools::Long i; 614 615 for ( i = 0; i < nCounts; i++ ) 616 { 617 const XHatchEntry* pEntry = pHatchList->GetHatch(i); 618 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "operator ==". 619 if (pEntry->GetName () == pName->GetValue ()) 620 { 621 XHatch aHatch(pEntry->GetHatch()); 622 623 aHatch.SetHatchStyle (static_cast<css::drawing::HatchStyle>(pStyle->GetValue ())); 624 aHatch.SetDistance (pDistance->GetValue ()); /sd/source/ui/view/drviews9.cxx: 713 in sd::DrawViewShell::AttrExec(SfxRequest &)() 707 ::tools::Long nCounts = pHatchList->Count (); 708 709 for (::tools::Long i = 0; i < nCounts; i ++) 710 { 711 const XHatchEntry* pEntry = pHatchList->GetHatch(i); 712 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "operator ==". 713 if (pEntry->GetName () == pName->GetValue ()) 714 { 715 aAttr.ClearItem (XATTR_FILLHATCH); 716 aAttr.ClearItem (XATTR_FILLSTYLE); 717 XFillStyleItem aStyleItem(drawing::FillStyle_HATCH); 718 aStyleItem.SetWhich(XATTR_FILLSTYLE); /sd/source/ui/view/drviews9.cxx: 542 in sd::DrawViewShell::AttrExec(SfxRequest &)() 536 ::tools::Long i; 537 538 for ( i = 0; i < nCounts; i++ ) 539 { 540 const XGradientEntry* pEntry = pGradientList->GetGradient(i); 541 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "operator ==". 542 if (pEntry->GetName () == pName->GetValue ()) 543 { 544 XGradient aGradient(pEntry->GetGradient()); 545 546 aGradient.SetGradientStyle (static_cast<css::awt::GradientStyle>(pStyle->GetValue ())); 547 aGradient.SetAngle (Degree10(pAngle->GetValue () * 10)); /sd/source/ui/view/drviews9.cxx: 479 in sd::DrawViewShell::AttrExec(SfxRequest &)() 473 474 aAttr.ClearItem (XATTR_LINEDASH); 475 aAttr.ClearItem (XATTR_LINESTYLE); 476 477 XDashListRef pDashList = GetDoc()->GetDashList(); 478 ::tools::Long nCounts = pDashList->Count (); >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "make_unique". 479 std::unique_ptr<XDashEntry> pEntry = std::make_unique<XDashEntry>(aNewDash, pName->GetValue()); 480 ::tools::Long i; 481 482 for ( i = 0; i < nCounts; i++ ) 483 if (pDashList->GetDash (i)->GetName () == pName->GetValue ()) 484 break; /sd/source/ui/view/drviews9.cxx: 436 in sd::DrawViewShell::AttrExec(SfxRequest &)() 430 } 431 432 if (i >= nCounts) 433 { 434 XHatch aHatch (aColor); 435 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "make_unique". 436 GetDoc()->GetHatchList()->Insert(std::make_unique<XHatchEntry>(aHatch, pName->GetValue())); 437 438 XFillStyleItem aStyleItem(drawing::FillStyle_HATCH); 439 aStyleItem.SetWhich(XATTR_FILLSTYLE); 440 aAttr.Put(aStyleItem); 441 XFillHatchItem aHatchItem(pName->GetValue (), aHatch); /sd/source/ui/view/drviews9.cxx: 373 in sd::DrawViewShell::AttrExec(SfxRequest &)() 367 ? aColor 368 : aBlack, 369 (rReq.GetSlot () == SID_SETGRADENDCOLOR) 370 ? aColor 371 : aBlack); 372 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "make_unique". 373 GetDoc()->GetGradientList()->Insert(std::make_unique<XGradientEntry>(aGradient, pName->GetValue())); 374 375 XFillStyleItem aStyleItem(drawing::FillStyle_GRADIENT); 376 aStyleItem.SetWhich(XATTR_FILLSTYLE); 377 aAttr.Put(aStyleItem); 378 XFillGradientItem aGradientItem(pName->GetValue(), aGradient); /sd/source/ui/view/drviews9.cxx: 642 in sd::DrawViewShell::AttrExec(SfxRequest &)() 636 637 if (i >= nCounts) 638 { 639 XHatch aHatch (Color(0), static_cast<css::drawing::HatchStyle>(pStyle->GetValue ()), pDistance->GetValue (), 640 Degree10(pAngle->GetValue () * 10)); 641 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "make_unique". 642 pHatchList->Insert(std::make_unique<XHatchEntry>(aHatch, pName->GetValue())); 643 XFillStyleItem aStyleItem(drawing::FillStyle_HATCH); 644 aStyleItem.SetWhich(XATTR_FILLSTYLE); 645 aAttr.Put(aStyleItem); 646 XFillHatchItem aHatchItem(pName->GetValue (), aHatch); 647 aHatchItem.SetWhich(XATTR_FILLHATCH); /sd/source/ui/view/drviews9.cxx: 416 in sd::DrawViewShell::AttrExec(SfxRequest &)() 410 aAttr.ClearItem (XATTR_FILLSTYLE); 411 412 for ( i = 0; i < nCounts; i ++) 413 { 414 const XHatchEntry* pEntry = pHatchList->GetHatch(i); 415 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "operator ==". 416 if (pEntry->GetName () == pName->GetValue ()) 417 { 418 XHatch aHatch(pEntry->GetHatch()); 419 420 aHatch.SetColor (aColor); 421 /sd/source/ui/view/drviews9.cxx: 572 in sd::DrawViewShell::AttrExec(SfxRequest &)() 566 Color aBlack (0, 0, 0); 567 XGradient aGradient (aBlack, aBlack, static_cast<css::awt::GradientStyle>(pStyle->GetValue ()), 568 Degree10(pAngle->GetValue () * 10), static_cast<short>(pCenterX->GetValue ()), 569 static_cast<short>(pCenterY->GetValue ()), static_cast<short>(pBorder->GetValue ()), 570 static_cast<short>(pStart->GetValue ()), static_cast<short>(pEnd->GetValue ())); 571 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "make_unique". 572 pGradientList->Insert(std::make_unique<XGradientEntry>(aGradient, pName->GetValue())); 573 XFillStyleItem aStyleItem(drawing::FillStyle_GRADIENT); 574 aStyleItem.SetWhich(XATTR_FILLSTYLE); 575 aAttr.Put(aStyleItem); 576 XFillGradientItem aGradientItem(pName->GetValue (), aGradient); 577 aGradientItem.SetWhich(XATTR_FILLGRADIENT); /sd/source/ui/view/drviews9.cxx: 676 in sd::DrawViewShell::AttrExec(SfxRequest &)() 670 ::tools::Long nCounts = pGradientList->Count (); 671 672 for (::tools::Long i = 0; i < nCounts; i ++) 673 { 674 const XGradientEntry* pEntry = pGradientList->GetGradient(i); 675 >>> CID 1517258: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pName->GetValue()" when calling "operator ==". 676 if (pEntry->GetName () == pName->GetValue ()) 677 { 678 aAttr.ClearItem (XATTR_FILLGRADIENT); 679 aAttr.ClearItem (XATTR_FILLSTYLE); 680 XFillStyleItem aStyleItem(drawing::FillStyle_GRADIENT); 681 aStyleItem.SetWhich(XATTR_FILLSTYLE); ** CID 1517257: (UNINIT) ________________________________________________________________________________________________________ *** CID 1517257: (UNINIT) /sc/source/filter/excel/xedbdata.cxx: 238 in XclExpTables::SaveTableXml(XclExpXmlStream &, const XclExpTables::Entry &)() 232 // OOXTODO: write <calculatedColumnFormula> once we support it, in 233 // which case we'd need start/endElement XML_tableColumn for such 234 // column. 235 236 // OOXTODO: write <totalsRowFormula> once we support it. 237 >>> CID 1517257: (UNINIT) >>> Using uninitialized value "<temporary>._M_payload._M_payload" when calling "~optional". 238 pTableStrm->singleElement( XML_tableColumn, 239 XML_id, OString::number(i+1), 240 XML_name, rColNames[i].toUtf8(), 241 XML_totalsRowFunction, (i < rColAttributes.size() ? rColAttributes[i].maTotalsFunction : std::nullopt) 242 // OOXTODO: XML_dataCellStyle, ..., 243 // OOXTODO: XML_dataDxfId, ..., /sc/source/filter/excel/xedbdata.cxx: 238 in XclExpTables::SaveTableXml(XclExpXmlStream &, const XclExpTables::Entry &)() 232 // OOXTODO: write <calculatedColumnFormula> once we support it, in 233 // which case we'd need start/endElement XML_tableColumn for such 234 // column. 235 236 // OOXTODO: write <totalsRowFormula> once we support it. 237 >>> CID 1517257: (UNINIT) >>> Using uninitialized value "<temporary>._M_payload._M_payload" when calling "~optional". 238 pTableStrm->singleElement( XML_tableColumn, 239 XML_id, OString::number(i+1), 240 XML_name, rColNames[i].toUtf8(), 241 XML_totalsRowFunction, (i < rColAttributes.size() ? rColAttributes[i].maTotalsFunction : std::nullopt) 242 // OOXTODO: XML_dataCellStyle, ..., 243 // OOXTODO: XML_dataDxfId, ..., ** CID 1517256: Null pointer dereferences (NULL_RETURNS) ________________________________________________________________________________________________________ *** CID 1517256: Null pointer dereferences (NULL_RETURNS) /sd/source/ui/view/ViewShellImplementation.cxx: 129 in sd::ViewShell::Implementation::ProcessModifyPageSlot(SfxRequest &, SdPage *, PageKind)() 123 const SfxBoolItem* pBVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK); 124 const SfxBoolItem* pBObjsVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ); 125 AutoLayout aLayout (static_cast<AutoLayout>(pNewAutoLayout->GetValue ())); 126 if (aLayout >= AUTOLAYOUT_START 127 && aLayout < AUTOLAYOUT_END) 128 { >>> CID 1517256: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pNewName->GetValue()" when calling "operator =". 129 aNewName = pNewName->GetValue (); 130 aNewAutoLayout = static_cast<AutoLayout>(pNewAutoLayout->GetValue ()); 131 bBVisible = pBVisible->GetValue (); 132 bBObjsVisible = pBObjsVisible->GetValue (); 133 } 134 else ** CID 1517255: Null pointer dereferences (NULL_RETURNS) ________________________________________________________________________________________________________ *** CID 1517255: Null pointer dereferences (NULL_RETURNS) /sd/source/ui/func/fuinsfil.cxx: 242 in sd::FuInsertFile::DoExecute(SfxRequest &)() 236 } 237 else 238 { 239 const SfxStringItem* pFileName = rReq.GetArg<SfxStringItem>(ID_VAL_DUMMY0); 240 const SfxStringItem* pFilterName = rReq.GetArg<SfxStringItem>(ID_VAL_DUMMY1); 241 >>> CID 1517255: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pFileName->GetValue()" when calling "operator =". 242 aFile = pFileName->GetValue (); 243 244 if( pFilterName ) 245 aFilterName = pFilterName->GetValue (); 246 } 247 ** CID 1517253: (NULL_RETURNS) ________________________________________________________________________________________________________ *** CID 1517253: (NULL_RETURNS) /sd/source/ui/view/viewshe3.cxx: 244 in sd::ViewShell::CreateOrDuplicatePage(SfxRequest &, PageKind, SdPage *, int)() 238 { 239 aNotesPageName = pPageName->GetValue (); 240 eNotesLayout = static_cast<AutoLayout>(pLayout->GetValue ()); 241 } 242 else 243 { >>> CID 1517253: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pPageName->GetValue()" when calling "operator =". 244 aStandardPageName = pPageName->GetValue (); 245 eStandardLayout = static_cast<AutoLayout>(pLayout->GetValue ()); 246 } 247 248 bIsPageBack = pIsPageBack->GetValue (); 249 bIsPageObj = pIsPageObj->GetValue (); /sd/source/ui/view/viewshe3.cxx: 239 in sd::ViewShell::CreateOrDuplicatePage(SfxRequest &, PageKind, SdPage *, int)() 233 const SfxBoolItem* pIsPageObj = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ); 234 235 if (CHECK_RANGE (AUTOLAYOUT_START, static_cast<AutoLayout>(pLayout->GetValue ()), AUTOLAYOUT_END)) 236 { 237 if (ePageKind == PageKind::Notes) 238 { >>> CID 1517253: (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pPageName->GetValue()" when calling "operator =". 239 aNotesPageName = pPageName->GetValue (); 240 eNotesLayout = static_cast<AutoLayout>(pLayout->GetValue ()); 241 } 242 else 243 { 244 aStandardPageName = pPageName->GetValue (); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DJIZO_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJihEG4BHwre3V4zTYaNnYrSYzpn8eGGy6OzI0s-2FhUQKjvxz6kj-2FY7B80VGICvPpfq0Hq4-2FyUtyrgReTyqmaA4wONypLct-2B9qFfUbjw-2B9nhrm-2BU7kTM1VzX3GMSZRH6FExKB9OSZWfHTPtDhwBCkyodSMwNIcdL6s8X0AfIQlP0oiE-3D