[Libreoffice-commits] core.git: unotools/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 8 06:45:17 UTC 2019
unotools/source/misc/ServiceDocumenter.cxx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 303551ba27e069c26e930fa932637395ab57e6e2
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Aug 7 16:16:21 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Aug 8 08:44:23 2019 +0200
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 at redhat.com>
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);
}
}
More information about the Libreoffice-commits
mailing list