[Libreoffice-commits] core.git: 3 commits - stoc/source stoc/test sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 23 12:48:58 UTC 2019


 stoc/source/uriproc/UriReference.cxx                              |    8 
 stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx |    6 
 stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx          |    9 
 stoc/test/uriproc/test_uriproc.cxx                                |  656 +++++-----
 sw/source/ui/dbui/mmaddressblockpage.cxx                          |   18 
 sw/source/ui/dbui/mmaddressblockpage.hxx                          |   10 
 sw/source/ui/dbui/mmgreetingspage.cxx                             |    4 
 sw/source/ui/dbui/mmgreetingspage.hxx                             |    2 
 sw/source/ui/dbui/mmresultdialogs.cxx                             |    2 
 sw/source/uibase/dbui/mailmergehelper.cxx                         |   38 
 sw/source/uibase/inc/mailmergehelper.hxx                          |    6 
 11 files changed, 393 insertions(+), 366 deletions(-)

New commits:
commit 1d524bc7a331e8381e88cfd1b6dea4678ad32514
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 22 17:30:54 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 23 14:48:03 2019 +0200

    rename AddressPreview back to SwAddressPreview
    
    Change-Id: I2afd5580fd94621163a5217d08d5b60190673fd2
    Reviewed-on: https://gerrit.libreoffice.org/77973
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index f4b7359be648..b95d4344a402 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -74,8 +74,8 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(SwMailMergeWizard* pWiz
     , m_xPrevSetIB(m_xBuilder->weld_button("prev"))
     , m_xNextSetIB(m_xBuilder->weld_button("next"))
     , m_xDifferentlist(m_xBuilder->weld_label("differentlist"))
-    , m_xSettings(new AddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin")))
-    , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin")))
+    , m_xSettings(new SwAddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin")))
     , m_xSettingsWIN(new weld::CustomWeld(*m_xBuilder, "settingspreview", *m_xSettings))
     , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addresspreview", *m_xPreview))
 {
@@ -246,7 +246,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl, LinkPar
     const sal_uInt16 nSel = m_xSettings->GetSelectedAddress();
     const uno::Sequence< OUString> aBlocks =
                 m_pWizard->GetConfigItem().GetAddressBlocks();
-    m_xPreview->SetAddress(AddressPreview::FillData(aBlocks[nSel],
+    m_xPreview->SetAddress(SwAddressPreview::FillData(aBlocks[nSel],
                                                          m_pWizard->GetConfigItem()));
     m_pWizard->GetConfigItem().SetCurrentAddressBlockIndex( nSel );
     GetWizard()->UpdateRoadmap();
@@ -291,7 +291,7 @@ void SwMailMergeAddressBlockPage::InsertDataHdl(weld::Button* pButton)
             const sal_uInt16 nSel = m_xSettings->GetSelectedAddress();
             const uno::Sequence< OUString> aBlocks =
                         m_pWizard->GetConfigItem().GetAddressBlocks();
-            m_xPreview->SetAddress(AddressPreview::FillData(aBlocks[nSel], rConfig));
+            m_xPreview->SetAddress(SwAddressPreview::FillData(aBlocks[nSel], rConfig));
         }
     }
     m_xPrevSetIB->set_sensitive(bEnable);
@@ -316,7 +316,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, weld::Button&, rButto
 SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(weld::Window* pParent, SwMailMergeConfigItem& rConfig)
     : SfxDialogController(pParent, "modules/swriter/ui/selectblockdialog.ui", "SelectBlockDialog")
     , m_rConfig(rConfig)
-    , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
     , m_xNewPB(m_xBuilder->weld_button("new"))
     , m_xCustomizePB(m_xBuilder->weld_button("edit"))
     , m_xDeletePB(m_xBuilder->weld_button("delete"))
@@ -472,7 +472,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
     , m_xFieldFT(m_xBuilder->weld_label("customft"))
     , m_xFieldCB(m_xBuilder->weld_combo_box("custom"))
     , m_xOK(m_xBuilder->weld_button("ok"))
-    , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
     , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addrpreview", *m_xPreview))
     , m_xDragED(new AddressMultiLineEdit(this))
     , m_xDragWIN(new weld::CustomWeld(*m_xBuilder, "addressdest", *m_xDragED))
@@ -569,7 +569,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, weld::TreeView&,
 
 IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl, AddressMultiLineEdit&, void)
 {
-    m_xPreview->SetAddress(AddressPreview::FillData(GetAddress(), m_rConfigItem));
+    m_xPreview->SetAddress(SwAddressPreview::FillData(GetAddress(), m_rConfigItem));
     UpdateImageButtons_Impl();
 }
 
@@ -968,7 +968,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
     , m_sNone(SwResId(SW_STR_NONE))
     , m_rPreviewString(rPreview)
     , m_rConfigItem(rConfigItem)
-    , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
     , m_xMatchingFI(m_xBuilder->weld_label("MATCHING_LABEL"))
     , m_xAddressTitle(m_xBuilder->weld_label("addresselem"))
     , m_xMatchTitle(m_xBuilder->weld_label("matchelem"))
@@ -1026,7 +1026,7 @@ IMPL_LINK_NOARG(SwAssignFieldsDialog, OkHdl_Impl, weld::Button&, void)
 IMPL_LINK_NOARG(SwAssignFieldsDialog, AssignmentModifyHdl_Impl, LinkParamNone*, void)
 {
     uno::Sequence< OUString > aAssignments = CreateAssignments();
-    const OUString sPreview = AddressPreview::FillData(
+    const OUString sPreview = SwAddressPreview::FillData(
             m_rPreviewString, m_rConfigItem, &aAssignments);
     m_xPreview->SetAddress(sPreview);
 }
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 8d719ae1aa71..4d50cfaa4961 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -60,8 +60,8 @@ class SwMailMergeAddressBlockPage : public vcl::OWizardPage
 
     std::unique_ptr<weld::Label> m_xDifferentlist;
 
-    std::unique_ptr<AddressPreview> m_xSettings;
-    std::unique_ptr<AddressPreview> m_xPreview;
+    std::unique_ptr<SwAddressPreview> m_xSettings;
+    std::unique_ptr<SwAddressPreview> m_xPreview;
     std::unique_ptr<weld::CustomWeld> m_xSettingsWIN;
     std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
 
@@ -93,7 +93,7 @@ class SwSelectAddressBlockDialog : public SfxDialogController
     css::uno::Sequence< OUString>    m_aAddressBlocks;
     SwMailMergeConfigItem& m_rConfig;
 
-    std::unique_ptr<AddressPreview> m_xPreview;
+    std::unique_ptr<SwAddressPreview> m_xPreview;
     std::unique_ptr<weld::Button> m_xNewPB;
     std::unique_ptr<weld::Button> m_xCustomizePB;
     std::unique_ptr<weld::Button> m_xDeletePB;
@@ -214,7 +214,7 @@ private:
     std::unique_ptr<weld::Label> m_xFieldFT;
     std::unique_ptr<weld::ComboBox> m_xFieldCB;
     std::unique_ptr<weld::Button> m_xOK;
-    std::unique_ptr<AddressPreview> m_xPreview;
+    std::unique_ptr<SwAddressPreview> m_xPreview;
     std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
     std::unique_ptr<AddressMultiLineEdit> m_xDragED;
     std::unique_ptr<weld::CustomWeld> m_xDragWIN;
@@ -254,7 +254,7 @@ class SwAssignFieldsDialog : public SfxDialogController
 
     SwMailMergeConfigItem&  m_rConfigItem;
 
-    std::unique_ptr<AddressPreview> m_xPreview;
+    std::unique_ptr<SwAddressPreview> m_xPreview;
     std::unique_ptr<weld::Label> m_xMatchingFI;
     std::unique_ptr<weld::Label> m_xAddressTitle;
     std::unique_ptr<weld::Label> m_xMatchTitle;
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 92ae1631111f..fe4b57ca5be5 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -173,7 +173,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
     OUString sPreview = bFemale ? m_xFemaleLB->get_active_text() :
         bNoValue ? m_xNeutralCB->get_active_text() : m_xMaleLB->get_active_text();
 
-    sPreview = AddressPreview::FillData(sPreview, m_rConfigItem);
+    sPreview = SwAddressPreview::FillData(sPreview, m_rConfigItem);
     m_xPreview->SetAddress(sPreview);
 }
 
@@ -199,7 +199,7 @@ void SwGreetingsHandler::Contains(bool bContainsGreeting)
 SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* pWizard, TabPageParent pParent)
     : vcl::OWizardPage(pParent, "modules/swriter/ui/mmsalutationpage.ui", "MMSalutationPage")
     , SwGreetingsHandler(pWizard->GetConfigItem(), *m_xBuilder)
-    , m_xPreview(new AddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
     , m_xPreviewFI(m_xBuilder->weld_label("previewft"))
     , m_xAssignPB(m_xBuilder->weld_button("assign"))
     , m_xDocumentIndexFI(m_xBuilder->weld_label("documentindex"))
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index b836d931d14e..b3e241a9fa82 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -85,7 +85,7 @@ protected:
 class SwMailMergeGreetingsPage : public vcl::OWizardPage
                                , public SwGreetingsHandler
 {
-    std::unique_ptr<AddressPreview> m_xPreview;
+    std::unique_ptr<SwAddressPreview> m_xPreview;
     std::unique_ptr<weld::Label> m_xPreviewFI;
     std::unique_ptr<weld::Button> m_xAssignPB;
     std::unique_ptr<weld::Label> m_xDocumentIndexFI;
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 912cb9a3f8cd..f107758feda0 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -1134,7 +1134,7 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, SendDocumentsHdl_Impl, weld::Button&, voi
                         SwMailMergeConfigItem::FEMALE :
                         SwMailMergeConfigItem::MALE;
 
-                    sGreeting = AddressPreview::FillData(
+                    sGreeting = SwAddressPreview::FillData(
                         xConfigItem->GetGreetings(eGenderType)
                         [xConfigItem->GetCurrentGreeting(eGenderType)],
                             *xConfigItem);
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 4d1aa49f3445..b63ac11632e1 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -180,7 +180,7 @@ struct  SwAddressPreview_Impl
     }
 };
 
-OUString AddressPreview::FillData(
+OUString SwAddressPreview::FillData(
         const OUString& rAddress,
         SwMailMergeConfigItem const & rConfigItem,
         const Sequence< OUString>* pAssignments)
@@ -275,30 +275,30 @@ OUString AddressPreview::FillData(
     return sAddress.makeStringAndClear();
 }
 
-AddressPreview::AddressPreview(std::unique_ptr<weld::ScrolledWindow> xWindow)
+SwAddressPreview::SwAddressPreview(std::unique_ptr<weld::ScrolledWindow> xWindow)
     : pImpl(new SwAddressPreview_Impl())
     , m_xVScrollBar(std::move(xWindow))
 {
     m_xVScrollBar->set_user_managed_scrolling();
-    m_xVScrollBar->connect_vadjustment_changed(LINK(this, AddressPreview, ScrollHdl));
+    m_xVScrollBar->connect_vadjustment_changed(LINK(this, SwAddressPreview, ScrollHdl));
 }
 
-AddressPreview::~AddressPreview()
+SwAddressPreview::~SwAddressPreview()
 {
 }
 
-IMPL_LINK_NOARG(AddressPreview, ScrollHdl, weld::ScrolledWindow&, void)
+IMPL_LINK_NOARG(SwAddressPreview, ScrollHdl, weld::ScrolledWindow&, void)
 {
     Invalidate();
 }
 
-void AddressPreview::AddAddress(const OUString& rAddress)
+void SwAddressPreview::AddAddress(const OUString& rAddress)
 {
     pImpl->aAddresses.push_back(rAddress);
     UpdateScrollBar();
 }
 
-void AddressPreview::SetAddress(const OUString& rAddress)
+void SwAddressPreview::SetAddress(const OUString& rAddress)
 {
     pImpl->aAddresses.clear();
     pImpl->aAddresses.push_back(rAddress);
@@ -306,13 +306,13 @@ void AddressPreview::SetAddress(const OUString& rAddress)
     Invalidate();
 }
 
-sal_uInt16 AddressPreview::GetSelectedAddress()const
+sal_uInt16 SwAddressPreview::GetSelectedAddress()const
 {
     OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAddresses.size(), "selection invalid");
     return pImpl->nSelectedAddress;
 }
 
-void AddressPreview::SelectAddress(sal_uInt16 nSelect)
+void SwAddressPreview::SelectAddress(sal_uInt16 nSelect)
 {
     OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAddresses.size(), "selection invalid");
     pImpl->nSelectedAddress = nSelect;
@@ -323,20 +323,20 @@ void AddressPreview::SelectAddress(sal_uInt16 nSelect)
         m_xVScrollBar->vadjustment_set_value(nSelectRow);
 }
 
-void AddressPreview::Clear()
+void SwAddressPreview::Clear()
 {
     pImpl->aAddresses.clear();
     pImpl->nSelectedAddress = 0;
     UpdateScrollBar();
 }
 
-void AddressPreview::ReplaceSelectedAddress(const OUString& rNew)
+void SwAddressPreview::ReplaceSelectedAddress(const OUString& rNew)
 {
     pImpl->aAddresses[pImpl->nSelectedAddress] = rNew;
     Invalidate();
 }
 
-void AddressPreview::RemoveSelectedAddress()
+void SwAddressPreview::RemoveSelectedAddress()
 {
     pImpl->aAddresses.erase(pImpl->aAddresses.begin() + pImpl->nSelectedAddress);
     if(pImpl->nSelectedAddress)
@@ -345,19 +345,19 @@ void AddressPreview::RemoveSelectedAddress()
     Invalidate();
 }
 
-void AddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns)
+void SwAddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns)
 {
     pImpl->nRows = nRows;
     pImpl->nColumns = nColumns;
     UpdateScrollBar();
 }
 
