[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 12 17:44:58 UTC 2018
sc/source/core/tool/interpr7.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 3271e8b90f5d522fdfe1de46b77e7f67cdaa75af
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 10 14:27:35 2018 +0000
limit WEBSERVICE to http[s] protocols
and like excel...
'For protocols that aren’t supported, such as ftp:// or file://, WEBSERVICE
returns the #VALUE! error value.'
Change-Id: I0e9c6fd3426fad56a199eafac48de9b0f23914b3
Reviewed-on: https://gerrit.libreoffice.org/47775
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index b92bf8cccf22..863664cc5309 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -14,6 +14,7 @@
#include <rtl/strbuf.hxx>
#include <formula/errorcodes.hxx>
#include <svtools/miscopt.hxx>
+#include <tools/urlobj.hxx>
#include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
@@ -247,6 +248,14 @@ void ScInterpreter::ScWebservice()
return;
}
+ INetURLObject aObj(aURI, INetProtocol::File);
+ INetProtocol eProtocol = aObj.GetProtocol();
+ if (eProtocol != INetProtocol::Http && eProtocol != INetProtocol::Https)
+ {
+ PushError( FormulaError::NoValue );
+ return;
+ }
+
uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY );
if(!xFileAccess.is())
{
More information about the Libreoffice-commits
mailing list