I use this code in a macro. sub GetFileName_001() Dim strDirectoryName as String If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then GlobalScope.BasicLibraries.LoadLibrary("Tools") End If Msgbox (" Host file is " & ThisComponent.getURL()) strDirectoryName = DirectoryNameoutofPath(ThisComponent.getURL(), "/") & "/" MsgBox( "Host directory is " & strDirectoryName) end sub It fails at the step strDirectoryName = DirectoryNameoutofPath(ThisComponent.getURL(), "/") & "/" with a message box with the text "BASIC runtime error. Incorrect property value." This is a recent problem. Possibly within the last two weeks. Alex
Created attachment 129324 [details] bisect log 379b7ffb68bed5bc376a91032a781be147a6eff1 is the first bad commit commit 379b7ffb68bed5bc376a91032a781be147a6eff1 Author: Pierre Lepage <pierrelepage3@gmail.com> Date: Sat Nov 5 14:52:44 2016 -0400 tdf#80731 Closing parenthesis is now detected (Mid statement and functions). Change-Id: I5efdb6c3ce71148672a8b76d3f1cc87b0fe04994 Reviewed-on: https://gerrit.libreoffice.org/30593 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> :040000 040000 c405fe4479462adde5eeb0537af3f8758a77c998 56df2a2e79580ea3d676505bd3d31b64bb2725b4 M basic
Problem is most likely to be a side effect of this commit. Navigating to the Tools library Tools -> Macros -> Organise Macros -> LibreOffice Basic -> LibreOffice Macros -> Tools -> Strings I get an error message about a missing bracket. If I then inspect the code in LO 5.1.5 via the Tools macro GetFileNameWithoutExtension that immediately precedes the failing DirectoryNameoutofPath I see a missing bracket in the last line of that macro GetFileNameWithoutExtension The line GetFileNameWithoutExtension = RTrimStr(FileName, "." & SepList(MaxIndex) should be GetFileNameWithoutExtension = RTrimStr(FileName, "." & SepList(MaxIndex)) This missing bracket has probably been missing for some considerable period of time without any nasty side effects. However, with the introduction of this change has now become an issue.
Created attachment 129330 [details] Proposed patch for wizards/source/tools/Strings.xba All it does is add the missing bracket. Suppose I'll have to go down the gerrit route. Better get registering.
Hello Alex, Thanks for reporting, bisecting and fixing this bug, that's fantastic. Please submit the patch to gerrit as this is the stadard procedure we follow in the project. Setting it to NEW
Alex McMurchy1917 committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=08befaceb65bf2f0f0e8ec976f7826be8f5dd7d7 Fixes tdf#104412 - DirectoryNameoutofPath no longer works It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Alex McMurchy1917 committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b1f739b2bc227f81b1ec740e05927e866fa81d94&h=libreoffice-5-3 Fixes tdf#104412 - DirectoryNameoutofPath no longer works It will be available in 5.3.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Alex McMurchy1917 committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf7f3c0baabf0a8e74687ca192ff59c8f3d06207&h=libreoffice-5-2 Fixes tdf#104412 - DirectoryNameoutofPath no longer works It will be available in 5.2.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.