summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-07-01 11:49:02 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-07-01 12:15:08 +0000
commit5198c98337882319fae176135dcce1ad375ed2f6 (patch)
tree30bdd43f51b6f8ec5d28bf1b555388d055937d88 /fpicker
parent6373f9ec6d056ffaef4a209b20a6ec7bab51c7b3 (diff)
Add new open dialog type: Play and link
This is needed e.g. for the "Slide transition sound" files where we want to play files and also give the choice whether to link or not Change-Id: I5aaef7152be8e5c0a0f88c4d7234926f233c5d92 Reviewed-on: https://gerrit.libreoffice.org/26846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/aqua/ControlHelper.mm2
-rw-r--r--fpicker/source/aqua/SalAquaFilePicker.mm3
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx4
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.cxx1
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx8
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx1
6 files changed, 19 insertions, 0 deletions
diff --git a/fpicker/source/aqua/ControlHelper.mm b/fpicker/source/aqua/ControlHelper.mm
index 0cecb40b1cea..092d0494808b 100644
--- a/fpicker/source/aqua/ControlHelper.mm
+++ b/fpicker/source/aqua/ControlHelper.mm
@@ -219,6 +219,8 @@ void ControlHelper::initialize( sal_Int16 nTemplateId )
case FILEOPEN_PREVIEW:
m_bToggleVisibility[PREVIEW] = true;
break;
+ case FILEOPEN_LINK_PLAY:
+ m_bToggleVisibility[LINK] = true;
}
createControls();
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm
index eef8f425e91c..5ef1b40e0594 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -474,6 +474,9 @@ throw( uno::Exception, uno::RuntimeException )
case FILEOPEN_PLAY:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
break;
+ case FILEOPEN_LINK_PLAY:
+ m_nDialogType = NAVIGATIONSERVICES_OPEN;
+ break;
case FILEOPEN_READONLY_VERSION:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
break;
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 1a5496b439d8..cdf83c2cdc1a 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -269,6 +269,10 @@ PickerFlags SvtFilePicker::getPickerFlags()
{
nBits = PickerFlags::Open | PickerFlags::PlayButton;
}
+ else if ( m_nServiceType == TemplateDescription::FILEOPEN_LINK_PLAY )
+ {
+ nBits = PickerFlags::Open | PickerFlags::InsertAsLink | PickerFlags::PlayButton;
+ }
else if ( m_nServiceType == TemplateDescription::FILEOPEN_READONLY_VERSION )
{
nBits = PickerFlags::Open | PickerFlags::ReadOnly | PickerFlags::ShowVersions;
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 40c258d124f2..3644f3f6303f 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -554,6 +554,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
break;
case FILEOPEN_PLAY:
+ case FILEOPEN_LINK_PLAY: //FIXME: FILEOPEN_LINK_PLAY needs an own template, no idea how to create one
winResTemplateId = TMPL2000_PLAY_PUSHBUTTON;
break;
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 102117eb46fd..3297949a6aaf 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -501,6 +501,14 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
}
break;
+ case css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY :
+ {
+ bFileOpenDialog = sal_True;
+ nFeatures |= FEATURE_LINK;
+ nFeatures |= FEATURE_PLAY;
+ }
+ break;
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION :
{
bFileOpenDialog = sal_True;
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index d60aff8b95f3..449519bc22cf 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -552,6 +552,7 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I
break;
case css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY :
+ case css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY :
aGUID = CLIENTID_FILEOPEN_PLAY;
break;