Kaydet (Commit) d4c4813a authored tarafından Vasily Melenchuk's avatar Vasily Melenchuk Kaydeden (comit) Andras Timar

tdf#115044: do not load external documents if it is not allowed

Referenced external document data can be loaded after user
permission from dialog or corresponding settings.

Change-Id: If3aec37c8bbdee4aebeb99c7807e87c26df8e592
Reviewed-on: https://gerrit.libreoffice.org/48398Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
(cherry picked from commit 8b98991a)
Reviewed-on: https://gerrit.libreoffice.org/48870Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
(cherry picked from commit 0e7c8c3a)
üst 4f7688bc
......@@ -2381,6 +2381,15 @@ ScDocument* ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
if (!pFileName)
return nullptr;
// Do not load document until it was allowed
SfxObjectShell* pDocShell = mpDoc->GetDocumentShell();
if ( pDocShell )
{
const comphelper::EmbeddedObjectContainer& rContainer = pDocShell->GetEmbeddedObjectContainer();
if ( !rContainer.getUserAllowsLinkUpdate() )
return nullptr;
}
ScDocument* pSrcDoc = nullptr;
ScDocShell* pShell = static_cast<ScDocShell*>(SfxObjectShell::GetFirst(checkSfxObjectShell<ScDocShell>, false));
while (pShell)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment