diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-20 12:45:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-20 14:58:31 +0200 |
commit | d31570fbcc95ef718a68c4b0f94584b2b714d4f9 (patch) | |
tree | 3fe3bce4f5dd76287ae5477058658a7ae224b04c | |
parent | ec579354af954867b829e7d08e4d752518c83728 (diff) |
loplugin:virtualdead
Change-Id: Ib41d80d1e068d66edabdfb36061dd382dc34b04c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | compilerplugins/clang/virtualdead.results | 4 | ||||
-rw-r--r-- | compilerplugins/clang/virtualdead.unusedparams.results | 7 | ||||
-rw-r--r-- | include/vcl/toolkit/treelistbox.hxx | 5 | ||||
-rw-r--r-- | include/vcl/toolkit/vclmedit.hxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrolpeer.cxx | 4 | ||||
-rw-r--r-- | vcl/inc/treeglue.hxx | 14 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 29 | ||||
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 10 |
8 files changed, 17 insertions, 62 deletions
diff --git a/compilerplugins/clang/virtualdead.results b/compilerplugins/clang/virtualdead.results index a7ea08a6118e..8e2aa00ce120 100644 --- a/compilerplugins/clang/virtualdead.results +++ b/compilerplugins/clang/virtualdead.results @@ -64,8 +64,8 @@ include/unotools/desktopterminationobserver.hxx:36 include/vbahelper/vbahelperinterface.hxx:74 int InheritedHelperInterfaceImpl::getCreator() 1400204879 -include/vcl/toolkit/treelistbox.hxx:512 - void SvTreeListBox::PreparePaint(class OutputDevice &,class SvTreeListEntry &,) +include/vcl/toolkit/vclmedit.hxx:118 + void VclMultiLineEdit::UpdateData() empty sc/source/core/opencl/formulagroupcl.cxx:1069 void sc::opencl::(anonymous namespace)::DynamicKernelSlidingArgument::GenSlidingWindowFunction(class std::__cxx11::basic_stringstream<char> &,) diff --git a/compilerplugins/clang/virtualdead.unusedparams.results b/compilerplugins/clang/virtualdead.unusedparams.results index 130223cb56be..fe2036720143 100644 --- a/compilerplugins/clang/virtualdead.unusedparams.results +++ b/compilerplugins/clang/virtualdead.unusedparams.results @@ -130,13 +130,10 @@ include/vcl/dndhelp.hxx:62 include/vcl/opengl/OpenGLContext.hxx:141 struct SystemWindowData OpenGLContext::generateWinData(class vcl::Window *,_Bool,) 10 -include/vcl/toolkit/treelistbox.hxx:431 +include/vcl/toolkit/treelistbox.hxx:430 enum DragDropMode SvTreeListBox::NotifyStartDrag(class TransferDataContainer &,class SvTreeListEntry *,) 00 -include/vcl/toolkit/treelistbox.hxx:512 - void SvTreeListBox::PreparePaint(class OutputDevice &,class SvTreeListEntry &,) - 00 -include/vcl/toolkit/treelistbox.hxx:591 +include/vcl/toolkit/treelistbox.hxx:589 _Bool SvTreeListBox::EditingEntry(class SvTreeListEntry *,class Selection &,) 10 sc/inc/filter.hxx:82 diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index fe9c1d653c7a..0af7d371659b 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -427,8 +427,7 @@ public: virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override; virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override; virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override; - virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, - SvTreeListEntry* ); + virtual DragDropMode NotifyStartDrag(); virtual void DragFinished( sal_Int8 nDropAction ); SvTreeListEntry* CloneEntry( SvTreeListEntry* pSource ); @@ -586,7 +585,7 @@ public: void EnableInplaceEditing( bool bEnable ); // Edits the Entry's first StringItem, 0 == Cursor void EditEntry( SvTreeListEntry* pEntry ); - virtual bool EditingEntry( SvTreeListEntry* pEntry, Selection& ); + virtual bool EditingEntry( SvTreeListEntry* pEntry ); virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; diff --git a/include/vcl/toolkit/vclmedit.hxx b/include/vcl/toolkit/vclmedit.hxx index a15ca2aaa901..da38a5bbcb57 100644 --- a/include/vcl/toolkit/vclmedit.hxx +++ b/include/vcl/toolkit/vclmedit.hxx @@ -84,8 +84,6 @@ private: Link<Edit&,void> aModifyHdlLink; - std::unique_ptr<Timer> pUpdateDataTimer; - protected: DECL_LINK( ImpUpdateDataHdl, Timer*, void ); @@ -114,10 +112,6 @@ public: virtual void SetModifyFlag() override; virtual void ClearModifyFlag() override; - void EnableUpdateData( sal_uLong nTimeout ); - virtual void UpdateData(); - void DisableUpdateData() { pUpdateDataTimer.reset(); } - virtual void SetReadOnly( bool bReadOnly = true ) override; virtual bool IsReadOnly() const override; diff --git a/toolkit/source/controls/tree/treecontrolpeer.cxx b/toolkit/source/controls/tree/treecontrolpeer.cxx index bc5ceaad6d46..1b302d551db9 100644 --- a/toolkit/source/controls/tree/treecontrolpeer.cxx +++ b/toolkit/source/controls/tree/treecontrolpeer.cxx @@ -96,7 +96,7 @@ public: virtual void RequestingChildren( SvTreeListEntry* pParent ) override; - virtual bool EditingEntry( SvTreeListEntry* pEntry, Selection& ) override; + virtual bool EditingEntry( SvTreeListEntry* pEntry ) override; virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) override; DECL_LINK(OnSelectionChangeHdl, SvTreeListBox*, void); @@ -1481,7 +1481,7 @@ void UnoTreeListBoxImpl::RequestingChildren( SvTreeListEntry* pParent ) } -bool UnoTreeListBoxImpl::EditingEntry( SvTreeListEntry* pEntry, Selection& ) +bool UnoTreeListBoxImpl::EditingEntry( SvTreeListEntry* pEntry ) { return mxPeer.is() && mxPeer->onEditingEntry( dynamic_cast< UnoTreeListEntry* >( pEntry ) ); } diff --git a/vcl/inc/treeglue.hxx b/vcl/inc/treeglue.hxx index ea643635faee..4cb120d81f7f 100644 --- a/vcl/inc/treeglue.hxx +++ b/vcl/inc/treeglue.hxx @@ -37,12 +37,9 @@ public: m_aEditedEntryHdl = rLink; } - virtual DragDropMode NotifyStartDrag(TransferDataContainer&, SvTreeListEntry*) override - { - return GetDragDropMode(); - } + virtual DragDropMode NotifyStartDrag() override { return GetDragDropMode(); } - virtual bool EditingEntry(SvTreeListEntry* pEntry, Selection&) override + virtual bool EditingEntry(SvTreeListEntry* pEntry) override { return m_aEditingEntryHdl.Call(pEntry); } @@ -79,10 +76,7 @@ public: m_aEditedEntryHdl = rLink; } - virtual DragDropMode NotifyStartDrag(TransferDataContainer&, SvTreeListEntry*) override - { - return GetDragDropMode(); - } + virtual DragDropMode NotifyStartDrag() override { return GetDragDropMode(); } virtual void StartDrag(sal_Int8 nAction, const Point& rPosPixel) override { @@ -160,7 +154,7 @@ public: return GetTargetAtPoint(rPos, true); } - virtual bool EditingEntry(SvTreeListEntry* pEntry, Selection&) override + virtual bool EditingEntry(SvTreeListEntry* pEntry) override { return m_aEditingEntryHdl.Call(pEntry); } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index d4035e57419a..87e889c96973 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -878,7 +878,6 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle ) SetType( WindowType::MULTILINEEDIT ); pImpVclMEdit.reset(new ImpVclMEdit( this, nWinStyle )); ImplInitSettings( true ); - pUpdateDataTimer = nullptr; SetCompoundControl( true ); SetStyle( ImplInitStyle( nWinStyle ) ); @@ -892,7 +891,6 @@ VclMultiLineEdit::~VclMultiLineEdit() void VclMultiLineEdit::dispose() { pImpVclMEdit.reset(); - pUpdateDataTimer.reset(); Edit::dispose(); } @@ -1013,9 +1011,6 @@ void VclMultiLineEdit::Modify() aModifyHdlLink.Call( *this ); CallEventListeners( VclEventId::EditModify ); - - if ( pUpdateDataTimer ) - pUpdateDataTimer->Start(); } void VclMultiLineEdit::SelectionChanged() @@ -1028,15 +1023,6 @@ void VclMultiLineEdit::CaretChanged() CallEventListeners(VclEventId::EditCaretChanged); } -IMPL_LINK_NOARG(VclMultiLineEdit, ImpUpdateDataHdl, Timer *, void) -{ - UpdateData(); -} - -void VclMultiLineEdit::UpdateData() -{ -} - void VclMultiLineEdit::SetModifyFlag() { pImpVclMEdit->SetModified( true ); @@ -1047,21 +1033,6 @@ void VclMultiLineEdit::ClearModifyFlag() pImpVclMEdit->SetModified( false ); } -void VclMultiLineEdit::EnableUpdateData( sal_uLong nTimeout ) -{ - if ( !nTimeout ) - DisableUpdateData(); - else - { - if ( !pUpdateDataTimer ) - { - pUpdateDataTimer.reset(new Timer("MultiLineEditTimer")); - pUpdateDataTimer->SetInvokeHandler( LINK( this, VclMultiLineEdit, ImpUpdateDataHdl ) ); - } - pUpdateDataTimer->SetTimeout( nTimeout ); - } -} - void VclMultiLineEdit::SetReadOnly( bool bReadOnly ) { pImpVclMEdit->SetReadOnly( bReadOnly ); diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index c0c7552749e1..ae09ea750100 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -1134,7 +1134,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel ) "unused", SAL_N_ELEMENTS("unused") ); } - nDragDropMode = NotifyStartDrag( *xContainer, pEntry ); + nDragDropMode = NotifyStartDrag(); if( nDragDropMode == DragDropMode::NONE || 0 == GetSelectionCount() ) { nDragDropMode = nOldDragMode; @@ -1196,7 +1196,7 @@ void SvTreeListBox::UnsetDropTarget() } } -DragDropMode SvTreeListBox::NotifyStartDrag( TransferDataContainer&, SvTreeListEntry* ) +DragDropMode SvTreeListBox::NotifyStartDrag() { return DragDropMode(0xffff); } @@ -1839,7 +1839,7 @@ void SvTreeListBox::SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image& SetTabs(); } -bool SvTreeListBox::EditingEntry( SvTreeListEntry*, Selection& ) +bool SvTreeListBox::EditingEntry( SvTreeListEntry* ) { return true; } @@ -2446,9 +2446,9 @@ void SvTreeListBox::ImplEditEntry( SvTreeListEntry* pEntry ) } } - Selection aSel( SELECTION_MIN, SELECTION_MAX ); - if( pItem && EditingEntry( pEntry, aSel ) ) + if( pItem && EditingEntry( pEntry ) ) { + Selection aSel( SELECTION_MIN, SELECTION_MAX ); SelectAll( false ); MakeVisible( pEntry ); EditItemText( pEntry, pItem, aSel ); |