summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-08-20 09:38:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-08-23 14:47:01 +0200
commit5bbf9ca7ccb60c9d90f2cabbe4be4962329fda61 (patch)
tree58eab725c95f9e5c79391342f0dcf0a30fd25cdd /dbaccess
parent9a251699d728fa6207b71406cd91aafb7803f453 (diff)
[API CHANGE] Adapt css.uri UNOIDL entities to RFC 3986
...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 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 1c6cb283fe29..6e9a38da6552 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -366,7 +366,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
{
// In this case the host contains the real path, and the path is the embedded stream name.
auto const uri = css::uri::UriReferenceFactory::create(m_aContext)->parse(_sURL);
- if (uri.is() && uri->isAbsolute() && uri->isHierarchical()
+ if (uri.is() && uri->isAbsolute()
&& uri->hasAuthority() && !uri->hasQuery() && !uri->hasFragment())
{
auto const auth = uri->getAuthority();
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 93175e1d9f1a..80faab524164 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -310,7 +310,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
// In this case the authority contains the real path, and the path is the embedded stream name.
auto const uri = css::uri::UriReferenceFactory::create(GetComponentContext())
->parse(sFileName);
- if (uri.is() && uri->isAbsolute() && uri->isHierarchical()
+ if (uri.is() && uri->isAbsolute()
&& uri->hasAuthority() && !uri->hasQuery() && !uri->hasFragment())
{
auto const auth = uri->getAuthority();