-void AddressPreview::EnableScrollBar()
+void SwAddressPreview::EnableScrollBar()
 {
     pImpl->bEnableScrollBar = true;
 }
 
-void AddressPreview::UpdateScrollBar()
+void SwAddressPreview::UpdateScrollBar()
 {
     if (pImpl->nColumns)
     {
@@ -371,7 +371,7 @@ void AddressPreview::UpdateScrollBar()
     }
 }
 
-void AddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
+void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
 {
     const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
     rRenderContext.SetFillColor(rSettings.GetWindowColor());
@@ -420,7 +420,7 @@ void AddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
     rRenderContext.SetClipRegion();
 }
 
-bool AddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
+bool SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
 {
     if (rMEvt.IsLeft() && pImpl->nRows && pImpl->nColumns)
     {
@@ -447,7 +447,7 @@ bool AddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
     return true;
 }
 
-bool AddressPreview::KeyInput( const KeyEvent& rKEvt )
+bool SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
 {
     sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
     bool bHandled = false;
@@ -491,7 +491,7 @@ bool AddressPreview::KeyInput( const KeyEvent& rKEvt )
     return bHandled;
 }
 
-void AddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress,
+void SwAddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress,
                                      const Point& rTopLeft, const Size& rSize, bool bIsSelected)
 {
     rRenderContext.SetClipRegion(vcl::Region(tools::Rectangle(rTopLeft, rSize)));
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index 67948190dfc8..72b1c98a25d9 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -57,7 +57,7 @@ struct SwAddressPreview_Impl;
 
 // Preview window used to show the possible selection of address blocks
 // and also the resulting address filled with database data
-class SW_DLLPUBLIC AddressPreview : public weld::CustomWidgetController
+class SW_DLLPUBLIC SwAddressPreview : public weld::CustomWidgetController
 {
     std::unique_ptr<SwAddressPreview_Impl> pImpl;
     std::unique_ptr<weld::ScrolledWindow> m_xVScrollBar;
@@ -74,8 +74,8 @@ class SW_DLLPUBLIC AddressPreview : public weld::CustomWidgetController
     DECL_LINK(ScrollHdl, weld::ScrolledWindow&,void);
 
 public:
-    AddressPreview(std::unique_ptr<weld::ScrolledWindow> xParent);
-    virtual ~AddressPreview() override;
+    SwAddressPreview(std::unique_ptr<weld::ScrolledWindow> xParent);
+    virtual ~SwAddressPreview() override;
 
     /** The address string is a list of address elements separated by spaces
     and breaks. The addresses fit into the given layout. If more addresses then
commit 5264c7dcef25492e94d2d2e9a3025a7ec7571699
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Aug 22 09:34:57 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Aug 23 14:47:43 2019 +0200

    Clean up OSL_ASSERT in stoc/source/uriproc/
    
    Change-Id: Ia474439d4e35009ec0941b122653a649692aead7
    Reviewed-on: https://gerrit.libreoffice.org/77943
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx
index 468d6653d2c5..dd4d68d3144e 100644
--- a/stoc/source/uriproc/UriReference.cxx
+++ b/stoc/source/uriproc/UriReference.cxx
@@ -17,10 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <cassert>
 
 #include "UriReference.hxx"
 
-#include <osl/diagnose.h>
 #include <osl/mutex.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/ustring.hxx>
@@ -40,8 +42,8 @@ UriReference::UriReference(
     m_hasQuery(bHasQuery),
     m_hasFragment(false)
 {
-    OSL_ASSERT(authority.isEmpty() || bHasAuthority);
-    OSL_ASSERT(query.isEmpty() || bHasQuery);
+    assert(authority.isEmpty() || bHasAuthority);
+    assert(query.isEmpty() || bHasQuery);
 }
 
 UriReference::~UriReference() {}
diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx
index cebe754cbaaa..1b73543bc5fb 100644
--- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx
+++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uri/XUriSchemeParser.hpp>
 #include <com/sun/star/uri/XVndSunStarExpandUrlReference.hpp>
@@ -28,7 +29,6 @@
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/weak.hxx>
-#include <osl/diagnose.h>
 #include <rtl/textenc.h>
 #include <rtl/uri.h>
 #include <rtl/uri.hxx>
@@ -126,7 +126,9 @@ private:
 OUString UrlReference::expand(
     css::uno::Reference< css::util::XMacroExpander > const & expander)
 {
-    OSL_ASSERT(expander.is());
+    if (!expander.is()) {
+        throw css::uno::RuntimeException("null expander passed to XVndSunStarExpandUrl.expand");
+    }
     return expander->expandMacros(
         ::rtl::Uri::decode(
             getPath(), ::rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8));
diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx
index e2b37db202df..ff8aa8e84a8e 100644
--- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx
+++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx
@@ -19,6 +19,7 @@
 
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uri/UriReferenceFactory.hpp>
 #include <com/sun/star/uri/XUriReference.hpp>
@@ -31,7 +32,6 @@
 #include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/ustring.hxx>
-#include <osl/diagnose.h>
 #include <sal/types.h>
 
 namespace com::sun::star::uno { class XComponentContext; }
@@ -88,7 +88,11 @@ css::uno::Reference< css::uri::XUriReference >
 Factory::createVndSunStarPkgUrlReference(
     css::uno::Reference< css::uri::XUriReference > const & authority)
 {
-    OSL_ASSERT(authority.is());
+    if (!authority.is()) {
+        throw css::uno::RuntimeException(
+            "null authority passed to"
+            " XVndSunStarPkgUrlReferenceFactory.createVndSunStarPkgUrlReference");
+    }
     if (authority->isAbsolute() && !authority->hasFragment()) {
         OUStringBuffer buf;
         buf.append("vnd.sun.star.pkg://");
@@ -99,7 +103,6 @@ Factory::createVndSunStarPkgUrlReference(
         css::uno::Reference< css::uri::XUriReference > uriRef(
             css::uri::UriReferenceFactory::create(m_context)->parse(
                 buf.makeStringAndClear()));
-        OSL_ASSERT(uriRef.is());
         return uriRef;
     } else {
         return css::uno::Reference< css::uri::XUriReference >();
commit 6f2bada24a059a9a5f24195496d2adb50c276d33
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Aug 21 17:36:28 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Aug 23 14:47:25 2019 +0200

    Check that XUriReferenceFactory.makeAbsolute matches rtl::Uri::convertRelToAbs
    
    Change-Id: I7fefdc7ca23a2f505944288c30c820ef70da14ae
    Reviewed-on: https://gerrit.libreoffice.org/77942
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx
index f30913c2841f..918cd1af1a15 100644
--- a/stoc/test/uriproc/test_uriproc.cxx
+++ b/stoc/test/uriproc/test_uriproc.cxx
@@ -39,6 +39,7 @@
 #include <rtl/string.h>
 #include <rtl/string.hxx>
 #include <rtl/textenc.h>
+#include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
@@ -295,58 +296,58 @@ void Test::testMakeAbsolute() {
     Data data[] = {
         // The following tests are taken from RFC 3986, Section 5.4:
         { "http://a/b/c/d;p?q", "g:h", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "g:h" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "g:h" },
         { "http://a/b/c/d;p?q", "g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/g" },
         { "http://a/b/c/d;p?q", "./g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/g" },
         { "http://a/b/c/d;p?q", "g/", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/g/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/g/" },
         { "http://a/b/c/d;p?q", "/g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/g" },
         { "http://a/b/c/d;p?q", "//g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://g" },
         { "http://a/b/c/d;p?q", "?y", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/d;p?y" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/d;p?y" },
         { "http://a/b/c/d;p?q", "g?y", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g?y" },
         { "http://a/b/c/d;p?q", "#s", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/d;p?q#s" },
         { "http://a/b/c/d;p?q", "g#s", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g#s" },
         { "http://a/b/c/d;p?q", "g?y#s", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g?y#s" },
         { "http://a/b/c/d;p?q", ";x", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/;x" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/;x" },
         { "http://a/b/c/d;p?q", "g;x", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g;x" },
         { "http://a/b/c/d;p?q", "g;x?y#s", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g;x?y#s" },
         { "http://a/b/c/d;p?q", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/d;p?q" },
         { "http://a/b/c/d;p?q", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/" },
         { "http://a/b/c/d;p?q", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/" },
         { "http://a/b/c/d;p?q", "..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/" },
         { "http://a/b/c/d;p?q", "../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/" },
         { "http://a/b/c/d;p?q", "../g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/g" },
         { "http://a/b/c/d;p?q", "../..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/" },
         { "http://a/b/c/d;p?q", "../../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/" },
         { "http://a/b/c/d;p?q", "../../g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/g" },
         { "http://a/b/c/d;p?q", "../../../g", true,
           css::uri::RelativeUriExcessParentSegments_ERROR, nullptr },
         { "http://a/b/c/d;p?q", "../../../g", true,
@@ -361,7 +362,7 @@ void Test::testMakeAbsolute() {
         { "http://a/b/c/d;p?q", "../../../../g", true,
           css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/g" },
         { "http://a/b/c/d;p?q", "/./g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/g" },
         { "http://a/b/c/d;p?q", "/../g", true,
           css::uri::RelativeUriExcessParentSegments_ERROR, nullptr },
         { "http://a/b/c/d;p?q", "/../g", true,
@@ -369,615 +370,615 @@ void Test::testMakeAbsolute() {
         { "http://a/b/c/d;p?q", "/../g", true,
           css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/g" },
         { "http://a/b/c/d;p?q", "g.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/g." },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/g." },
         { "http://a/b/c/d;p?q", ".g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/.g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/.g" },
         { "http://a/b/c/d;p?q", "g..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g.." },
         { "http://a/b/c/d;p?q", "..g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/..g" },
         { "http://a/b/c/d;p?q", "./../g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/g" },
         { "http://a/b/c/d;p?q", "./g/.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/g/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/g/" },
         { "http://a/b/c/d;p?q", "g/./h", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g/h" },
         { "http://a/b/c/d;p?q", "g/../h", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/h" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/h" },
         { "http://a/b/c/d;p?q", "g;x=1/./y", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g;x=1/y" },
         { "http://a/b/c/d;p?q", "g;x=1/../y", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http://a/b/c/y" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http://a/b/c/y" },
         { "http://a/b/c/d;p?q", "g?y/./x", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g?y/./x" },
         { "http://a/b/c/d;p?q", "g?y/../x", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g?y/../x" },
         { "http://a/b/c/d;p?q", "g#s/./x", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g#s/./x" },
         { "http://a/b/c/d;p?q", "g#s/../x", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR,
+          css::uri::RelativeUriExcessParentSegments_REMOVE,
           "http://a/b/c/g#s/../x" },
         { "http://a/b/c/d;p?q", "http:g", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "http:g" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "http:g" },
 
         { "scheme:", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
 
         { "scheme://a", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a" },
         { "scheme://a", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
 
         { "scheme://a/", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
 
         { "scheme://a/b", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b" },
         { "scheme://a/b", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
         { "scheme://a/b", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/" },
 
         { "scheme://a/b/", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
         { "scheme://a/b/", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a/b/" },
 
         { "scheme:a", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a" },
         { "scheme:a", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:a", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:a", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:a", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:a", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:" },
         { "scheme:a", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:a", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
 
         { "scheme:a/", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
 
         { "scheme:a/b", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b" },
         { "scheme:a/b", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
         { "scheme:a/b", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/" },
 
         { "scheme:a/b/", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
         { "scheme:a/b/", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:a/b/" },
 
         { "scheme:/a", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a" },
         { "scheme:/a", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
         { "scheme:/a", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/" },
 
         { "scheme:/a/", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
 
         { "scheme:/a/b", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b" },
         { "scheme:/a/b", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
         { "scheme:/a/b", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/" },
 
         { "scheme:/a/b/", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", ".", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/../", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./././x/..", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./x/../.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./x/.././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "././x/.././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "././x/../././", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
         { "scheme:/a/b/", "./././x/../././.", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme:/a/b/" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme:/a/b/" },
 
         { "scheme://a#s", "", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a" },
         { "scheme://a", "?q", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a?q" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a?q" },
         { "scheme://a#s", "?q", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a?q" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a?q" },
         { "scheme://a", "#s", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a#s" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a#s" },
         { "scheme://a#s1", "#s2", true,
-          css::uri::RelativeUriExcessParentSegments_ERROR, "scheme://a#s2" },
+          css::uri::RelativeUriExcessParentSegments_REMOVE, "scheme://a#s2" },
 
-        { "schema://a", "schema://b/c/../d", true, css::uri::RelativeUriExcessParentSegments_ERROR,
+        { "schema://a", "schema://b/c/../d", true, css::uri::RelativeUriExcessParentSegments_REMOVE,
           "schema://b/d" } };
     for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) {
         css::uno::Reference< css::uri::XUriReference > baseUriRef(
@@ -1001,6 +1002,25 @@ void Test::testMakeAbsolute() {
                 OUString::createFromAscii(data[i].absolute),
                 absolute->getUriReference());
         }
+        // For those test cases that conform to RFC 3986, check that the behavior matches
+        // rtl::Uri::convertRelToAbs:
+        if (data[i].processSpecialBaseSegments
+            && data[i].excessParentSegments == css::uri::RelativeUriExcessParentSegments_REMOVE)
+        {
+            try {
+                auto const absolute2 = rtl::Uri::convertRelToAbs(
+                    OUString::createFromAscii(data[i].baseUriReference),
+                    OUString::createFromAscii(data[i].uriReference));
+                TEST_ASSERT_EQUAL(
+                    "testMakeAbsolute", i, data[i].uriReference, true, data[i].absolute != nullptr);
+                TEST_ASSERT_EQUAL(
+                    "testMakeAbsolute", i, data[i].uriReference,
+                    OUString::createFromAscii(data[i].absolute), absolute2);
+            } catch (rtl::MalformedUriException &) {
+                TEST_ASSERT_EQUAL(
+                    "testMakeAbsolute", i, data[i].uriReference, true, data[i].absolute == nullptr);
+            }
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list