diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-30 11:19:43 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-30 11:40:42 +0000 |
commit | e9891e5dd8e9c83a1bf0483aa314e743a1c02e50 (patch) | |
tree | b847f41f9bc24ac2ff221e8a3f987ff67c409e52 /sfx2/source | |
parent | 6168f10b6280b2d60de44a333f3f1dc23cbb9bcf (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index c41c0f88e82b..e82b4ec0ca2e 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -435,6 +435,7 @@ bool FileDialogHelper_Impl::isInOpenMode() const case FILEOPEN_PLAY: case FILEOPEN_READONLY_VERSION: case FILEOPEN_LINK_PREVIEW: + case FILEOPEN_PREVIEW: bRet = true; } @@ -828,6 +829,7 @@ static open_or_save_t lcl_OpenOrSave(sal_Int16 const nDialogType) case FILEOPEN_PLAY: case FILEOPEN_READONLY_VERSION: case FILEOPEN_LINK_PREVIEW: + case FILEOPEN_PREVIEW: return OPEN; case FILESAVE_SIMPLE: case FILESAVE_AUTOEXTENSION_PASSWORD: @@ -1015,6 +1017,14 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( mbIsSaveDlg = true; break; + case FILEOPEN_PREVIEW: + nTemplateDescription = TemplateDescription::FILEOPEN_PREVIEW; + mbHasPreview = true; + // aPreviewTimer + maPreviewIdle.SetPriority( SchedulerPriority::LOWEST ); + maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); + break; + default: SAL_WARN( "sfx.dialog", "FileDialogHelper::ctor with unknown type" ); break; |