summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/filedlghelper.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-02-06 17:48:51 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-02-08 16:42:14 +0100
commit38774ce79b4b24628c3a73f387489bf2498363f1 (patch)
treed305c9445581abe73fbb917dc010c8ffc88ba191 /sfx2/source/dialog/filedlghelper.cxx
parentc83d2ac99dc3da4ef85b193543a93e02e3858844 (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 'sfx2/source/dialog/filedlghelper.cxx')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx25
1 files changed, 16 insertions, 9 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 12efb69e5645..3d20a6a3333d 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -259,6 +259,11 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
sHelpId = HID_FILEOPEN_IMAGE_TEMPLATE;
break;
+ case ExtendedFilePickerElementIds::LISTBOX_IMAGE_ANCHOR_LABEL :
+ case ExtendedFilePickerElementIds::LISTBOX_IMAGE_ANCHOR :
+ sHelpId = HID_FILEOPEN_IMAGE_ANCHOR;
+ break;
+
case ExtendedFilePickerElementIds::CHECKBOX_SELECTION :
sHelpId = HID_FILESAVE_SELECTION;
break;
@@ -820,6 +825,7 @@ static open_or_save_t lcl_OpenOrSave(sal_Int16 const nDialogType)
{
case FILEOPEN_SIMPLE:
case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
+ case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR:
case FILEOPEN_PLAY:
case FILEOPEN_LINK_PLAY:
case FILEOPEN_READONLY_VERSION:
@@ -982,10 +988,11 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE;
mbHasPreview = true;
+ break;
- // aPreviewTimer
- maPreviewIdle.SetPriority( TaskPriority::LOWEST );
- maPreviewIdle.SetInvokeHandler( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
+ case FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR:
+ nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR;
+ mbHasPreview = true;
break;
case FILEOPEN_PLAY:
@@ -1004,9 +1011,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
case FILEOPEN_LINK_PREVIEW:
nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW;
mbHasPreview = true;
- // aPreviewTimer
- maPreviewIdle.SetPriority( TaskPriority::LOWEST );
- maPreviewIdle.SetInvokeHandler( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
break;
case FILESAVE_AUTOEXTENSION:
@@ -1018,9 +1022,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
case FILEOPEN_PREVIEW:
nTemplateDescription = TemplateDescription::FILEOPEN_PREVIEW;
mbHasPreview = true;
- // aPreviewTimer
- maPreviewIdle.SetPriority( TaskPriority::LOWEST );
- maPreviewIdle.SetInvokeHandler( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
break;
default:
@@ -1028,6 +1029,12 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
break;
}
+ if (mbHasPreview)
+ {
+ maPreviewIdle.SetPriority( TaskPriority::LOWEST );
+ maPreviewIdle.SetInvokeHandler( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) );
+ }
+
Sequence < Any > aInitArguments( !mpPreferredParentWindow ? 3 : 4 );
// This is a hack. We currently know that the internal file picker implementation