diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-10-04 15:05:38 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-12 10:48:13 +0000 |
commit | 3c99f8500f657ed84b316390d5175a6f5e56bc69 (patch) | |
tree | 749f16652560a50d409b12a23bf1a5d93b3cd2d5 /avmedia/source | |
parent | bbadb38539eb233ac45b267034066a7274181c65 (diff) |
convert Link<> to typed
Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb
Reviewed-on: https://gerrit.libreoffice.org/19305
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'avmedia/source')
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index e5b58a8c00b4..d8efcf2a3b03 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -560,30 +560,25 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void ) -IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) +IMPL_LINK_TYPED( MediaControl, implZoomSelectHdl, ListBox&, p, void ) { - if( p ) - { - MediaItem aExecItem; - css::media::ZoomLevel eLevel; - - switch( p->GetSelectEntryPos() ) - { - case( AVMEDIA_ZOOMLEVEL_50 ): eLevel = css::media::ZoomLevel_ZOOM_1_TO_2; break; - case( AVMEDIA_ZOOMLEVEL_100 ): eLevel = css::media::ZoomLevel_ORIGINAL; break; - case( AVMEDIA_ZOOMLEVEL_200 ): eLevel = css::media::ZoomLevel_ZOOM_2_TO_1; break; - case( AVMEDIA_ZOOMLEVEL_FIT ): eLevel = css::media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT; break; - case( AVMEDIA_ZOOMLEVEL_SCALED ): eLevel = css::media::ZoomLevel_FIT_TO_WINDOW; break; + MediaItem aExecItem; + css::media::ZoomLevel eLevel; - default: eLevel = css::media::ZoomLevel_NOT_AVAILABLE; break; - } + switch( p.GetSelectEntryPos() ) + { + case( AVMEDIA_ZOOMLEVEL_50 ): eLevel = css::media::ZoomLevel_ZOOM_1_TO_2; break; + case( AVMEDIA_ZOOMLEVEL_100 ): eLevel = css::media::ZoomLevel_ORIGINAL; break; + case( AVMEDIA_ZOOMLEVEL_200 ): eLevel = css::media::ZoomLevel_ZOOM_2_TO_1; break; + case( AVMEDIA_ZOOMLEVEL_FIT ): eLevel = css::media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT; break; + case( AVMEDIA_ZOOMLEVEL_SCALED ): eLevel = css::media::ZoomLevel_FIT_TO_WINDOW; break; - aExecItem.setZoom( eLevel ); - execute( aExecItem ); - update(); + default: eLevel = css::media::ZoomLevel_NOT_AVAILABLE; break; } - return 0; + aExecItem.setZoom( eLevel ); + execute( aExecItem ); + update(); } |