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

            Bug ID: 101661
           Summary: UnoService com.sun.star.util.PathSubstitution returns
                    non existing path for $work
           Product: LibreOffice
           Version: 5.2.0.4 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: framework
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: c...@nouenoff.nl

Run the basic below.
In 5.1.x both $work and $home return file:///home/<name>

In 5.2.x and master $home returns file:///home/<name> and $work returns
file:///home/<name>/Documents. This last path is non existing.

$workdirurl returns the same in 5.1 and 5.2: $(work)/Documenten
Even if the default wrong path in Options > LibreOffice > Paths is
/home/<name>/Documents (5.2.x) or /home/<name> (5.1.x)

$workdirurl returns just $(work) in master.



Sub Main

msgbox "work = " & GetFrameworkPath("work") & " "& chr(13) & "home = " &
GetFrameworkPath("home")

End Sub


'predefinedPathVariables : home, inst, prog, temp, user, work, path,
lang, langid, vlang
'instpath, progpath, userpath, insturl, progurl, userurl,
workdirurl,baseinsturl, userdataurl, brandbaseurl
' user == userprofile; home == work; workdirurl = myDocuments from
LibreOffice
Function GetFrameworkPath (sItem$) as String
        Dim oPathSubst
        oPathSubst = createUnoService("com.sun.star.util.PathSubstitution")
        GetFrameworkPath =  oPathSubst.getSubstituteVariableValue(sItem)
End Function

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to