Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


Hi,

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

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


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


** CID 1457618:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3474 in SvxColorToolBoxControl::createPopupWindow(vcl::Window 
*)()


________________________________________________________________________________________________________
*** CID 1457618:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3474 in SvxColorToolBoxControl::createPopupWindow(vcl::Window 
*)()
3468     
3469         const css::uno::Reference<css::awt::XWindow> xParent = m_xFrame->getContainerWindow();
3470         weld::Window* pParentFrame = Application::GetFrameWeld(xParent);
3471     
3472         ToolBox* pToolBox = nullptr;
3473         sal_uInt16 nId = 0;
    CID 1457618:  Error handling issues  (CHECKED_RETURN)
    Calling "getToolboxId" without checking return value (as is done elsewhere 32 out of 34 
times).
3474         getToolboxId(nId, &pToolBox);
3475     
3476         auto xPopover = std::make_unique<ColorWindow>(
3477                             m_aCommandURL,
3478                             m_xPaletteManager,
3479                             m_aColorStatus,

** CID 1457617:    (CHECKED_RETURN)
/oox/source/export/chartexport.cxx: 1158 in oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()
/oox/source/export/chartexport.cxx: 1108 in oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()
/oox/source/export/chartexport.cxx: 1128 in oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()


________________________________________________________________________________________________________
*** CID 1457617:    (CHECKED_RETURN)
/oox/source/export/chartexport.cxx: 1158 in oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()
1152                                 sal_Int32 nDataSeqSize = xValues->getData().getLength();
1153                                 nIndex += nDataSeqSize;
1154                             }
1155                         }
1156                         else
1157                         {
    CID 1457617:    (CHECKED_RETURN)
    Calling "getProperty" without checking return value (as is done elsewhere 23 out of 28 
times).
1158                             aSeriesProp.getProperty(bShowLegendEntry, PROP_ShowLegendEntry);
1159                             if (!bShowLegendEntry)
1160                             {
1161                                 pFS->startElement(FSNS(XML_c, XML_legendEntry));
1162                                 pFS->singleElement(FSNS(XML_c, XML_idx), XML_val,
1163                                                    OString::number(nIndex));
/oox/source/export/chartexport.cxx: 1108 in oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()
1102             sal_Int32 nIndex = 0;
1103             bool bShowLegendEntry;
1104             for (const auto& rCooSys : xCooSysSequence)
1105             {
1106                 PropertySet aCooSysProp(rCooSys);
1107                 bool bSwapXAndY = false;
    CID 1457617:    (CHECKED_RETURN)
    Calling "getProperty" without checking return value (as is done elsewhere 23 out of 28 
times).
1108                 aCooSysProp.getProperty(bSwapXAndY, PROP_SwapXAndYAxis);
1109     
1110                 Reference<chart2::XChartTypeContainer> xChartTypeContainer(rCooSys, 
UNO_QUERY_THROW);
1111                 const Sequence<Reference<chart2::XChartType>> 
xChartTypeSequence(xChartTypeContainer->getChartTypes());
1112                 if (!xChartTypeSequence.hasElements())
1113                     continue;
/oox/source/export/chartexport.cxx: 1128 in oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()
1122                     if (bSwapXAndY)
1123                         nIndex += aDataSeriesSeq.getLength() - 1;
1124                     for (const auto& rDataSeries : aDataSeriesSeq)
1125                     {
1126                         PropertySet aSeriesProp(rDataSeries);
1127                         bool bVaryColorsByPoint = false;
    CID 1457617:    (CHECKED_RETURN)
    Calling "getProperty" without checking return value (as is done elsewhere 23 out of 28 
times).
1128                         aSeriesProp.getProperty(bVaryColorsByPoint, PROP_VaryColorsByPoint);
1129                         if (bVaryColorsByPoint)
1130                         {
1131                             Sequence<sal_Int32> deletedLegendEntriesSeq;
1132                             aSeriesProp.getProperty(deletedLegendEntriesSeq, 
PROP_DeletedLegendEntries);
1133                             for (auto& deletedLegendEntry : deletedLegendEntriesSeq)

** CID 1457616:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3508 in SvxColorToolBoxControl::statusChanged(const 
com::sun::star::frame::FeatureStateEvent &)()


________________________________________________________________________________________________________
*** CID 1457616:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3508 in SvxColorToolBoxControl::statusChanged(const 
com::sun::star::frame::FeatureStateEvent &)()
3502     }
3503     
3504     void SvxColorToolBoxControl::statusChanged( const css::frame::FeatureStateEvent& rEvent )
3505     {
3506         ToolBox* pToolBox = nullptr;
3507         sal_uInt16 nId = 0;
    CID 1457616:  Error handling issues  (CHECKED_RETURN)
    Calling "getToolboxId" without checking return value (as is done elsewhere 32 out of 34 
times).
3508         getToolboxId(nId, &pToolBox);
3509     
3510         if ( rEvent.FeatureURL.Complete == m_aCommandURL )
3511         {
3512             if (m_pToolbar)
3513                 m_pToolbar->set_item_sensitive(m_aCommandURL.toUtf8(), rEvent.IsEnabled);

** CID 1457615:  Uninitialized members  (UNINIT_CTOR)
/svx/source/tbxctrls/tbcontrl.cxx: 4362 in 
MenuOrToolMenuButton::MenuOrToolMenuButton(weld::MenuButton *)()


________________________________________________________________________________________________________
*** CID 1457615:  Uninitialized members  (UNINIT_CTOR)
/svx/source/tbxctrls/tbcontrl.cxx: 4362 in 
MenuOrToolMenuButton::MenuOrToolMenuButton(weld::MenuButton *)()
4356     
4357     MenuOrToolMenuButton::MenuOrToolMenuButton(weld::MenuButton* pMenuButton)
4358         : m_pMenuButton(pMenuButton)
4359         , m_pToolbar(nullptr)
4360         , m_pControl(nullptr)
4361     {
    CID 1457615:  Uninitialized members  (UNINIT_CTOR)
    Non-static class member "m_nId" is not initialized in this constructor nor in any functions 
that it calls.
4362     }
4363     
4364     MenuOrToolMenuButton::MenuOrToolMenuButton(weld::Toolbar* pToolbar, const OString& rIdent)
4365         : m_pMenuButton(nullptr)
4366         , m_pToolbar(pToolbar)
4367         , m_aIdent(rIdent)

** CID 1457614:  Uninitialized members  (UNINIT_CTOR)
/svx/source/tbxctrls/tbcontrl.cxx: 4370 in MenuOrToolMenuButton::MenuOrToolMenuButton(weld::Toolbar 
*, const rtl::OString &)()


________________________________________________________________________________________________________
*** CID 1457614:  Uninitialized members  (UNINIT_CTOR)
/svx/source/tbxctrls/tbcontrl.cxx: 4370 in MenuOrToolMenuButton::MenuOrToolMenuButton(weld::Toolbar 
*, const rtl::OString &)()
4364     MenuOrToolMenuButton::MenuOrToolMenuButton(weld::Toolbar* pToolbar, const OString& rIdent)
4365         : m_pMenuButton(nullptr)
4366         , m_pToolbar(pToolbar)
4367         , m_aIdent(rIdent)
4368         , m_pControl(nullptr)
4369     {
    CID 1457614:  Uninitialized members  (UNINIT_CTOR)
    Non-static class member "m_nId" is not initialized in this constructor nor in any functions 
that it calls.
4370     }
4371     
4372     MenuOrToolMenuButton::MenuOrToolMenuButton(SvxColorToolBoxControl* pControl, ToolBox* 
pToolbar, sal_uInt16 nId)
4373         : m_pMenuButton(nullptr)
4374         , m_pToolbar(nullptr)
4375         , m_pControl(pControl)

** CID 1457613:    (CHECKED_RETURN)
/oox/source/drawingml/chart/titleconverter.cxx: 295 in 
oox::drawingml::chart::LegendConverter::legendEntriesFormatting(const 
com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram> &)()
/oox/source/drawingml/chart/titleconverter.cxx: 275 in 
oox::drawingml::chart::LegendConverter::legendEntriesFormatting(const 
com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram> &)()


________________________________________________________________________________________________________
*** CID 1457613:    (CHECKED_RETURN)
/oox/source/drawingml/chart/titleconverter.cxx: 295 in 
oox::drawingml::chart::LegendConverter::legendEntriesFormatting(const 
com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram> &)()
289                 if (bSwapXAndY)
290                     nIndex += aDataSeriesSeq.getLength() - 1;
291                 for (const auto& rDataSeries : aDataSeriesSeq)
292                 {
293                     PropertySet aSeriesProp(rDataSeries);
294                     bool bVaryColorsByPoint = false;
    CID 1457613:    (CHECKED_RETURN)
    Calling "getProperty" without checking return value (as is done elsewhere 23 out of 28 
times).
295                     aSeriesProp.getProperty(bVaryColorsByPoint, PROP_VaryColorsByPoint);
296     
297                     if (bVaryColorsByPoint)
298                     {
299                         Reference<XDataSource> xDSrc(rDataSeries, UNO_QUERY);
300                         if (!xDSrc.is())
/oox/source/drawingml/chart/titleconverter.cxx: 275 in 
oox::drawingml::chart::LegendConverter::legendEntriesFormatting(const 
com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram> &)()
269     
270         sal_Int32 nIndex = 0;
271         for (const auto& rCooSys : xCooSysSequence)
272         {
273             PropertySet aCooSysProp(rCooSys);
274             bool bSwapXAndY = false;
    CID 1457613:    (CHECKED_RETURN)
    Calling "getProperty" without checking return value (as is done elsewhere 23 out of 28 
times).
275             aCooSysProp.getProperty(bSwapXAndY, PROP_SwapXAndYAxis);
276     
277             Reference<XChartTypeContainer> xChartTypeContainer(rCooSys, UNO_QUERY_THROW);
278             const Sequence<Reference<XChartType>> 
xChartTypeSequence(xChartTypeContainer->getChartTypes());
279             if (!xChartTypeSequence.hasElements())
280                 continue;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyPN2q7WOuxr-2FATdoRdJ3lQE-2FC9Vf7MiNWNDm5a4gofPa2nfOuLv13tTmz-2By9533ih4MYkjmdJxn33htv5xzZCO1JJsBAb-2B82zjc6aq798iMdrr1OsLYwsCaOVNRxqjQyuG3vPrLRCsvike3tULoW7igeyeL6jLJkuLddhyOV3Qxt0S-2F2SnBnT6-2B2mATPEFiib


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.