New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Wed Apr 2 06:54:32 UTC 2025
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
2 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 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 2 of 2 defect(s)
** CID 1645567: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/accessibility/AccessibleChartView.cxx: 235 in chart::AccessibleChartView::initialize(chart::ChartController &, const rtl::Reference<chart::ChartModel> &, const rtl::Reference<chart::ChartView> &, const com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> &, chart::ChartWindow *)()
________________________________________________________________________________________________________
*** CID 1645567: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/accessibility/AccessibleChartView.cxx: 235 in chart::AccessibleChartView::initialize(chart::ChartController &, const rtl::Reference<chart::ChartModel> &, const rtl::Reference<chart::ChartView> &, const com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> &, chart::ChartWindow *)()
229 {
230 MutexGuard aGuard( m_aMutex);
231 m_xChartController = xChartController.get();
232 m_xChartModel = xChartModel.get();
233 m_xChartView = xChartView.get();
234 m_xParent = xParent;
>>> CID 1645567: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "pChartWindow" is copied in a call to copy assignment "operator =", when it could be moved instead.
235 m_pChartWindow = pChartWindow;
236 }
237
238 if( bOldInvalid && bNewInvalid )
239 bChanged = false;
240
** CID 1645566: (NULL_RETURNS)
________________________________________________________________________________________________________
*** CID 1645566: (NULL_RETURNS)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 59 in svx::sidebar::InspectorTextPanel::InspectorTextPanel(weld::Widget *)()
53 : PanelLayout(pParent, u"InspectorTextPanel"_ustr, u"svx/ui/inspectortextpanel.ui"_ustr)
54 , mpListBoxStyles(m_xBuilder->weld_tree_view(u"listbox_fonts"_ustr))
55 , nSlotDFStyles(
56 SfxViewFrame::Current()->GetDispatcher()->GetSlot(".uno:HighlightCharDF")->GetSlotId())
57 , mParaController(SID_SPOTLIGHT_PARASTYLES, SfxViewFrame::Current()->GetBindings(), *this)
58 , mCharController(SID_SPOTLIGHT_CHARSTYLES, SfxViewFrame::Current()->GetBindings(), *this)
>>> CID 1645566: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "SfxViewFrame::Current()" when calling "GetBindings".
59 , mDFController(nSlotDFStyles, SfxViewFrame::Current()->GetBindings(), *this)
60 {
61 mpListBoxStyles->set_size_request(MinimumPanelWidth, -1);
62 float fWidth = mpListBoxStyles->get_approximate_digit_width();
63 std::vector<int> aWidths{ o3tl::narrowing<int>(fWidth * 29) };
64 // 2nd column will fill remaining space
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 74 in svx::sidebar::InspectorTextPanel::InspectorTextPanel(weld::Widget *)()
68 mpToolbar->connect_clicked(LINK(this, InspectorTextPanel, ToolbarHdl));
69 mpToolbar->set_item_icon_name("paragraphstyles", "sw/res/sf01.png");
70 mpToolbar->set_item_icon_name("characterstyles", "sw/res/sf02.png");
71 mpToolbar->set_item_icon_name("directformatting", "sw/res/sr20012.png");
72
73 // Setup listening and set initial state
>>> CID 1645566: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "SfxViewFrame::Current()" when calling "GetBindings".
74 SfxBindings& pBindings = SfxViewFrame::Current()->GetBindings();
75 pBindings.Update(SID_SPOTLIGHT_PARASTYLES);
76 pBindings.Update(SID_SPOTLIGHT_CHARSTYLES);
77 pBindings.Update(nSlotDFStyles);
78 }
79
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 57 in svx::sidebar::InspectorTextPanel::InspectorTextPanel(weld::Widget *)()
51
52 InspectorTextPanel::InspectorTextPanel(weld::Widget* pParent)
53 : PanelLayout(pParent, u"InspectorTextPanel"_ustr, u"svx/ui/inspectortextpanel.ui"_ustr)
54 , mpListBoxStyles(m_xBuilder->weld_tree_view(u"listbox_fonts"_ustr))
55 , nSlotDFStyles(
56 SfxViewFrame::Current()->GetDispatcher()->GetSlot(".uno:HighlightCharDF")->GetSlotId())
>>> CID 1645566: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "SfxViewFrame::Current()" when calling "GetBindings".
57 , mParaController(SID_SPOTLIGHT_PARASTYLES, SfxViewFrame::Current()->GetBindings(), *this)
58 , mCharController(SID_SPOTLIGHT_CHARSTYLES, SfxViewFrame::Current()->GetBindings(), *this)
59 , mDFController(nSlotDFStyles, SfxViewFrame::Current()->GetBindings(), *this)
60 {
61 mpListBoxStyles->set_size_request(MinimumPanelWidth, -1);
62 float fWidth = mpListBoxStyles->get_approximate_digit_width();
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 58 in svx::sidebar::InspectorTextPanel::InspectorTextPanel(weld::Widget *)()
52 InspectorTextPanel::InspectorTextPanel(weld::Widget* pParent)
53 : PanelLayout(pParent, u"InspectorTextPanel"_ustr, u"svx/ui/inspectortextpanel.ui"_ustr)
54 , mpListBoxStyles(m_xBuilder->weld_tree_view(u"listbox_fonts"_ustr))
55 , nSlotDFStyles(
56 SfxViewFrame::Current()->GetDispatcher()->GetSlot(".uno:HighlightCharDF")->GetSlotId())
57 , mParaController(SID_SPOTLIGHT_PARASTYLES, SfxViewFrame::Current()->GetBindings(), *this)
>>> CID 1645566: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "SfxViewFrame::Current()" when calling "GetBindings".
58 , mCharController(SID_SPOTLIGHT_CHARSTYLES, SfxViewFrame::Current()->GetBindings(), *this)
59 , mDFController(nSlotDFStyles, SfxViewFrame::Current()->GetBindings(), *this)
60 {
61 mpListBoxStyles->set_size_request(MinimumPanelWidth, -1);
62 float fWidth = mpListBoxStyles->get_approximate_digit_width();
63 std::vector<int> aWidths{ o3tl::narrowing<int>(fWidth * 29) };
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview
More information about the LibreOffice
mailing list