summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/func/fuinsert.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 31b286c822e3..e8409c815b25 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -36,6 +36,7 @@
#include <svl/stritem.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/lokhelper.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/msg.hxx>
#include <svtools/insdlg.hxx>
@@ -60,6 +61,9 @@
#include <svx/charthelper.hxx>
#include <svx/svxids.hrc>
+#include <tools/hostfilter.hxx>
+#include <tools/urlobj.hxx>
+
#include <sdresid.hxx>
#include <View.hxx>
#include <sdmod.hxx>
@@ -129,6 +133,13 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
if ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET )
bAsLink = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ INetURLObject aURL(aFileName);
+ if (INetProtocol::File != aURL.GetProtocol() && HostFilter::isForbidden(aURL.GetHost()))
+ SfxLokHelper::sendNetworkAccessError("insert");
+ }
+
nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, &GraphicFilter::GetGraphicFilter() );
}
else
@@ -188,8 +199,9 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
}
}
}
- else
+ else if (!comphelper::LibreOfficeKit::isActive())
{
+ // TODO: enable in LOK, it contains synchronous error window without LOKNotifier
SdGRFFilter::HandleGraphicFilterError( nError, GraphicFilter::GetGraphicFilter().GetLastError() );
}
}