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 /vcl/unx | |
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 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/kde/UnxFilePicker.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/kde4/KDE4FilePicker.cxx | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 4a9453b7884c..7207821c2878 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -1681,6 +1681,12 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu OSL_TRACE( "7all true" ); // TODO break; + case FILEOPEN_PREVIEW: + eAction = GTK_FILE_CHOOSER_ACTION_OPEN; + first_button_text = GTK_STOCK_OPEN; + mbToggleVisibility[PREVIEW] = true; + // TODO + break; default: throw lang::IllegalArgumentException( OUString( "Unknown template" ), diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx index 8dce0e0d0610..bbee2f31dd1a 100644 --- a/vcl/unx/kde/UnxFilePicker.cxx +++ b/vcl/unx/kde/UnxFilePicker.cxx @@ -724,6 +724,12 @@ void SAL_CALL UnxFilePicker::initialize( const uno::Sequence<uno::Any> &rArgumen sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ); break; + case FILEOPEN_PREVIEW: + sendCommand( aTypeOpen ); + + sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW ); + break; + default: throw lang::IllegalArgumentException( OUString( "Unknown template" ), diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index 229aa020bb98..2a359986bbe4 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -725,6 +725,10 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args ) addCustomControl( CHECKBOX_PREVIEW ); break; + case FILEOPEN_PREVIEW: + addCustomControl( CHECKBOX_PREVIEW ); + break; + default: throw lang::IllegalArgumentException( OUString( "Unknown template" ), |