[Libreoffice-bugs] [Bug 141512] New: com.sun.star.system.SystemShellExecute does not correctly process paths with wildcards
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Apr 6 11:23:53 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=141512
Bug ID: 141512
Summary: com.sun.star.system.SystemShellExecute does not
correctly process paths with wildcards
Product: LibreOffice
Version: 7.0.1.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: joesch04 at web.de
Description:
Since LO 7.x, paths with wildcards are no longer processed correctly by
"com.sun.star.system.SystemShellExecute".
As an example you can install mottco (http://calc-info.de/files/mottco_200.oxt)
and call the button "Hilfe/Über....--->Dokumentation anzeigen" there, which
starts the following macro:
Sub help_call()
Dim aService
Dim pdf_directory
aService =
GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider")
pdf_directory = aService.getPackageLocation("org.joesch.mottco") &
"/mottco/"
If FileExists(ConvertToUrl(pdf_directory & "mottco_help.pdf")) Then
Dim start as object
start =
createUnoService("com.sun.star.system.SystemShellExecute")
start.execute(ConvertToUrl(pdf_directory &
"mottco_help.pdf"), "", 0)
Else
MsgBox ("The help file was not found." ,16, "Help file
not available")
Exit Sub
End If
End Sub
Up to LO 6.x this worked correctly, since 7.x it gives the following error
message:
"file:///E:/LO_710/LibreOfficePortable/App/libreoffice/program/../../Data/settings/user/uno_packages/cache/uno_packages/lu7860nw7fts.tmp_/mottco_200.oxt
could not be found [...]"
In "FileExists( ..." the path is evaluated correctly here, because the
following returns "True":
aService =
GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider")
pdf_directory = aService.getPackageLocation("org.joesch.mottco") & "/mottco/"
Msgbox FileExists(ConvertToUrl(pdf_directory & "mottco_help.pdf"))
Steps to Reproduce:
1.install http://calc-info.de/files/mottco_200.oxt
2.run: Hilfe/Über....--->Dokumentation anzeigen
3.
Actual Results:
you get the error message (example):
"file:///E:/LO_710/LibreOfficePortable/App/libreoffice/program/../../../Data/settings/user/uno_packages/cache/uno_packages/lu7860nw7fts.tmp_/mottco_200.oxt
konnte nicht gefunden werden [...]"
Expected Results:
The path should be correctly detected and a PDF file should be opened
Reproducible: Always
User Profile Reset: Yes
Additional Info:
The problem is not specific to the extensions named "mottco", this extension is
only given as an example because it requires an extension to reproduce the
error, since the return of :
aService =
GetDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider")
pdf_directory = aService.getPackageLocation("org.joesch.mottco") &
"/mottco/"
as input value for:
start = createUnoService("com.sun.star.system.SystemShellExecute")
start.execute(ConvertToUrl(pdf_directory &
"mottco_help.pdf"), "", 0)
is needed, because in the returned path for .getPackageLocation, the
placeholder "/../../../" occurs.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210406/f0edef1e/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list