look at 'embedded' protocols for protocols that support them

Change-Id: Ie99f5f5a390639bdc69397c831e0a32594a5030c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177981
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-12-06 14:41:19 +00:00
parent ae7900dd42
commit 59891cd398

View file

@ -4889,12 +4889,21 @@ OUString INetURLObject::CutExtension()
bool INetURLObject::IsExoticProtocol() const
{
return m_eScheme == INetProtocol::Slot ||
if (m_eScheme == INetProtocol::Slot ||
m_eScheme == INetProtocol::Macro ||
m_eScheme == INetProtocol::Uno ||
m_eScheme == INetProtocol::VndSunStarExpand ||
isSchemeEqualTo(u"vnd.sun.star.script") ||
isSchemeEqualTo(u"service");
isSchemeEqualTo(u"service"))
{
return true;
}
if (isSchemeEqualTo(u"vnd.sun.star.pkg") || isSchemeEqualTo(u"vnd.sun.star.zip"))
{
OUString sPayloadURL = GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
return sPayloadURL.startsWith(u"//") && INetURLObject(sPayloadURL.subView(2)).IsExoticProtocol();
}
return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */