Oliver Braun wrote:
Hi *,
I propose a new interface for opening URLs in external applications (see
below).
Motivation:
currently the interface XSystemShellExecute is used for this purpose.
However, as this interface is specified, it has a serious issue for
being used from OOo directly:
the caller needs to know if and how to escape the parameter/URL
depending on the OS/desktop OOo is running on.
As a result, the implementation of XSystemShellExecute on Unix currently
violates its specification by escaping the URL itself.
Proposed new API:
module com { module sun { module star { module system {
/* Interface for opening documents referenced by a URL in an
external application.
*/
interface XURLHandler : com::sun::star::uno::XInterface
{
/* Passes the given URL to the desktop environment to be opened
in the users favorite application.
@param aURL to be opened externally
*/
void open( [in] string aURL );
}
}; }; }; };
Nit: XURLHandler vs. XUrlHandler vs. XUriReferenceHandler vs. ...? (And
similarly for aURL. Btw, shocked to discover that
<http://api.openoffice.org/docs/DevelopersGuide/Appendix/IDLDesignGuide/IDLDesignGuide.xhtml#1_2_11_1_Naming>
still recommends messed-up Hungarian, see
<http://www.joelonsoftware.com/articles/Wrong.html>.)
Open Issues:
Is it o.k. to throw a RuntimeException in the case the desktop
environment does not know how to handle the specified URL, or should we
introduce a new exception for this ?
Since this is an anticipated situation, it calls for a
non-RuntimeException. (Even borders on the exception--not an exception
at all line.)
-Stephan
Feedback appreciated !
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]