diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-02 09:15:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-02 14:13:23 +0200 |
commit | 7d9ae709c5c252a5360f3ef85f8fba39cdec5bda (patch) | |
tree | bfb51f86ce91308d3ee124d22bf37590afdeb3f3 /avmedia | |
parent | 558301f99940997526513853e3e0d11f0b63d3ac (diff) |
convert MediaControlStyle to scoped enum
Change-Id: If99d07d218499f7daa8b7294c216ddf2c0849b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101908
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 12 | ||||
-rw-r--r-- | avmedia/source/framework/mediatoolbox.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow_impl.cxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 1db23fdbb23b..a0ab139279f7 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -35,9 +35,9 @@ namespace avmedia { MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyle ) : - // MEDIACONTROLSTYLE_MULTILINE is the normal docking windows of tools->media player - // MEDIACONTROLSTYLE_SINGLELINE is the toolbar of view->toolbar->media playback - InterimItemWindow(pParent, eControlStyle == MEDIACONTROLSTYLE_MULTILINE ? + // MediaControlStyle::MultiLine is the normal docking windows of tools->media player + // MediaControlStyle::SingleLine is the toolbar of view->toolbar->media playback + InterimItemWindow(pParent, eControlStyle == MediaControlStyle::MultiLine ? OUString("svx/ui/mediawindow.ui") : OUString("svx/ui/medialine.ui"), "MediaWindow"), @@ -82,7 +82,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl const OUString aMediaPath( AvmResId( AVMEDIA_MEDIA_PATH_DEFAULT ) ); mxMediaPath->set_label(aMediaPath); - if (meControlStyle == MEDIACONTROLSTYLE_SINGLELINE) + if (meControlStyle == MediaControlStyle::SingleLine) mxMediaPath->set_size_request(mxMediaPath->get_preferred_size().Width() + 400, -1); // maybe extend the no. 400 to span the screen width // we want time field + progress slider to update as the media plays @@ -93,7 +93,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl void MediaControl::InitializeWidgets() { - if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE ) + if( meControlStyle != MediaControlStyle::SingleLine ) { mxPlayToolBox->set_item_help_id("open", HID_AVMEDIA_TOOLBOXITEM_OPEN); mxPlayToolBox->set_item_label("open", AvmResId(AVMEDIA_STR_OPEN)); @@ -128,7 +128,7 @@ void MediaControl::setState( const MediaItem& rItem ) { mfTime = fTime; maItem.merge( rItem ); - if( rItem.getURL().isEmpty() && meControlStyle == MEDIACONTROLSTYLE_SINGLELINE ) + if( rItem.getURL().isEmpty() && meControlStyle == MediaControlStyle::SingleLine ) mxPlayToolBox->set_sensitive(false); UpdateToolBoxes( maItem ); UpdateTimeSlider( maItem ); diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 0eac2eff0378..a109113a78fe 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -47,7 +47,7 @@ private: }; MediaToolBoxControl_Impl::MediaToolBoxControl_Impl( vcl::Window& rParent, MediaToolBoxControl& rControl ) : - MediaControl( &rParent, MEDIACONTROLSTYLE_SINGLELINE ), + MediaControl( &rParent, MediaControlStyle::SingleLine ), mpToolBoxControl( &rControl ) { SetSizePixel(m_xContainer->get_preferred_size()); diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index d030271b1c7f..78203960456c 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star; namespace avmedia::priv { MediaWindowControl::MediaWindowControl(vcl::Window* pParent) - : MediaControl(pParent, MEDIACONTROLSTYLE_MULTILINE) + : MediaControl(pParent, MediaControlStyle::MultiLine) { } |