diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-08-07 16:16:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-08 08:44:23 +0200 |
commit | 303551ba27e069c26e930fa932637395ab57e6e2 (patch) | |
tree | a4b7cdffa7bf5501d977222ce6384bef2349c6a6 /unotools | |
parent | fb3a0b084701ee1089a76568b3b110ac5b0df460 (diff) |
Mark some SystemShellExecute::execute calls as URIS_ONLY
...as they are obviously meant to display remote HTML content in a browser.
Code can be triggered with a Basic snippet like
doc = CreateUnoService("com.sun.star.comp.unotools.misc.ServiceDocumenter")
doc.showInterfaceDocs(doc)
Change-Id: I4c3192bd5f6cf9bf772f57e80d99eaab78e7e9ed
Reviewed-on: https://gerrit.libreoffice.org/77114
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/misc/ServiceDocumenter.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/unotools/source/misc/ServiceDocumenter.cxx b/unotools/source/misc/ServiceDocumenter.cxx index a9ede33b4ffe..b29848e5b25e 100644 --- a/unotools/source/misc/ServiceDocumenter.cxx +++ b/unotools/source/misc/ServiceDocumenter.cxx @@ -9,6 +9,7 @@ #include "ServiceDocumenter.hxx" #include <unotoolsservices.hxx> #include <comphelper/servicedecl.hxx> +#include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <com/sun/star/system/XSystemShellExecute.hpp> using namespace com::sun::star; using uno::Reference; @@ -21,7 +22,9 @@ void unotools::misc::ServiceDocumenter::showCoreDocs(const Reference<XServiceInf return; auto xMSF(m_xContext->getServiceManager()); Reference<system::XSystemShellExecute> xShell(xMSF->createInstanceWithContext("com.sun.star.system.SystemShellExecute", m_xContext), uno::UNO_QUERY); - xShell->execute(m_sCoreBaseUrl + xService->getImplementationName() + ".html", "", 0); + xShell->execute( + m_sCoreBaseUrl + xService->getImplementationName() + ".html", "", + css::system::SystemShellExecuteFlags::URIS_ONLY); } void unotools::misc::ServiceDocumenter::showInterfaceDocs(const Reference<XTypeProvider>& xTypeProvider) @@ -36,7 +39,9 @@ void unotools::misc::ServiceDocumenter::showInterfaceDocs(const Reference<XTypeP sal_Int32 nIdx = 0; while(nIdx != -1) sUrl = sUrl.replaceFirst(".", "_1_1", &nIdx); - xShell->execute(m_sServiceBaseUrl + "/interface" + sUrl + ".html", "", 0); + xShell->execute( + m_sServiceBaseUrl + "/interface" + sUrl + ".html", "", + css::system::SystemShellExecuteFlags::URIS_ONLY); } } @@ -52,7 +57,9 @@ void unotools::misc::ServiceDocumenter::showServiceDocs(const Reference<XService sal_Int32 nIdx = 0; while(nIdx != -1) sUrl = sUrl.replaceFirst(".", "_1_1", &nIdx); - xShell->execute(m_sServiceBaseUrl + "/service" + sUrl + ".html", "", 0); + xShell->execute( + m_sServiceBaseUrl + "/service" + sUrl + ".html", "", + css::system::SystemShellExecuteFlags::URIS_ONLY); } } |