Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1438404:  Incorrect expression  (IDENTICAL_BRANCHES)
/sdext/source/presenter/PresenterFrameworkObserver.cxx: 102 in 
sdext::presenter::PresenterFrameworkObserver::notifyConfigurationChange(const 
com::sun::star::drawing::framework::ConfigurationChangeEvent &)()


________________________________________________________________________________________________________
*** CID 1438404:  Incorrect expression  (IDENTICAL_BRANCHES)
/sdext/source/presenter/PresenterFrameworkObserver.cxx: 102 in 
sdext::presenter::PresenterFrameworkObserver::notifyConfigurationChange(const 
com::sun::star::drawing::framework::ConfigurationChangeEvent &)()
96     void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange (
97         const ConfigurationChangeEvent& rEvent)
98     {
99         bool bDispose(false);
100     
101         Action aAction (maAction);
>>>     CID 1438404:  Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed regardless of whether "rEvent.Type == 
>>> "ConfigurationUpdateEnd"" is true, because the 'then' and 'else' branches 
>>> are identical. Should one of the branches be modified, or the entire 'if' 
>>> statement replaced?
102         if (rEvent.Type == "ConfigurationUpdateEnd")
103         {
104             Shutdown();
105             aAction(true);
106             bDispose = true;
107         }

** CID 1438403:  Error handling issues  (CHECKED_RETURN)
/sd/source/filter/eppt/pptx-epptooxml.cxx: 1175 in 
oox::core::PowerPointExport::WriteAnimationNodeAnimate(const 
std::shared_ptr<sax_fastparser::FastSerializerHelper> &, const 
com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &, 
int, bool)()


________________________________________________________________________________________________________
*** CID 1438403:  Error handling issues  (CHECKED_RETURN)
/sd/source/filter/eppt/pptx-epptooxml.cxx: 1175 in 
oox::core::PowerPointExport::WriteAnimationNodeAnimate(const 
std::shared_ptr<sax_fastparser::FastSerializerHelper> &, const 
com::sun::star::uno::Reference<com::sun::star::animations::XAnimationNode> &, 
int, bool)()
1169             OUString aPath;
1170             Reference<XAnimateMotion> xMotion(rXNode, UNO_QUERY);
1171             if (xMotion.is())
1172             {
1173                 xMotion->getPath() >>= aPath;
1174                 ::basegfx::B2DPolyPolygon aPolyPoly;
>>>     CID 1438403:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "importFromSvgD" without checking return value (as is done 
>>> elsewhere 24 out of 26 times).
1175                 ::basegfx::utils::importFromSvgD(aPolyPoly, aPath, true, 
nullptr);
1176                 aPath = ::basegfx::utils::exportToSvgD(aPolyPoly, false, 
false, true, true);
1177             }
1178     
1179             pFS->startElementNS(XML_p, nXmlNodeType,
1180                                 XML_origin, "layout",

** CID 1438402:    (NEGATIVE_RETURNS)


________________________________________________________________________________________________________
*** CID 1438402:    (NEGATIVE_RETURNS)
/sc/source/filter/xml/xmlexprt.cxx: 1492 in ScXMLExport::OpenRow(int, int, int, 
ScXMLCachedRowAttrAccess &)()
1486                         ++nEqualRows;
1487                     else
1488                     {
1489                         if (nRow < nEndRow)
1490                         {
1491                             ScRowFormatRanges* pTempRowFormatRanges = new 
ScRowFormatRanges(pRowFormatRanges.get());
>>>     CID 1438402:    (NEGATIVE_RETURNS)
>>>     "nPrevIndex" is passed to a parameter that cannot be negative.
1492                             OpenAndCloseRow(nPrevIndex, nRow - nEqualRows, 
nEqualRows, bPrevHidden, bPrevFiltered);
1493                             pRowFormatRanges.reset(pTempRowFormatRanges);
1494                         }
1495                         else
1496                             OpenAndCloseRow(nPrevIndex, nRow - nEqualRows, 
nEqualRows, bPrevHidden, bPrevFiltered);
1497                         nEqualRows = 1;
/sc/source/filter/xml/xmlexprt.cxx: 1504 in ScXMLExport::OpenRow(int, int, int, 
ScXMLCachedRowAttrAccess &)()
1498                         nPrevIndex = nIndex;
1499                         bPrevHidden = bHidden;
1500                         bPrevFiltered = bFiltered;
1501                     }
1502                 }
1503             }
>>>     CID 1438402:    (NEGATIVE_RETURNS)
>>>     "nPrevIndex" is passed to a parameter that cannot be negative.
1504             OpenNewRow(nPrevIndex, nRow - nEqualRows, nEqualRows, 
bPrevHidden, bPrevFiltered);
1505         }
1506         else
1507         {
1508             sal_Int32 nIndex = pRowStyles->GetStyleNameIndex(nTable, 
nStartRow);
1509             bool bHidden = false;

** CID 1438401:  Integer handling issues  (NEGATIVE_RETURNS)


________________________________________________________________________________________________________
*** CID 1438401:  Integer handling issues  (NEGATIVE_RETURNS)
/sc/source/filter/xml/xmlexprt.cxx: 883 in ScXMLExport::ExportColumns(int, 
const ScRange &, bool)()
877                 bPrevIsVisible = bIsVisible;
878                 nPrevIndex = nIndex;
879                 nPrevColumn = nColumn;
880                 nColsRepeated = 1;
881             }
882         }
>>>     CID 1438401:  Integer handling issues  (NEGATIVE_RETURNS)
>>>     "nPrevIndex" is passed to a parameter that cannot be negative.
883         WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
884         if (!bIsClosed)
885             CloseHeaderColumn();
886         if (pGroupColumns->IsGroupEnd(nColumn - 1))
887             pGroupColumns->CloseGroups(nColumn - 1);
888     }


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy8oHPJtXU9WvUUlMDWdUK0BoJzA8NsvydehHblgXP-2FiQg31bvczGRwRaVxgnDNcwp-2FYlAYXUz-2FBFUKuPW5fM2kBREljzikzXzCdLRpRf9NrmnmGaDTgl6B36NQ3m9sThRXKgZ4ZRKPnsjf5CeYSG5tMRerLxfSNPNYNSssv4VK4Y-3D

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to