From 5034914c7a9ad903f8f02cde11d94c7180b62dc9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 20 Oct 2016 15:35:44 +0200 Subject: loplugin:expandablemethodds in include/svtools Change-Id: I679b7985861203496813782138d1cf965fbc427b Reviewed-on: https://gerrit.libreoffice.org/30107 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- svtools/source/brwbox/editbrowsebox.cxx | 7 +------ svtools/source/contnr/fileview.cxx | 2 +- svtools/source/contnr/ivctrl.cxx | 6 +----- svtools/source/contnr/treelist.cxx | 7 +------ svtools/source/contnr/treelistbox.cxx | 14 ++------------ svtools/source/control/headbar.cxx | 14 ++------------ svtools/source/control/valueset.cxx | 7 +------ svtools/source/misc/imap.cxx | 4 ++-- svtools/source/uno/toolboxcontroller.cxx | 7 +------ 9 files changed, 12 insertions(+), 56 deletions(-) (limited to 'svtools') diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index d374f8123cf6..df1df0806497 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -1010,7 +1010,7 @@ namespace svt if (bHasFocus) GrabFocus(); // ensure that we have (and keep) the focus - HideAndDisable(aOldController); + aOldController->suspend(); // update if requested if (bUpdate) @@ -1249,11 +1249,6 @@ namespace svt InvalidateStatusCell(GetCurRow()); } - inline void EditBrowseBox::HideAndDisable(CellControllerRef& rController) - { - rController->suspend(); - } - inline void EditBrowseBox::EnableAndShow() const { Controller()->resume(); diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index b97d2c126ef6..6343ae7b57ce 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -980,7 +980,7 @@ SvtFileView::SvtFileView( vcl::Window* pParent, WinBits nBits, mpImpl.reset( new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder ) ); mpImpl->mpView->ForbidEmptyText(); - SetSortColumn( true ); + bSortColumn = true; HeaderBar* pHeaderBar = mpImpl->mpView->GetHeaderBar(); pHeaderBar->SetSelectHdl( LINK( this, SvtFileView, HeaderSelect_Impl ) ); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 2ded15f9c54f..032345a94898 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -278,10 +278,6 @@ void SvtIconChoiceCtrl::ClickIcon() GetSelectedEntry(); _aClickIconHdl.Call( this ); } -bool SvtIconChoiceCtrl::IsEntryEditing() const -{ - return _pImpl->IsEntryEditing(); -} void SvtIconChoiceCtrl::SetChoiceWithCursor() { @@ -301,7 +297,7 @@ void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt ) bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt ) { // under OS/2, we get key up/down even while editing - if( IsEntryEditing() ) + if( _pImpl->IsEntryEditing() ) return true; _pCurKeyEvent = const_cast(&rKEvt); bool bHandled = _pImpl->KeyInput( rKEvt ); diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index f7d912800b4e..844dc178cc65 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -391,16 +391,11 @@ SvTreeListEntry* SvTreeList::CloneEntry( SvTreeListEntry* pSource ) const { if( aCloneLink.IsSet() ) return aCloneLink.Call( pSource ); - SvTreeListEntry* pEntry = CreateEntry(); + SvTreeListEntry* pEntry = new SvTreeListEntry; pEntry->Clone(pSource); return pEntry; } -SvTreeListEntry* SvTreeList::CreateEntry() -{ - return new SvTreeListEntry; -} - SvTreeListEntry* SvTreeList::Clone( SvTreeListEntry* pEntry, sal_uLong& nCloneCount ) const { SvTreeListEntry* pClonedEntry = CloneEntry( pEntry ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index ba4abb0cb895..0cab871c4086 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -718,11 +718,6 @@ void SvTreeListBox::RemoveSelection() pModel->Remove(*it); } -SvTreeListBox* SvTreeListBox::GetSourceView() -{ - return g_pDDSource; -} - void SvTreeListBox::RecalcViewData() { SvTreeListEntry* pEntry = First(); @@ -746,7 +741,7 @@ void SvTreeListBox::ImplShowTargetEmphasis( SvTreeListEntry* pEntry, bool bShow) return; if ( !bShow && !(nImpFlags & SvTreeListBoxFlags::TARGEMPH_VIS) ) return; - ShowTargetEmphasis( pEntry, bShow ); + pImpl->PaintDDCursor( pEntry ); if( bShow ) nImpFlags |= SvTreeListBoxFlags::TARGEMPH_VIS; else @@ -1191,7 +1186,7 @@ sal_Int8 SvTreeListBox::ExecuteDrop( const ExecuteDropEvent& rEvt, SvTreeListBox sal_Int8 SvTreeListBox::ExecuteDrop( const ExecuteDropEvent& rEvt ) { - return ExecuteDrop( rEvt, GetSourceView() ); + return ExecuteDrop( rEvt, g_pDDSource ); } /** @@ -2138,11 +2133,6 @@ void SvTreeListBox::ModelHasCleared() SvListView::ModelHasCleared(); } -void SvTreeListBox::ShowTargetEmphasis( SvTreeListEntry* pEntry, bool /*bShow*/ ) -{ - pImpl->PaintDDCursor( pEntry ); -} - void SvTreeListBox::ScrollOutputArea( short nDeltaEntries ) { if( !nDeltaEntries || !pImpl->aVerSBar->IsVisible() ) diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index c3de48a856d4..3907c9735db5 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -684,7 +684,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, bool bCommand ) StartTracking(); mnStartPos = rMousePos.X()-mnMouseOff; mnDragPos = mnStartPos; - StartDrag(); + maStartDragHdl.Call( this ); if (mbItemMode) Invalidate(); else @@ -801,7 +801,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) } } - Drag(); + maDragHdl.Call( this ); } void HeaderBar::ImplEndDrag( bool bCancel ) @@ -1104,16 +1104,6 @@ void HeaderBar::DataChanged( const DataChangedEvent& rDCEvt ) } } -void HeaderBar::StartDrag() -{ - maStartDragHdl.Call( this ); -} - -void HeaderBar::Drag() -{ - maDragHdl.Call( this ); -} - void HeaderBar::EndDrag() { maEndDragHdl.Call( this ); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index d8d79ccb4496..a0dc24f52dfe 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1220,7 +1220,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMouseEvent ) StartTracking( StartTrackingFlags::ScrollRepeat ); } else if ( rMouseEvent.GetClicks() == 2 ) - DoubleClick(); + maDoubleClickHdl.Call( this ); return; } @@ -1567,11 +1567,6 @@ void ValueSet::Select() maSelectHdl.Call( this ); } -void ValueSet::DoubleClick() -{ - maDoubleClickHdl.Call( this ); -} - void ValueSet::UserDraw( const UserDrawEvent& ) { } diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 1b96d67840f7..839450aac5b3 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -71,7 +71,7 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const const rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); rOStm.WriteUInt16( GetType() ); - rOStm.WriteUInt16( GetVersion() ); + rOStm.WriteUInt16( IMAP_OBJ_VERSION ); rOStm.WriteUInt16( eEncoding ); const OString aRelURL = OUStringToOString( @@ -922,7 +922,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const // write MagicCode rOStm.WriteCharPtr( IMAPMAGIC ); - rOStm.WriteUInt16( GetVersion() ); + rOStm.WriteUInt16( IMAGE_MAP_VERSION ); write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding); write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, OString()); //dummy rOStm.WriteUInt16( nCount ); diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index e0635714d706..79a03db19e04 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -716,11 +716,6 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL ToolboxController: return new ::cppu::OPropertyArrayHelper(aProps); } -void ToolboxController::setSupportVisibleProperty(bool bValue) -{ - m_bSupportVisible = bValue; -} - sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( css::uno::Any& aConvertedValue , css::uno::Any& aOldValue , sal_Int32 nHandle , @@ -754,7 +749,7 @@ throw( css::uno::Exception, std::exception) { bool rValue(false); if (( aValue >>= rValue ) && m_bInitialized) - this->setSupportVisibleProperty( rValue ); + m_bSupportVisible = rValue; } } -- cgit