https://bugs.documentfoundation.org/show_bug.cgi?id=96413

--- Comment #6 from Andreas Säger <[email protected]> ---
(In reply to Cor Nouws from comment #5)
> Thanks for filing. IMO an enhancement ?

No enhancement. One of my Basic macros truncated valid file paths when I was
assuming that function convertToURL is able to deal with valid paths like
C:/foo & bar/document.odt

Since Basic does not even provide basic string functions helping to implement
my own URL encoding, I start my code with an error message and program exit
when the following function returns True:

Function IsBadURL(sURL$) As Boolean
Dim a(), s$, nSplit&, sPN$
    nSplit = 9 'file:///
    If getGUIType = 1 then nSplit = 11 'file:///C:
    sPN = mid(sURL, nSplit)
    a() = Array("!", "$", "&", "'", "(", ")", "*", "+", ",", ":", "=", "@")
    for each s in a()
        if instr(sPN, s) > 0 then 
            IsBadURL = True
            exit function
        endif
    next
End Function

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to