[API CHANGE] Adapt css.uri UNOIDL entities to RFC 3986

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 23 August 2019 12:47 EDT

...which obsoleted RFC 2396. Notable changes are that the distinction between hierarchical and opaque URIs has been dropped, and that the relative URI resolution specification has been made more rigid.

As a consequence, various features of css.uri entities have changed:

- XUriReference.isHierarchical is obsolete and deprecated.

- The behavior of XUriReference.hasAuthority, XUriReference.getAuthority, XUriReference.getPath, XUriReference.hasRelativePath, XUriReference.getPathSegmentCount, XUriReference.getPathSegment, XUriReference.hasQuery, and XUriReference.getQuery has been made consistent for all URIs, no matter whether they were considered hierarchical or opaque in the past.

- The behavior of XUriReferenceFactory.makeAbsolute and XUriReferenceFactory.makeRelative has been changed to match the RFC 3986 reference resolution specification. The XUriReferenceFactory.makeAbsolulte parameter processSpecialBaseSegments has been renamed to processAdditionalSpecialSegments, as per the updated specification it now controls treatment of special segments in the given uriReference, in addition to special segments in the given baseUriReference. (Renaming UNOIDL interface method parameters is technically an incompatible change, but the benefits of improved clarity presumably outweigh any potential drawbacks in this case.)

The implementation in stoc has been adapted, and various call sites have been adapted to the deprecated XUriReference.isHierarchical semantics.

Change-Id: Ic6e00fdbce5abef70d75ec2f753d22fefe361457 Reviewed-on: https://gerrit.libreoffice.org/77861

5bbf9ca7ccb6 [API CHANGE] Adapt css.uri UNOIDL entities to RFC 3986
.../source/core/dataaccess/databasecontext.cxx | 2 +-
dbaccess/source/filter/xml/xmlfilter.cxx | 2 +-
stoc/source/uriproc/UriReference.cxx | 14 +-
stoc/source/uriproc/UriReference.hxx | 3 +-
stoc/source/uriproc/UriReferenceFactory.cxx | 375 ++++++++++------
.../UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx | 2 +-
.../UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx | 2 +-
stoc/test/uriproc/test_uriproc.cxx | 478 +++++++++++++++++++--
svl/source/misc/urihelper.cxx | 2 +-
udkapi/com/sun/star/uri/UriReferenceFactory.idl | 2 +-
udkapi/com/sun/star/uri/XUriReference.idl | 44 +-
udkapi/com/sun/star/uri/XUriReferenceFactory.idl | 31 +-
udkapi/com/sun/star/uri/XUriSchemeParser.idl | 2 +-
udkapi/com/sun/star/uri/XVndSunStarExpandUrl.idl | 3 +-
udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl | 3 +-
udkapi/type_reference/udkapi.idl | 2 +-
16 files changed, 735 insertions(+), 232 deletions(-)

Upstream: cgit.freedesktop.org


  • Share