From 974c21ad33bfa1d93d5ae795556d35ca7eb36e68 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:52:12 +0200 Subject: Adding debian version 1:7.0.4-4+deb11u8. Signed-off-by: Daniel Baumann --- .../reuse-AllowedLinkProtocolFromDocument-2.diff | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff (limited to 'debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff') diff --git a/debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff b/debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff new file mode 100644 index 000000000..fc603e02b --- /dev/null +++ b/debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff @@ -0,0 +1,82 @@ +From ddbc78e7879671574e79cc3b93a0ccd362bad30e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 22 Nov 2023 21:14:41 +0000 +Subject: reuse AllowedLinkProtocolFromDocument in impress/draw +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I73ca4f087946a45dbf92d69a0dc1e769de9b5690 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159843 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit f0942eed2eb328b04856f20613f5226d66b66a20) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159759 +Reviewed-by: Michael Stahl +Signed-off-by: Xisco Fauli +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159884 +Reviewed-by: Miklos Vajna +Signed-off-by: Xisco Fauli +--- + sd/source/ui/app/sdmod1.cxx | 29 ++++++++++++++++++----------- + 1 file changed, 18 insertions(+), 11 deletions(-) + +diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx +index 3d84ddb0da56..8d42653545ea 100644 +--- a/sd/source/ui/app/sdmod1.cxx ++++ b/sd/source/ui/app/sdmod1.cxx +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -193,26 +194,32 @@ void SdModule::Execute(SfxRequest& rReq) + { + bool bIntercept = false; + ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); +- if (pDocShell) ++ ::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr; ++ if (pViewShell) + { +- ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); +- if (pViewShell) ++ if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) + { +- if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) ++ // Prevent documents from opening while the slide ++ // show is running, except when this request comes ++ // from a shape interaction. ++ if (rReq.GetArgs() == nullptr) + { +- // Prevent documents from opening while the slide +- // show is running, except when this request comes +- // from a shape interaction. +- if (rReq.GetArgs() == nullptr) +- { +- bIntercept = true; +- } ++ bIntercept = true; + } + } + } + + if (!bIntercept) + { ++ if (const SfxStringItem* pURLItem = rReq.GetArg(SID_FILE_NAME)) ++ { ++ if (!pViewShell || !SfxObjectShell::AllowedLinkProtocolFromDocument(pURLItem->GetValue(), ++ pViewShell->GetObjectShell(), ++ pViewShell->GetFrameWeld())) ++ { ++ return; ++ } ++ } + SfxGetpApp()->ExecuteSlot(rReq, SfxGetpApp()->GetInterface()); + } + else +-- +cgit v1.2.1 + -- cgit v1.2.3