diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-31 10:36:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-04 13:08:29 +0200 |
commit | 8f0f4faad2db50fdc50d3f66ed5d32c9a0138dad (patch) | |
tree | 50d5efbe18af28444e1ac0757924120a4627b4b3 | |
parent | 5b77f6d04f8798eaf6bd1e2d3b3087bcdab9db4a (diff) |
convert Link<> to typed
Change-Id: Ibf658f42227ee3f4277f0089b6f8a8ac771dab1a
-rw-r--r-- | include/svtools/stdmenu.hxx | 9 | ||||
-rw-r--r-- | include/svx/fntszctl.hxx | 2 | ||||
-rw-r--r-- | svtools/source/control/stdmenu.cxx | 11 | ||||
-rw-r--r-- | svx/source/mnuctrls/fntszctl.cxx | 5 |
4 files changed, 7 insertions, 20 deletions
diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx index 7abd16548884..2a38a9977964 100644 --- a/include/svtools/stdmenu.hxx +++ b/include/svtools/stdmenu.hxx @@ -121,10 +121,9 @@ public: class SVT_DLLPUBLIC FontSizeMenu : public PopupMenu { private: - long* mpHeightAry; - long mnCurHeight; - Link<> maSelectHdl; - Link<> maHighlightHdl; + long* mpHeightAry; + long mnCurHeight; + Link<FontSizeMenu*,void> maSelectHdl; public: FontSizeMenu(); @@ -138,7 +137,7 @@ public: void SetCurHeight( long nHeight ); long GetCurHeight() const { return mnCurHeight; } - void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; } + void SetSelectHdl( const Link<FontSizeMenu*,void>& rLink ) { maSelectHdl = rLink; } }; #endif // INCLUDED_SVTOOLS_STDMENU_HXX diff --git a/include/svx/fntszctl.hxx b/include/svx/fntszctl.hxx index c5ee10a96e4e..5003c914f97b 100644 --- a/include/svx/fntszctl.hxx +++ b/include/svx/fntszctl.hxx @@ -36,7 +36,7 @@ private: Menu& rParent; SfxStatusForwarder aFontNameForwarder; - DECL_LINK( MenuSelect, FontSizeMenu * ); + DECL_LINK_TYPED( MenuSelect, FontSizeMenu *, void ); protected: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index fd6306d8d027..cf006a8e0885 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -123,17 +123,6 @@ void FontSizeMenu::Select() void FontSizeMenu::Highlight() { - const long nTempHeight = mnCurHeight; - const sal_uInt16 nCurItemId = GetCurItemId(); - if ( !nCurItemId ) - mnCurHeight = 0; - else - { - //sal_Int32 nValue = GetItemText( nCurItemId ).ToInt32(); - mnCurHeight = mpHeightAry[ nCurItemId - 1 ]; - } - maHighlightHdl.Call( this ); - mnCurHeight = nTempHeight; } void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList ) diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index 7dcb0ef8a7d9..34f9d6fe23ac 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -48,13 +48,13 @@ SFX_IMPL_MENU_CONTROL(SvxFontSizeMenuControl, SvxFontHeightItem); wird in einem SvxFontHeightItem verschickt. */ -IMPL_LINK( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen ) +IMPL_LINK_TYPED( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen, void ) { SfxViewFrame* pFrm = SfxViewFrame::Current(); SfxShell* pSh = pFrm ? pFrm->GetDispatcher()->GetShell( 0 ) : NULL; if ( !pSh ) - return 0; + return; const SfxItemPool& rPool = pSh->GetPool(); sal_uInt16 nWhich = rPool.GetWhich( SID_ATTR_CHAR_FONTHEIGHT ); @@ -62,7 +62,6 @@ IMPL_LINK( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen ) long nH = LOGIC( pMen->GetCurHeight(), MAP_POINT, (MapUnit)eUnit ) / 10; SvxFontHeightItem aItem( nH, 100, GetId() ); GetBindings().GetDispatcher()->Execute( GetId(), SfxCallMode::RECORD, &aItem, 0L ); - return 1; } |