forms/source/xforms/submission.cxx | 3 +++ forms/source/xforms/submission/submission.hxx | 6 ++++++ svx/source/svdraw/svdograf.cxx | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-)
New commits: commit 04373ef0a9e7679cecd15bdb8672747993b74f6a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 11 17:02:50 2020 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Jun 3 00:47:44 2020 +0200 use the LinkManager persist to determine the Referer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94061 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 3ee652e1c18186a5de47797aa4b02defcb29c210) Conflicts: svx/source/svdraw/svdograf.cxx Change-Id: I4e93878972492a93af368ffa0560412132431a24 diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index bb1744c517b3..2dc4d38fac8e 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -19,8 +19,10 @@ #include <unotools/streamwrap.hxx> +#include <sfx2/docfile.hxx> #include <sfx2/lnkbase.hxx> #include <math.h> +#include <sfx2/objsh.hxx> #include <tools/helpers.hxx> #include <sot/formats.hxx> #include <sot/storage.hxx> @@ -228,8 +230,13 @@ void SdrGraphicLink::RemoveGraphicUpdater() { sfx2::LinkManager::GetDisplayNames( this, nullptr, &rGrafObj.aFileName, nullptr, &rGrafObj.aFilterName ); + OUString sReferer(getReferer()); + SfxObjectShell * sh = pLinkManager->GetPersist(); + if (sh != nullptr && sh->HasName()) + sReferer = sh->GetMedium()->GetName(); + Graphic aGraphic; - if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, getReferer(), aGraphic)) + if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, sReferer, aGraphic)) { rGrafObj.ImpSetLinkedGraphic(aGraphic); } commit 1809582a51afdd3535c9d09061bfaef0d2bb55f2 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 11 20:46:43 2020 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Jun 3 00:47:35 2020 +0200 limit forms to http[s] Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93993 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 5d101a65c31e6c2f8dd0edffe05f69055cbd481c) Conflicts: forms/source/xforms/submission.cxx Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8 diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index 3757378c663d..81cc0563d390 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -255,6 +255,9 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) } xSubmission->setEncoding(getEncoding()); + if (!xSubmission->IsWebProtocol()) + return false; + CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler ); if (aResult == CSubmission::SUCCESS) diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index 7d726392c736..f93146d5923e 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -127,6 +127,12 @@ public: , m_xContext(::comphelper::getProcessComponentContext()) {} + bool IsWebProtocol() const + { + INetProtocol eProtocol = m_aURLObj.GetProtocol(); + return eProtocol == INetProtocol::Http || eProtocol == INetProtocol::Https; + } + virtual ~CSubmission() {} void setEncoding(const OUString& aEncoding) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits