summaryrefslogtreecommitdiffstats
path: root/debian/patches/warn-about-exotic-protocols-as-well.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/warn-about-exotic-protocols-as-well.diff')
-rw-r--r--debian/patches/warn-about-exotic-protocols-as-well.diff81
1 files changed, 81 insertions, 0 deletions
diff --git a/debian/patches/warn-about-exotic-protocols-as-well.diff b/debian/patches/warn-about-exotic-protocols-as-well.diff
new file mode 100644
index 000000000..d3944e1fa
--- /dev/null
+++ b/debian/patches/warn-about-exotic-protocols-as-well.diff
@@ -0,0 +1,81 @@
+From 9198322d9b4ed87e0e176fbfc712751a5f9b886f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
+Date: Sat, 4 Nov 2023 19:57:51 +0000
+Subject: warn about exotic protocols as well
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change-Id: I50dcf4f36cd20d75f5ad3876353143268740a50f
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151834
+Tested-by: Jenkins
+Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
+(cherry picked from commit 1305f70cff8a81a58a5a6d9c96c5bb032005389e)
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159034
+Reviewed-by: Eike Rathke <erack@redhat.com>
+Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159881
+Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
+---
+ sw/source/filter/html/htmlplug.cxx | 2 +-
+ sw/source/filter/xml/xmltexti.cxx | 2 +-
+ tools/source/fsys/urlobj.cxx | 3 ++-
+ xmloff/source/draw/ximpshap.cxx | 2 +-
+ 4 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
+index 1aec184d8a6c..1c1f5f49f13e 100644
+--- a/sw/source/filter/html/htmlplug.cxx
++++ b/sw/source/filter/html/htmlplug.cxx
+@@ -1121,7 +1121,7 @@ void SwHTMLParser::InsertFloatingFrame()
+
+ OUString sHRef = aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
+
+- if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
++ if (INetURLObject(sHRef).IsExoticProtocol())
+ NotifyMacroEventRead();
+
+ xSet->setPropertyValue("FrameURL", uno::Any( sHRef ) );
+diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
+index 7ec4616f76dd..4bbed6bb8ff8 100644
+--- a/sw/source/filter/xml/xmltexti.cxx
++++ b/sw/source/filter/xml/xmltexti.cxx
+@@ -826,7 +826,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
+ OUString sHRef = URIHelper::SmartRel2Abs(
+ INetURLObject( GetXMLImport().GetBaseURL() ), rHRef );
+
+- if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
++ if (INetURLObject(sHRef).IsExoticProtocol())
+ GetXMLImport().NotifyMacroEventRead();
+
+ xSet->setPropertyValue("FrameURL",
+diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
+index 2a9f7bc3d7dc..36a8af31a0fb 100644
+--- a/tools/source/fsys/urlobj.cxx
++++ b/tools/source/fsys/urlobj.cxx
+@@ -4834,7 +4834,8 @@ bool INetURLObject::IsExoticProtocol() const
+ return m_eScheme == INetProtocol::Slot ||
+ m_eScheme == INetProtocol::Macro ||
+ m_eScheme == INetProtocol::Uno ||
+- isSchemeEqualTo(u"vnd.sun.star.script");
++ isSchemeEqualTo(u"vnd.sun.star.script") ||
++ isSchemeEqualTo(u"service");
+ }
+
+ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
+index 113f3a3ffc2a..263b4b937608 100644
+--- a/xmloff/source/draw/ximpshap.cxx
++++ b/xmloff/source/draw/ximpshap.cxx
+@@ -3177,7 +3177,7 @@ void SdXMLFloatingFrameShapeContext::startFastElement (sal_Int32 /*nElement*/,
+
+ if( !maHref.isEmpty() )
+ {
+- if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
++ if (INetURLObject(maHref).IsExoticProtocol())
+ GetImport().NotifyMacroEventRead();
+
+ xProps->setPropertyValue("FrameURL", Any(maHref) );
+--
+cgit v1.2.1
+