From dd5adf0cd9e1a39795c062f90e87cc60c7e51d34 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 25 Aug 2010 22:53:55 +0200 Subject: [PATCH] linkwarn-dlg-in-apps.diff: Wire up link warning dlg in applications. n#348149 --- sd/source/ui/func/fuinsert.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 #include #include +#include #include #include #include +#include #include #include #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);