[Libreoffice-commits] core.git: sd/source

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Fri Jul 1 12:17:14 UTC 2016


 sd/source/ui/dlg/filedlg.cxx |   16 +++++++++++++---
 sd/source/ui/inc/filedlg.hxx |    1 +
 2 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit faaa6a4bcb5cca22ebca0b2312ae53bbb5e91129
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Fri Jul 1 11:53:46 2016 +0200

    Add link option to sd file open dialog
    
    Change-Id: I4627996fa142d350ba97aa53ac303dfdc7968f7e
    Reviewed-on: https://gerrit.libreoffice.org/26847
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 502153a..94922ca 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 a8667c5..68e507c 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


More information about the Libreoffice-commits mailing list