diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-07-01 11:53:46 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-07-01 12:16:41 +0000 |
commit | faaa6a4bcb5cca22ebca0b2312ae53bbb5e91129 (patch) | |
tree | d02b8d29816523773d356756af99ae857cb43b35 /sd | |
parent | 5198c98337882319fae176135dcce1ad375ed2f6 (diff) |
Add link option to sd file open dialog
Change-Id: I4627996fa142d350ba97aa53ac303dfdc7968f7e
Reviewed-on: https://gerrit.libreoffice.org/26847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/filedlg.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/inc/filedlg.hxx | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 502153a65e7d..94922cabe7da 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -207,7 +207,7 @@ void SdFileDialog_Imp::CheckSelectionState() } } -SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType ) : +SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType ) : FileDialogHelper( nDialogType ), mnPlaySoundEvent( nullptr ), mbUsableSelection( false ), @@ -222,7 +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_LINK_PLAY ) { try { @@ -269,7 +269,7 @@ ErrCode SdFileDialog_Imp::Execute() // these are simple forwarders SdOpenSoundFileDialog::SdOpenSoundFileDialog() : - mpImpl( new SdFileDialog_Imp( css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY ) ) + mpImpl( new SdFileDialog_Imp( css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY ) ) { OUString aDescr; aDescr = SD_RESSTR(STR_ALL_FILES); @@ -314,4 +314,14 @@ void SdOpenSoundFileDialog::SetPath( const OUString& rPath ) mpImpl->SetDisplayDirectory( rPath ); } +// WIP, please don't remove, dear Clang plugins +bool SdOpenSoundFileDialog::IsInsertAsLinkSelected() +{ + bool bInsertAsLinkSelected = false; + css::uno::Reference<css::ui::dialogs::XFilePicker2> const xFilePicker(mpImpl->GetFilePicker()); + css::uno::Reference<css::ui::dialogs::XFilePickerControlAccess> const xControlAccess(xFilePicker, css::uno::UNO_QUERY_THROW); + xControlAccess->getValue(css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bInsertAsLinkSelected; + return bInsertAsLinkSelected; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx index a8667c5e888b..68e507c8fc93 100644 --- a/sd/source/ui/inc/filedlg.hxx +++ b/sd/source/ui/inc/filedlg.hxx @@ -50,6 +50,7 @@ public: ErrCode Execute(); OUString GetPath() const; void SetPath( const OUString& rPath ); + bool IsInsertAsLinkSelected(); }; #endif // INCLUDED_SD_SOURCE_UI_INC_FILEDLG_HXX |