diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-16 10:30:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-16 13:48:43 +0200 |
commit | a7e0a8901e5c16d1ee0637b23217cfd21dfbc89f (patch) | |
tree | 3db81e06c02551417b5d7cc12aa5afd9b05b7d00 /avmedia/source/framework | |
parent | 1e48666b6c007fdf8f354a1a50e51f8f1e906b87 (diff) |
loplugin:comparisonwithconstant in avmedia
Change-Id: Iba0a1969648e95f6e0f6a947f067c5b8e4eb3406
Reviewed-on: https://gerrit.libreoffice.org/37667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'avmedia/source/framework')
-rw-r--r-- | avmedia/source/framework/MediaControlBase.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 6 | ||||
-rw-r--r-- | avmedia/source/framework/mediatoolbox.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/modeltools.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index 6e879244cd07..b828efb990b6 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -153,7 +153,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem) { mpPlayToolBox->Enable(); mpMuteToolBox->Enable(); - if( MediaState::Play == aMediaItem.getState() ) + if( aMediaItem.getState() == MediaState::Play ) { mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY ); mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 85d3f95dd97b..846bd1a52f68 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -106,7 +106,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl mpMediaPath->Show(); maMinSize.Width() += mpMediaPath->GetSizePixel().Width(); - if( MEDIACONTROLSTYLE_MULTILINE == meControlStyle ) + if( meControlStyle == MEDIACONTROLSTYLE_MULTILINE ) { maMinSize.Width() = 256; maMinSize.Height() = ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET; @@ -121,7 +121,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl void MediaControl::InitializeWidgets() { - if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle ) + if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE ) { mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), OUString( AVMEDIA_RESID( AVMEDIA_STR_OPEN ) ) ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN ); @@ -190,7 +190,7 @@ void MediaControl::Resize() const sal_Int32 nMediaPathWidth = mpMediaPath->GetSizePixel().Width(); const sal_Int32 nTimeSliderHeight = mpTimeSlider->GetSizePixel().Height(); - if( MEDIACONTROLSTYLE_SINGLELINE == meControlStyle ) + if( meControlStyle == MEDIACONTROLSTYLE_SINGLELINE ) { const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - ( AVMEDIA_CONTROLOFFSET * 4 ) - nPlayToolBoxWidth - nMuteToolBoxWidth - nVolumeSliderWidth - nTimeEditWidth - nZoomToolBoxWidth - nMediaPathWidth; diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 08d1f9fa7e43..b40c07fc3c89 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -103,7 +103,7 @@ void MediaToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const S const MediaItem* pMediaItem = dynamic_cast<const MediaItem*>( pState ); - if( pMediaItem && ( SfxItemState::DEFAULT == eState ) ) + if( pMediaItem && ( eState == SfxItemState::DEFAULT ) ) pCtrl->setState( *pMediaItem ); } } diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx index ab78d0d0b544..03d4647849de 100644 --- a/avmedia/source/framework/modeltools.cxx +++ b/avmedia/source/framework/modeltools.cxx @@ -143,7 +143,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference< OUString sTempFileURL; const ::osl::FileBase::RC aErr = ::osl::FileBase::createTempFile(nullptr, nullptr, &sTempFileURL); - if (::osl::FileBase::E_None != aErr) + if (aErr != ::osl::FileBase::E_None) { SAL_WARN("avmedia.opengl", "Cannot create temp file"); return; |