From e9891e5dd8e9c83a1bf0483aa314e743a1c02e50 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Thu, 30 Jun 2016 11:19:43 +0200 Subject: Add new open dialog type: Preview only (without link) This is needed e.g. for the "Insert Photo Album" dialog where we don't want the "Insert Link" option in the file open dialog (tdf#65356) Change-Id: I01aecaaf8194a8123931b0482b4a37155654dfc2 Reviewed-on: https://gerrit.libreoffice.org/26796 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- fpicker/source/office/OfficeFilePicker.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fpicker/source/office') diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 728dd4f5ca75..1a5496b439d8 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -277,6 +277,10 @@ PickerFlags SvtFilePicker::getPickerFlags() { nBits = PickerFlags::Open | PickerFlags::InsertAsLink | PickerFlags::ShowPreview; } + else if ( m_nServiceType == TemplateDescription::FILEOPEN_PREVIEW ) + { + nBits = PickerFlags::Open | PickerFlags::ShowPreview; + } if ( m_bMultiSelection && ( nBits & PickerFlags::Open ) ) nBits |= PickerFlags::MultiSelection; -- cgit