diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-02-06 17:48:51 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-02-08 16:42:14 +0100 |
commit | 38774ce79b4b24628c3a73f387489bf2498363f1 (patch) | |
tree | d305c9445581abe73fbb917dc010c8ffc88ba191 /vcl | |
parent | c83d2ac99dc3da4ef85b193543a93e02e3858844 (diff) |
tdf#86739 Option to set image anchor type in image insert dialog
This adds the selectbox to (hopefully) all filepickers:
- LO native
- GTK/GTK3
- KDE4
- KDE5
- Windows
- macOS
Change-Id: I01bd42b1ca18e0f691b879647a6cb1b62177d3ce
Reviewed-on: https://gerrit.libreoffice.org/49311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/strings.hrc | 1 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 11 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/resourceprovider.cxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/kde4/KDE4FilePicker.cxx | 12 |
6 files changed, 38 insertions, 0 deletions
diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc index 3960232843f7..f9ee189f6d90 100644 --- a/vcl/inc/strings.hrc +++ b/vcl/inc/strings.hrc @@ -102,6 +102,7 @@ #define STR_FPICKER_VERSION NC_("STR_FPICKER_VERSION", "~Version:") #define STR_FPICKER_TEMPLATES NC_("STR_FPICKER_TEMPLATES", "S~tyles:") #define STR_FPICKER_IMAGE_TEMPLATE NC_("STR_FPICKER_IMAGE_TEMPLATE", "Frame Style: ") +#define STR_FPICKER_IMAGE_ANCHOR NC_("STR_FPICKER_IMAGE_ANCHOR", "A~nchor: ") #define STR_FPICKER_SELECTION NC_("STR_FPICKER_SELECTION", "~Selection") #define STR_FPICKER_FOLDER_DEFAULT_TITLE NC_("STR_FPICKER_FOLDER_DEFAULT_TITLE", "Select Path") #define STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION NC_("STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION", "Please select a folder.") diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 95524567d898..7437bf44cb2a 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -202,6 +202,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext LABEL_LIST( VERSION ); LABEL_LIST( TEMPLATE ); LABEL_LIST( IMAGE_TEMPLATE ); + LABEL_LIST( IMAGE_ANCHOR ); default: SAL_WARN( "vcl.gtk", "Handle unknown control " << i); break; @@ -1079,9 +1080,11 @@ GtkWidget *SalGtkFilePicker::getWidget( sal_Int16 nControlId, GType *pType ) MAP_LIST( VERSION ); MAP_LIST( TEMPLATE ); MAP_LIST( IMAGE_TEMPLATE ); + MAP_LIST( IMAGE_ANCHOR ); MAP_LIST_LABEL( VERSION ); MAP_LIST_LABEL( TEMPLATE ); MAP_LIST_LABEL( IMAGE_TEMPLATE ); + MAP_LIST_LABEL( IMAGE_ANCHOR ); default: SAL_WARN( "vcl.gtk", "Handle unknown control " << nControlId); break; @@ -1643,6 +1646,14 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu mbListVisibility[IMAGE_TEMPLATE] = true; // TODO break; + case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR: + eAction = GTK_FILE_CHOOSER_ACTION_OPEN; + first_button_text = GTK_STOCK_OPEN; + mbToggleVisibility[LINK] = true; + mbToggleVisibility[PREVIEW] = true; + mbListVisibility[IMAGE_ANCHOR] = true; + // TODO + break; case FILEOPEN_PLAY: eAction = GTK_FILE_CHOOSER_ACTION_OPEN; first_button_text = GTK_STOCK_OPEN; diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx index bac8395a5359..c46f633b8b39 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx @@ -181,6 +181,7 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base VERSION, TEMPLATE, IMAGE_TEMPLATE, + IMAGE_ANCHOR, LIST_LAST }; diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx index 3e5469a7c392..2ced7277066c 100644 --- a/vcl/unx/gtk/fpicker/resourceprovider.cxx +++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx @@ -47,6 +47,7 @@ static const struct { LISTBOX_VERSION_LABEL, STR_FPICKER_VERSION }, { LISTBOX_TEMPLATE_LABEL, STR_FPICKER_TEMPLATES }, { LISTBOX_IMAGE_TEMPLATE_LABEL, STR_FPICKER_IMAGE_TEMPLATE }, + { LISTBOX_IMAGE_ANCHOR_LABEL, STR_FPICKER_IMAGE_ANCHOR }, { CHECKBOX_SELECTION, STR_FPICKER_SELECTION }, { FOLDERPICKER_TITLE, STR_FPICKER_FOLDER_DEFAULT_TITLE }, { FOLDER_PICKER_DEF_DESCRIPTION, STR_FPICKER_FOLDER_DEFAULT_DESCRIPTION }, diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx index 8c983996b791..919328dd9d6c 100644 --- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx @@ -255,9 +255,13 @@ void Gtk3KDE5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_IMAGE_TEMPLATE: resId = STR_FPICKER_IMAGE_TEMPLATE; break; + case LISTBOX_IMAGE_ANCHOR: + resId = STR_FPICKER_IMAGE_ANCHOR; + break; case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: + case LISTBOX_IMAGE_ANCHOR_LABEL: case LISTBOX_FILTER_SELECTOR: break; } @@ -285,9 +289,11 @@ void Gtk3KDE5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_VERSION: case LISTBOX_TEMPLATE: case LISTBOX_IMAGE_TEMPLATE: + case LISTBOX_IMAGE_ANCHOR: case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: + case LISTBOX_IMAGE_ANCHOR_LABEL: case LISTBOX_FILTER_SELECTOR: break; } @@ -363,6 +369,12 @@ void SAL_CALL Gtk3KDE5FilePicker::initialize(const uno::Sequence<uno::Any>& args addCustomControl(LISTBOX_IMAGE_TEMPLATE); break; + case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR: + addCustomControl(CHECKBOX_LINK); + addCustomControl(CHECKBOX_PREVIEW); + addCustomControl(LISTBOX_IMAGE_ANCHOR); + break; + case FILEOPEN_PLAY: addCustomControl(PUSHBUTTON_PLAY); break; diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index 6e2c90d87953..f601fe59f92f 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -563,9 +563,13 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_IMAGE_TEMPLATE: resId = STR_FPICKER_IMAGE_TEMPLATE; break; + case LISTBOX_IMAGE_ANCHOR: + resId = STR_FPICKER_IMAGE_ANCHOR; + break; case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: + case LISTBOX_IMAGE_ANCHOR_LABEL: case LISTBOX_FILTER_SELECTOR: break; } @@ -594,9 +598,11 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_VERSION: case LISTBOX_TEMPLATE: case LISTBOX_IMAGE_TEMPLATE: + case LISTBOX_IMAGE_ANCHOR: case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: + case LISTBOX_IMAGE_ANCHOR_LABEL: case LISTBOX_FILTER_SELECTOR: break; } @@ -691,6 +697,12 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args ) addCustomControl( LISTBOX_IMAGE_TEMPLATE ); break; + case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR: + addCustomControl( CHECKBOX_LINK ); + addCustomControl( CHECKBOX_PREVIEW ); + addCustomControl( LISTBOX_IMAGE_ANCHOR ); + break; + case FILEOPEN_PLAY: addCustomControl( PUSHBUTTON_PLAY ); break; |