diff options
author | Thorsten Behrens <thb@openoffice.org> | 2010-08-25 22:53:55 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-08-25 22:59:10 +0200 |
commit | dd5adf0cd9e1a39795c062f90e87cc60c7e51d34 (patch) | |
tree | 133c39250ce3d76a00af18ea5760252521afc222 | |
parent | 09a64b22bd7356de0267067faea71af6e404aced (diff) |
linkwarn-dlg-in-apps.diff: Wire up link warning dlg in applications.
n#348149
-rwxr-xr-x | sd/source/ui/func/fuinsert.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 2db29c725718..6de64c70cbf2 100755 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -48,9 +48,11 @@ #include <sfx2/request.hxx> #include <svl/globalnameitem.hxx> #include <unotools/pathoptions.hxx> +#include <svtools/miscopt.hxx> #include <svx/pfiledlg.hxx> #include <svx/dialogs.hrc> #include <sfx2/linkmgr.hxx> +#include <svx/linkwarn.hxx> #include <svx/svdetc.hxx> #include <avmedia/mediawindow.hxx> #ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX @@ -156,7 +158,15 @@ void FuInsertGraphic::DoExecute( SfxRequest& ) if(pGrafObj && aDlg.IsAsLink()) { - // store link only? + // really store as link only? + if( SvtMiscOptions().ShowLinkWarningDialog() ) + { + SvxLinkWarningDialog aWarnDlg(mpWindow,aDlg.GetPath()); + if( aWarnDlg.Execute() != RET_OK ) + return; // don't store as link + } + + // store as link String aFltName(aDlg.GetCurrentFilter()); String aPath(aDlg.GetPath()); pGrafObj->SetGraphicLink(aPath, aFltName); |