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. 147 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 1583748: (FORWARD_NULL) ________________________________________________________________________________________________________ *** CID 1583748: (FORWARD_NULL) /sc/source/ui/app/inputhdl.cxx: 3864 in ScInputHandler::KeyInput(const KeyEvent &, bool)() 3858 3859 if (pActiveViewSh) 3860 pActiveViewSh->MoveCursorEnter( bShift && !bControl ); 3861 3862 ScModule* pScMod = SC_MOD(); 3863 const ScInputOptions& rOpt = pScMod->GetInputOptions(); >>> CID 1583748: (FORWARD_NULL) >>> Passing null pointer "this->pActiveViewSh" to "GetMoveKeepEdit", which dereferences it. 3864 if ( (rOpt.GetMoveKeepEdit() && !comphelper::LibreOfficeKit::isActive()) 3865 || (pActiveViewSh->GetMoveKeepEdit() && comphelper::LibreOfficeKit::isActive()) ) 3866 pScMod->SetInputMode( SC_INPUT_TABLE ); 3867 3868 bUsed = true; 3869 } /sc/source/ui/app/inputhdl.cxx: 3818 in ScInputHandler::KeyInput(const KeyEvent &, bool)() 3812 if (pActiveViewSh) 3813 pActiveViewSh->FindNextUnprot( bShift, true ); 3814 3815 ScModule* pScMod = SC_MOD(); 3816 const ScInputOptions& rOpt = pScMod->GetInputOptions(); 3817 >>> CID 1583748: (FORWARD_NULL) >>> Passing null pointer "this->pActiveViewSh" to "GetMoveKeepEdit", which dereferences it. 3818 if ( (rOpt.GetMoveKeepEdit() && !comphelper::LibreOfficeKit::isActive()) 3819 || (pActiveViewSh->GetMoveKeepEdit() && comphelper::LibreOfficeKit::isActive()) ) 3820 pScMod->SetInputMode( SC_INPUT_TABLE ); 3821 3822 return true; 3823 } ** CID 1583747: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/baside2.cxx: 1559 in basctl::ModulWindowLayout::ApplyColorSchemeToCurrentWindow(rtl::OUString)() ________________________________________________________________________________________________________ *** CID 1583747: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/baside2.cxx: 1559 in basctl::ModulWindowLayout::ApplyColorSchemeToCurrentWindow(rtl::OUString)() 1553 1554 // Applies the color scheme to the current window and updates color definitions; 1555 // note that other ModulWindow instances are not affected by calling this method 1556 void ModulWindowLayout::ApplyColorSchemeToCurrentWindow(OUString aSchemeId) 1557 { 1558 // Apply new color scheme to the UI >>> CID 1583747: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aSchemeId" is copied in a call to copy assignment "operator =", when it could be moved instead. 1559 m_sColorSchemeId = aSchemeId; 1560 aSyntaxColors.ApplyColorScheme(m_sColorSchemeId, false); 1561 } 1562 1563 ModulWindowLayout::SyntaxColors::SyntaxColors () 1564 : pEditor(nullptr) ** CID 1583746: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/ColorSchemeDialog.cxx: 37 in basctl::ColorSchemeDialog::ColorSchemeDialog(weld::Window *, VclPtr<basctl::ModulWindowLayout>)() ________________________________________________________________________________________________________ *** CID 1583746: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/ColorSchemeDialog.cxx: 37 in basctl::ColorSchemeDialog::ColorSchemeDialog(weld::Window *, VclPtr<basctl::ModulWindowLayout>)() 31 32 namespace basctl 33 { 34 ColorSchemeDialog::ColorSchemeDialog(weld::Window* pParent, 35 VclPtr<ModulWindowLayout> pModulWinLayout) 36 : GenericDialogController(pParent, "modules/BasicIDE/ui/colorscheme.ui", "ColorSchemeDialog") >>> CID 1583746: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "pModulWinLayout" is copied in call to copy constructor "VclPtr<basctl::ModulWindowLayout>", when it could be moved instead. 37 , m_pModulWinLayout(pModulWinLayout) 38 , m_xSchemeList(m_xBuilder->weld_tree_view("schemelist")) 39 , m_xUseAppCollors(m_xBuilder->weld_radio_button("opt_appcolors")) 40 , m_xUseScheme(m_xBuilder->weld_radio_button("opt_usescheme")) 41 , m_xOk(m_xBuilder->weld_button("btn_ok")) 42 { ** CID 1583745: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/baside2.hxx: 451 in basctl::ModulWindowLayout::SyntaxColors::SetActiveColorSchemeId(rtl::OUString)() ________________________________________________________________________________________________________ *** CID 1583745: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/baside2.hxx: 451 in basctl::ModulWindowLayout::SyntaxColors::SetActiveColorSchemeId(rtl::OUString)() 445 { 446 public: 447 SyntaxColors (); 448 virtual ~SyntaxColors () override; 449 public: 450 void SetActiveEditor (EditorWindow* pEditor_) { pEditor = pEditor_; } >>> CID 1583745: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aColorSchemeId" is copied in a call to copy assignment "operator =", when it could be moved instead. 451 void SetActiveColorSchemeId(OUString aColorSchemeId) { m_sActiveSchemeId = aColorSchemeId; } 452 public: 453 Color const & GetBackgroundColor () const { return m_aBackgroundColor; }; 454 Color const & GetFontColor () const { return m_aFontColor; } 455 Color const & GetColor(TokenType eType) const { return aColors[eType]; } 456 void ApplyColorScheme(OUString aSchemeId, bool bFirst); ** CID 1583744: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/baside2.cxx: 1438 in basctl::ModulWindow::SetEditorColorScheme(rtl::OUString)() ________________________________________________________________________________________________________ *** CID 1583744: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /basctl/source/basicide/baside2.cxx: 1438 in basctl::ModulWindow::SetEditorColorScheme(rtl::OUString)() 1432 GetEditEngine()->SetModified(false); 1433 MarkDocumentModified(m_aDocument); 1434 } 1435 1436 void ModulWindow::SetEditorColorScheme(OUString aColorScheme) 1437 { >>> CID 1583744: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aColorScheme" is copied in a call to copy assignment "operator =", when it could be moved instead. 1438 m_sWinColorScheme = aColorScheme; 1439 EditorWindow& rEditWindow = GetEditorWindow(); 1440 Wallpaper aBackgroundColor(GetLayout().GetSyntaxBackgroundColor()); 1441 rEditWindow.SetBackground(aBackgroundColor); 1442 rEditWindow.GetWindow(GetWindowType::Border)->SetBackground(aBackgroundColor); 1443 ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DrVhH_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2BFXJv0XqPIDaZF-2Ff-2FZvj5S7B0zxRodQVXrJcKUYZA88wF-2F5qZRKvi9hdBtBXlsaPqqatgP9ET59BS8OrHwEtWsFc1-2BnlDIApA5sy4u3AGHu-2FIV0L7iqWFcK-2FSQXMFFS9rq4FxG5OTpZYSY2HDQPpePJkr7-2Fjr4I14lFhw6NLgoY-3D