Ariel Constenla-Haile wrote:
Oliver Brinzing escribió:
Hi,
i noticed
PackageInformationProvider.get(xContext).getPackageLocation("MyExtension")
returns a string url, for example:
file:///c:/programs/soffice/OOo-dev%203/program/../share/uno_packages/cache/uno_packages/61.tmp_/myextension.oxt
How can one convert the url to an external one (for example replace
the %20 with a space) ?
You mean "How can one convert the url to a system pathname"?
[...]
In Linux, if I try with the following path with non ASCII chars
/home/ariel/Música/Mozart/Die Zauberflöte, the results are
path /home/ariel/Música/Mozart/Die Zauberflöte
to URL file:///home/ariel/M%C3%BAsica/Mozart/Die%20Zauberfl%C3%B6te
from URL /home/ariel/Música/Mozart/Die Zauberflöte
Of course there is a Java-API way to achieve the same (you will find it
in [old/most/all] SKD examples), but let's use OOo API ;-)
No, a direct Java API would not know about OOo's concept of internal and
external URIs (see
<http://api.openoffice.org/docs/common/ref/com/sun/star/uri/XExternalUriReferenceTranslator.html>),
and so would potentially produce different results in the above example.
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]