diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-30 23:17:03 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-07-01 11:34:19 +0000 |
commit | 6fb44f527c8cf63f4487145298b00e65925ddede (patch) | |
tree | 87539e2ee536872b300094abf184d27ad0b2a1f3 /sd | |
parent | 59e4bd07211d8509dcb3e89f6645c0ba3085df23 (diff) |
filedlg: Improve code readability a bit
Change-Id: Ic018c5795fabc0bf8425b8b5cabae4ab6eb68317
Reviewed-on: https://gerrit.libreoffice.org/26845
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/filedlg.cxx | 38 | ||||
-rw-r--r-- | sd/source/ui/inc/filedlg.hxx | 10 |
2 files changed, 20 insertions, 28 deletions
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index df68e879c825..502153a65e7d 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -51,26 +51,24 @@ private: css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess; css::uno::Reference< css::media::XPlayer > mxPlayer; - ImplSVEvent * mnPlaySoundEvent; - bool mbUsableSelection; - bool mbLabelPlaying; + ImplSVEvent * mnPlaySoundEvent; + bool mbUsableSelection; + bool mbLabelPlaying; + Idle maUpdateIdle; - void CheckSelectionState(); + void CheckSelectionState(); - DECL_LINK_TYPED( PlayMusicHdl, void *, void ); - - Idle maUpdateIdle; - - DECL_LINK_TYPED( IsMusicStoppedHdl, Idle *, void ); + DECL_LINK_TYPED( PlayMusicHdl, void *, void ); + DECL_LINK_TYPED( IsMusicStoppedHdl, Idle *, void ); public: - explicit SdFileDialog_Imp( const short nDialogType ); - virtual ~SdFileDialog_Imp(); + explicit SdFileDialog_Imp( const short nDialogType ); + virtual ~SdFileDialog_Imp(); - ErrCode Execute(); + ErrCode Execute(); // overwritten from FileDialogHelper, to receive user feedback - virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent ) override; + virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent ) override; }; void SAL_CALL SdFileDialog_Imp::ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent ) @@ -113,7 +111,6 @@ IMPL_LINK_NOARG_TYPED(SdFileDialog_Imp, PlayMusicHdl, void*, void) { mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, SD_RESSTR( STR_PLAY ) ); - mbLabelPlaying = false; } catch(const css::lang::IllegalArgumentException&) @@ -146,7 +143,6 @@ IMPL_LINK_NOARG_TYPED(SdFileDialog_Imp, PlayMusicHdl, void*, void) { mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, SD_RESSTR( STR_STOP ) ); - mbLabelPlaying = true; } catch (const css::lang::IllegalArgumentException&) @@ -164,10 +160,8 @@ IMPL_LINK_NOARG_TYPED(SdFileDialog_Imp, IsMusicStoppedHdl, Idle *, void) { SolarMutexGuard aGuard; - if ( - mxPlayer.is() && mxPlayer->isPlaying() && - mxPlayer->getMediaTime() < mxPlayer->getDuration() - ) + if (mxPlayer.is() && mxPlayer->isPlaying() && + mxPlayer->getMediaTime() < mxPlayer->getDuration()) { maUpdateIdle.Start(); return; @@ -228,8 +222,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType ) : if( mxControlAccess.is() ) { - if( nDialogType == - css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY ) + if( nDialogType == css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY ) { try { @@ -267,8 +260,7 @@ SdFileDialog_Imp::~SdFileDialog_Imp() ErrCode SdFileDialog_Imp::Execute() { - // make sure selection checkbox is disabled if - // HTML is current filter! + // make sure selection checkbox is disabled if HTML is current filter! CheckSelectionState(); return FileDialogHelper::Execute(); } diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx index 538c935fe4c8..a8667c5e888b 100644 --- a/sd/source/ui/inc/filedlg.hxx +++ b/sd/source/ui/inc/filedlg.hxx @@ -44,12 +44,12 @@ class SD_DLLPUBLIC SdOpenSoundFileDialog SdOpenSoundFileDialog & operator= (const SdOpenSoundFileDialog &) = delete; public: - SdOpenSoundFileDialog(); - ~SdOpenSoundFileDialog(); + SdOpenSoundFileDialog(); + ~SdOpenSoundFileDialog(); - ErrCode Execute(); - OUString GetPath() const; - void SetPath( const OUString& rPath ); + ErrCode Execute(); + OUString GetPath() const; + void SetPath( const OUString& rPath ); }; #endif // INCLUDED_SD_SOURCE_UI_INC_FILEDLG_HXX |