LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
Parse UNO URLs into their components. More...
#include <unourl.hxx>
Public Member Functions | |
UnoUrl (rtl::OUString const &rUrl) | |
Construct a UNO URL from a string representation. More... | |
UnoUrl (UnoUrl const &rOther) | |
~UnoUrl () | |
UnoUrl & | operator= (UnoUrl const &rOther) |
UnoUrlDescriptor const & | getConnection () const |
Return the connection descriptor component of the URL. More... | |
UnoUrlDescriptor const & | getProtocol () const |
Return the protocol descriptor component of the URL. More... | |
rtl::OUString const & | getObjectName () const |
Return the object-name component of the URL. More... | |
Parse UNO URLs into their components.
The ABNF for UNO URLs is as follows (see RFCs 2234, 2396, also see http://udk.openoffice.org/common/man/spec/uno-url.html):
uno-url = "UNO:" connection ";" protocol ";" object-name connection = descriptor protocol = descriptor descriptor = name *("," parameter) name = 1*alphanum parameter = key "=" value key = 1*alphanum value = *vchar valchar = unreserved / escaped / "$" / "&" / "+" / "/" / ":" / "?" / "@" object-name = 1*ochar ochar = unreserved / "$" / "&" / "+" / "," / "/" / ":" / "=" / "?" / "@"
Within a descriptor, the name and the keys are case insensitive, and within the parameter list all keys must be distinct.
Parameter values are encoded using UTF-8. Note that parsing of parameter values as done by UnoUrl and UnoUrlDescriptor is not strict: Invalid UTF-16 entities in the input, as well as broken escape sequences ("%" not followed by two hex digits) are copied verbatim to the output, invalid bytes in the converted UTF-8 data are considered individual Unicode characters, and invalid UTF-16 entities in the resulting output (e.g., a high surrogate not followed by a low surrogate) are not detected.
|
explicit |
Construct a UNO URL from a string representation.
rUrl | The string representation of a UNO URL. |
rtl::MalformedUriException | Thrown when the given string representation is invalid. |
cppu::UnoUrl::UnoUrl | ( | UnoUrl const & | rOther | ) |
cppu::UnoUrl::~UnoUrl | ( | ) |
UnoUrlDescriptor const& cppu::UnoUrl::getConnection | ( | ) | const |
Return the connection descriptor component of the URL.
rtl::OUString const& cppu::UnoUrl::getObjectName | ( | ) | const |
Return the object-name component of the URL.
UnoUrlDescriptor const& cppu::UnoUrl::getProtocol | ( | ) | const |
Return the protocol descriptor component of the URL.