summaryrefslogtreecommitdiffstats
path: root/debian/patches/warn-about-exotic-protocols-as-well.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:52:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:52:12 +0000
commit974c21ad33bfa1d93d5ae795556d35ca7eb36e68 (patch)
tree1a0d7c0258aadfcd993c4bffa454bcf117b382cf /debian/patches/warn-about-exotic-protocols-as-well.diff
parentAdding upstream version 1:7.0.4. (diff)
downloadlibreoffice-974c21ad33bfa1d93d5ae795556d35ca7eb36e68.tar.xz
libreoffice-974c21ad33bfa1d93d5ae795556d35ca7eb36e68.zip
Adding debian version 1:7.0.4-4+deb11u8.debian/1%7.0.4-4+deb11u8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/warn-about-exotic-protocols-as-well.diff')
-rw-r--r--debian/patches/warn-about-exotic-protocols-as-well.diff79
1 files changed, 79 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..3ce5f4875
--- /dev/null
+++ b/debian/patches/warn-about-exotic-protocols-as-well.diff
@@ -0,0 +1,79 @@
+From b245f1e20e67c1e73a702425ab41df8eb58452e3 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>
+(cherry picked from commit 2e1bcbb550d54278b366ec619cc5280d44d6aba4)
+---
+ 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 eb707040adb2..112975f98511 100644
+--- a/sw/source/filter/html/htmlplug.cxx
++++ b/sw/source/filter/html/htmlplug.cxx
+@@ -1089,7 +1089,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::makeAny( sHRef ) );
+diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
+index 169cbdc1534d..caf300f239c6 100644
+--- a/sw/source/filter/xml/xmltexti.cxx
++++ b/sw/source/filter/xml/xmltexti.cxx
+@@ -856,7 +856,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 ab6e885639db..1ef2b7e0b2af 100644
+--- a/tools/source/fsys/urlobj.cxx
++++ b/tools/source/fsys/urlobj.cxx
+@@ -4776,7 +4776,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 44b5177501f1..30c303690d97 100644
+--- a/xmloff/source/draw/ximpshap.cxx
++++ b/xmloff/source/draw/ximpshap.cxx
+@@ -3269,7 +3269,7 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
+
+ if( !maHref.isEmpty() )
+ {
+- if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
++ if (INetURLObject(maHref).IsExoticProtocol())
+ GetImport().NotifyMacroEventRead();
+
+ xProps->setPropertyValue("FrameURL", Any(maHref) );
+--
+cgit v1.2.1
+