diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-11 17:17:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-12 16:10:37 +0200 |
commit | 19edcfe36b32b15f86cba1eead7932b610e70ce7 (patch) | |
tree | a72c731e7cfbb5ada628f1fa6f945c163ca82c8c /sw/source | |
parent | a8d25394a02def4bf1b8d1ad022ea9da25d92935 (diff) |
always use the LinkManager's persist as the known referer
Change-Id: Ibb1bd9138993adbd8391b524c0cd654ba523cad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 404356efb381..8b7832937ead 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -32,6 +32,7 @@ #include <frmatr.hxx> #include <frmfmt.hxx> #include <doc.hxx> +#include <DocumentLinksAdministrationManager.hxx> #include <IDocumentLayoutAccess.hxx> #include <pam.hxx> #include <swtable.hxx> @@ -134,17 +135,10 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) Graphic aGrf; - OUString sReferer; - SfxObjectShell * sh = pDoc->GetPersist(); - if (sh != nullptr && sh->HasName()) - { - sReferer = sh->GetMedium()->GetName(); - } - // tdf#124698 if any auth dialog is needed, find what the parent window should be weld::Window* pDlgParent = GetFrameWeld(pDoc); - if( sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, sReferer, aGrf, pDlgParent) && + if (pDoc->getIDocumentLinksAdministration().GetLinkManager().GetGraphicFromAny(rMimeType, rValue, aGrf, pDlgParent) && ( GraphicType::Default != aGrf.GetType() || GraphicType::Default != rGrfObj.GetType() ) ) { |