https://bugs.documentfoundation.org/show_bug.cgi?id=149064
Bug ID: 149064
Summary: Error when running macro accessing WebDAV twice
Product: LibreOffice
Version: 7.1.0.3 release
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: implementationError
Severity: normal
Priority: medium
Component: framework
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Blocks: 117073
Created attachment 180087
--> https://bugs.documentfoundation.org/attachment.cgi?id=180087&action=edit
Error message
This bug requires a WebDAV server, eg. one can use dave [1].
- In Writer, add the macro below (between "--------") to eg. My Macros &
Dialogs / Standard / Module 1,
- Adjust 'FileNameExt' based on your WebDAV setup,
- Run the Main sub (you'll have to authenticate),
- Run the Main sub again.
=> BASIC runtime error with an exception, error code 0x20d (Error Area:Io
Class:General Code:13).
In 7.0 and earlier, there's no error.
In 7.1, there's an error, and this regressed with the following commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=f3f0d05f72d8dbd9717910b4d6b42c54be3e106f
author Noel Grandin <[email protected]> 2020-07-22 14:04:09
+0200
committer Noel Grandin <[email protected]> 2020-07-22
15:53:23 +0200
"ucb/neon: create instances with uno constructors"
However, this change was specific to neon, and the bug persists in 7.4
(d6cd44b74cf0b6b0eaeea6f986f749da42d171ac), after the switch to curl-based
WebDAV.
Attaching console logs taken with: SAL_LOG="+INFO.ucb"
Macro content:
--------
Sub Main
Dim oDocument As Object
Dim status As Boolean
Dim FileNameExt As String
oDocument = ThisComponent
FileNameExt = "webdav://127.0.0.1:8000/test.odt"
status = SaveDocumentToFile_Simple(oDocument, FileNameExt)
End Sub
Function SaveDocumentToFile_Simple (document As Object, destinationUrl As
String) As Boolean
Dim propFile(1) As New com.sun.star.beans.PropertyValue
Dim urlTest As String
propFile(0).Name = "Overwrite"
propFile(0).Value = True
document.storeAsURL(ConvertToURL(destinationUrl), propFile())
End Function
--------
Notes on using dave:
A simple setup is to rename config-sample.yaml to config.yaml in the downloaded
release archive.
The default user / pw is "user" and "foo", the default port is 8000, and by
default it uses /tmp/user as storage.
[1] https://github.com/micromata/dave
Referenced Bugs:
https://bugs.documentfoundation.org/show_bug.cgi?id=117073
[Bug 117073] [META] WebDAV bugs
--
You are receiving this mail because:
You are the assignee for the bug.