diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-03 11:10:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-04 06:31:30 +0000 |
commit | 4ea70f87f7a2b61eda6e5ab1f48debf6fcfadc1f (patch) | |
tree | 83ba4d72bdf86a5fa252b14d32345fdf91fffe09 /sc | |
parent | 5338d2abe4078626d2cfa38cde99dfa1d4eb2f6b (diff) |
convert Link<> to typed
Change-Id: I2136c3db2742afcb4722f69297276bea1e0119f4
Reviewed-on: https://gerrit.libreoffice.org/18306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/dbgui/csvtablebox.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/dbgui/sortkeydlg.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/csvtablebox.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/datafdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/filtdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/inputwin.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/optsolver.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/prevwsh.hxx | 14 | ||||
-rw-r--r-- | sc/source/ui/inc/sortkeydlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tabview.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/datafdlg.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 7 |
18 files changed, 35 insertions, 50 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 9601a748b7b5..4ca59a7cd746 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1147,10 +1147,9 @@ void ScInputBarGroup::TriggerToolboxLayout() } } -IMPL_LINK_NOARG(ScInputBarGroup, Impl_ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScInputBarGroup, Impl_ScrollHdl, ScrollBar*, void) { aMultiTextWnd->DoScroll(); - return 0; } void ScInputBarGroup::TextGrabFocus() diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 4a18293ccc03..60f13958ff70 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -410,10 +410,9 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry ) return 0; } -IMPL_LINK_NOARG( ScCondFormatList, ScrollHdl ) +IMPL_LINK_NOARG_TYPED( ScCondFormatList, ScrollHdl, ScrollBar*, void ) { DoScroll(mpScrollBar->GetDelta()); - return 0; } // ------------------------------------------------------------------- diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx index 9ecbfb06a234..7120f84a2222 100644 --- a/sc/source/ui/dbgui/csvtablebox.cxx +++ b/sc/source/ui/dbgui/csvtablebox.cxx @@ -44,13 +44,13 @@ ScCsvTableBox::ScCsvTableBox( vcl::Window* pParent, WinBits nBits ) : maRuler->SetCmdHdl( aLink ); maGrid->SetCmdHdl( aLink ); - aLink = LINK( this, ScCsvTableBox, ScrollHdl ); - maHScroll->SetScrollHdl( aLink ); - maVScroll->SetScrollHdl( aLink ); + Link<ScrollBar*,void> aLink2 = LINK( this, ScCsvTableBox, ScrollHdl ); + maHScroll->SetScrollHdl( aLink2 ); + maVScroll->SetScrollHdl( aLink2 ); - aLink = LINK( this, ScCsvTableBox, ScrollEndHdl ); - maHScroll->SetEndScrollHdl( aLink ); - maVScroll->SetEndScrollHdl( aLink ); + aLink2 = LINK( this, ScCsvTableBox, ScrollEndHdl ); + maHScroll->SetEndScrollHdl( aLink2 ); + maVScroll->SetEndScrollHdl( aLink2 ); InitControls(); } @@ -392,7 +392,7 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl ) return 0; } -IMPL_LINK( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar, void ) { OSL_ENSURE( pScrollBar, "ScCsvTableBox::ScrollHdl - missing sender" ); @@ -400,11 +400,9 @@ IMPL_LINK( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar ) Execute( CSVCMD_SETPOSOFFSET, pScrollBar->GetThumbPos() ); else if( pScrollBar == maVScroll.get() ) Execute( CSVCMD_SETLINEOFFSET, pScrollBar->GetThumbPos() ); - - return 0; } -IMPL_LINK( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar, void ) { OSL_ENSURE( pScrollBar, "ScCsvTableBox::ScrollEndHdl - missing sender" ); @@ -415,8 +413,6 @@ IMPL_LINK( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar ) if( GetGridCursorPos() != CSV_POS_INVALID ) Execute( CSVCMD_MOVEGRIDCURSOR, maGrid->GetNoScrollCol( GetGridCursorPos() ) ); } - - return 0; } // accessibility -------------------------------------------------------------- diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 23d2a08e6df9..e1dc6a56e9a5 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -1144,10 +1144,9 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) return 0; } -IMPL_LINK_NOARG(ScFilterDlg, ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScFilterDlg, ScrollHdl, ScrollBar*, void) { SliderMoved(); - return 0; } void ScFilterDlg::SliderMoved() diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx index 6ffbf109b1ea..5b353a39aa06 100644 --- a/sc/source/ui/dbgui/sortkeydlg.cxx +++ b/sc/source/ui/dbgui/sortkeydlg.cxx @@ -91,7 +91,7 @@ ScSortKeyCtrl::ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& rItems) m_rVertScroll.SetRangeMin( 0 ); m_rVertScroll.SetVisibleSize( 0xFFFF ); - Link<> aScrollLink = LINK( this, ScSortKeyCtrl, ScrollHdl ); + Link<ScrollBar*,void> aScrollLink = LINK( this, ScSortKeyCtrl, ScrollHdl ); m_rVertScroll.SetScrollHdl( aScrollLink ); } @@ -123,12 +123,11 @@ void ScSortKeyCtrl::setScrollRange() checkAutoVScroll(); } -IMPL_LINK( ScSortKeyCtrl, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ScSortKeyCtrl, ScrollHdl, ScrollBar*, pScrollBar, void ) { sal_Int32 nOffset = m_aSortWin.GetItemHeight(); nOffset *= pScrollBar->GetThumbPos(); m_aSortWin.DoScroll( -nOffset ); - return 0; } void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem ) diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 75c211cafe38..62678a1efd89 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -88,7 +88,7 @@ public: DECL_LINK_TYPED( AddBtnHdl, Button*, void ); DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); - DECL_LINK( ScrollHdl, void* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK( EntrySelectHdl, ScCondFrmtEntry* ); DECL_LINK( TypeListHdl, ListBox*); diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx index e7bfd347b653..ff30afe5e40e 100644 --- a/sc/source/ui/inc/csvtablebox.hxx +++ b/sc/source/ui/inc/csvtablebox.hxx @@ -124,8 +124,8 @@ protected: private: DECL_DLLPRIVATE_LINK( CsvCmdHdl, ScCsvControl* ); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar* ); - DECL_DLLPRIVATE_LINK( ScrollEndHdl, ScrollBar* ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollEndHdl, ScrollBar*, void ); // accessibility ---------------------------------------------------------- public: diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx index 7bd344a63334..17a95aa251a7 100644 --- a/sc/source/ui/inc/datafdlg.hxx +++ b/sc/source/ui/inc/datafdlg.hxx @@ -71,7 +71,7 @@ private: DECL_LINK_TYPED(Impl_DeleteHdl, Button*, void); DECL_LINK_TYPED(Impl_CloseHdl, Button*, void); - DECL_LINK(Impl_ScrollHdl, void *); + DECL_LINK_TYPED(Impl_ScrollHdl, ScrollBar*, void); DECL_LINK( Impl_DataModifyHdl, Edit* ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_DATAFDLG_HXX diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index af30de6f8803..92ed9bba988e 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -150,7 +150,7 @@ private: DECL_LINK( ValModifyHdl, ComboBox* ); DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK_TYPED( EndDlgHdl, Button*, void ); - DECL_LINK( ScrollHdl, void* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK( MoreExpandedHdl, void* ); // Hack: RefInput control diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 05ce58b5794e..7ae780633005 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -227,7 +227,7 @@ private: VclPtr<ScrollBar> aScrollBar; long nVertOffset; DECL_LINK_TYPED( ClickHdl, Button*, void ); - DECL_LINK( Impl_ScrollHdl, void* ); + DECL_LINK_TYPED( Impl_ScrollHdl, ScrollBar*, void ); }; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 8f452cd650b7..44bf485d2a31 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -193,7 +193,7 @@ private: DECL_LINK_TYPED( DelBtnHdl, Button*, void ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( LoseFocusHdl, void* ); - DECL_LINK( ScrollHdl, void *); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void); DECL_LINK( CursorUpHdl, ScCursorRefEdit* ); DECL_LINK( CursorDownHdl, ScCursorRefEdit* ); DECL_LINK( CondModifyHdl, void* ); diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index e8a1e1745adc..ff52c67421a5 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -55,10 +55,10 @@ class ScPreviewShell: public SfxViewShell bool GetPageSize( Size& aPageSize ); private: void Construct( vcl::Window* pParent ); - DECL_LINK(ScrollHandler, ScrollBar* ); + DECL_LINK_TYPED( ScrollHandler, ScrollBar*, void ); DECL_LINK(CloseHdl, SystemWindow*); void DoScroll( sal_uInt16 nMode ); - void ExitPreview(); + void ExitPreview(); protected: virtual void Activate(bool bMDI) SAL_OVERRIDE; @@ -102,17 +102,17 @@ public: TriState GetSourceDesignMode() const { return nSourceDesignMode; } - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; - void AddAccessibilityObject( SfxListener& rObject ); - void RemoveAccessibilityObject( SfxListener& rObject ); - void BroadcastAccessibility( const SfxHint &rHint ); - bool HasAccessibilityObjects(); + void AddAccessibilityObject( SfxListener& rObject ); + void RemoveAccessibilityObject( SfxListener& rObject ); + void BroadcastAccessibility( const SfxHint &rHint ); + bool HasAccessibilityObjects(); const ScPreviewLocationData& GetLocationData(); ScDocument& GetDocument(); diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 6fb376f016e7..1f5b26ff8917 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -66,7 +66,7 @@ private: VclScrolledWindow& m_rScrolledWindow; ScrollBar& m_rVertScroll; - DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); void checkAutoVScroll(); diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 6ad122d147dc..216fdf85ed82 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -170,8 +170,8 @@ private: void DoAddWin( ScGridWindow* pWin ); void InitScrollBar( ScrollBar& rScrollBar, long nMaxVal ); - DECL_LINK( ScrollHdl, ScrollBar* ); - DECL_LINK( EndScrollHdl, void* ); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void ); + DECL_LINK_TYPED(EndScrollHdl, ScrollBar*, void ); DECL_LINK_TYPED(SplitHdl, Splitter*, void); void DoHSplit(long nSplitPos); diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 69d602daf9f3..8c095bcfa434 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -347,13 +347,12 @@ IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_CloseHdl, Button*, void) EndDialog( ); } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_ScrollHdl, ScrollBar*, void) { long nOffset = m_pSlider->GetThumbPos(); nCurrentRow = nStartRow + nOffset + 1; SetButtonState(); FillCtrls(nCurrentRow); - return 0; } void ScDataFormDlg::SetButtonState() diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 60cdf3df92cb..94f2389f5f54 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -727,14 +727,13 @@ IMPL_LINK_NOARG(ScOptSolverDlg, SelectHdl) return 0; } -IMPL_LINK_NOARG(ScOptSolverDlg, ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, ScrollHdl, ScrollBar*, void) { ReadConditions(); nScrollPos = m_pScrollBar->GetThumbPos(); ShowConditions(); if( mpEdActive ) mpEdActive->SetSelection( Selection( 0, SELECTION_MAX ) ); - return 0; } IMPL_LINK( ScOptSolverDlg, CursorUpHdl, ScCursorRefEdit*, pEdit ) diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index ceb7d578b15c..60a9fb7dbcbd 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -409,7 +409,7 @@ void ScPreviewShell::UpdateScrollBars() } } -IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) +IMPL_LINK_TYPED( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) { long nPos = pScroll->GetThumbPos(); long nDelta = pScroll->GetDelta(); @@ -478,8 +478,6 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) Help::ShowQuickHelp( pScroll->GetParent(), aRect, aHelpStr, nAlign ); } } - - return 0; } IMPL_LINK (ScPreviewShell, CloseHdl, SystemWindow*,) diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 1aa3e4d0220b..b0b020ee5853 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -1020,17 +1020,16 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) return bDone; } -IMPL_LINK_NOARG(ScTabView, EndScrollHdl) +IMPL_LINK_NOARG_TYPED(ScTabView, EndScrollHdl, ScrollBar*, void) { if ( bDragging ) { UpdateScrollBars(); bDragging = false; } - return 0; } -IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) +IMPL_LINK_TYPED( ScTabView, ScrollHdl, ScrollBar*, pScroll, void ) { bool bHoriz = ( pScroll == aHScrollLeft.get() || pScroll == aHScrollRight.get() ); long nViewPos; @@ -1173,8 +1172,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) else ScrollY( nDelta, (pScroll == aVScrollTop.get()) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM, bUpdate ); } - - return 0; } void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars ) |