linkwarn-dlg-in-apps.diff: Wire up link warning dlg in applications.

n#348149
This commit is contained in:
Thorsten Behrens
2010-08-25 22:53:55 +02:00
committed by Jan Holesovsky
parent 09a64b22bd
commit dd5adf0cd9

View File

@@ -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);