1 --- sw/source/ui/uiview/view2.cxx 2008-04-10 23:49:38.000000000 +0200
2 +++ sw/source/ui/uiview/view2.cxx 2008-05-07 18:39:44.000000000 +0200
5 #include <svtools/PasswordHelper.hxx>
6 #include <svtools/urihelper.hxx>
7 +#include <svtools/miscopt.hxx>
8 #include <sfx2/passwd.hxx>
9 #include <sfx2/sfxdlg.hxx>
10 #include <sfx2/filedlghelper.hxx>
12 #include <svx/langitem.hxx>
13 #include <svx/viewlayoutitem.hxx>
14 #include <svx/zoomslideritem.hxx>
15 +#include <svx/linkwarn.hxx>
16 #include <svx/htmlmode.hxx>
17 #ifndef _APP_HXX //autogen
18 #include <vcl/svapp.hxx>
20 rReq.AppendItem( SfxStringItem( FN_PARAM_2, sGraphicFormat ) );
21 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
24 + // really store as link only?
25 + if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
27 + SvxLinkWarningDialog aWarnDlg(GetWindow(),pFileDlg->GetPath());
28 + if( aWarnDlg.Execute() != RET_OK )
29 + bAsLink=sal_False; // don't store as link
33 SwWrtShell& rSh = GetWrtShell();
34 --- sc/source/ui/drawfunc/fuins1.cxx 2008-04-11 00:23:00.000000000 +0200
35 +++ sc/source/ui/drawfunc/fuins1.cxx 2008-05-07 18:40:07.000000000 +0200
37 #include <svx/svdpage.hxx>
38 #include <svx/svdpagv.hxx>
39 #include <svx/svdview.hxx>
40 +#include <svx/linkwarn.hxx>
41 #include <svtools/filter.hxx>
42 #include <svtools/stritem.hxx>
43 +#include <svtools/miscopt.hxx>
44 #include <vcl/msgbox.hxx>
45 #include <tools/urlobj.hxx>
46 #include <avmedia/mediawindow.hxx>
48 String aFilterName = aDlg.GetCurrentFilter();
49 BOOL bAsLink = aDlg.IsAsLink();
51 + // really store as link only?
52 + if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
54 + SvxLinkWarningDialog aWarnDlg(pWin,aFileName);
55 + if( aWarnDlg.Execute() != RET_OK )
56 + bAsLink = sal_False; // don't store as link
59 lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, FALSE, pViewSh, pWindow, pView );
61 // append items for recording
62 --- sd/source/ui/func/fuinsert.cxx 2008-04-10 22:20:15.000000000 +0200
63 +++ sd/source/ui/func/fuinsert.cxx 2008-05-07 18:13:46.000000000 +0200
65 #include <sfx2/request.hxx>
66 #include <svtools/globalnameitem.hxx>
67 #include <svtools/pathoptions.hxx>
68 +#include <svtools/miscopt.hxx>
69 #include <svx/pfiledlg.hxx>
70 #include <svx/impgrf.hxx>
71 #include <svx/dialogs.hrc>
72 +#include <svx/linkwarn.hxx>
73 #include <svx/linkmgr.hxx>
74 #include <svx/svdetc.hxx>
75 #include <avmedia/mediawindow.hxx>
78 if(pGrafObj && aDlg.IsAsLink())
81 + // really store as link only?
82 + if( SvtMiscOptions().ShowLinkWarningDialog() )
84 + SvxLinkWarningDialog aWarnDlg(mpWindow,aDlg.GetPath());
85 + if( aWarnDlg.Execute() != RET_OK )
86 + return; // don't store as link
90 String aFltName(aDlg.GetCurrentFilter());
91 String aPath(aDlg.GetPath());
92 pGrafObj->SetGraphicLink(aPath, aFltName);