summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-13 15:26:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-09-15 11:55:28 +0000
commit74844277cc2194c9e43f5bd7a6f78a9603da32f3 (patch)
tree71fe0efd482ee745fb203481447ddbec44d4a769 /sd
parentf78ad80e5562567e8612269b8bed1283bafb6198 (diff)
disable generation of ole previews in ODF format until after load
so the user update links dialog can control their generation SdrEmbedObjectLink becomes exposed to calc so it can detect if the link dialog needs to be used to update ole links. Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090 Reviewed-on: https://gerrit.libreoffice.org/28879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc.cxx6
-rw-r--r--sd/source/ui/docshell/docshel4.cxx4
2 files changed, 9 insertions, 1 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index c448609864e9..809ed3e61daf 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -720,6 +720,12 @@ void SdDrawDocument::UpdateAllLinks()
{
s_pDocLockedInsertingLinks = this; // lock inserting links. only links in this document should by resolved
+ if (mpDocSh)
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = mpDocSh->getEmbeddedObjectContainer();
+ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
+ }
+
pLinkManager->UpdateAllLinks(); // query box: update all links?
if (s_pDocLockedInsertingLinks == this)
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 71746fdaf002..3668a9588d0e 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -293,8 +293,10 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
}
bRet = SfxObjectShell::Load( rMedium );
- if( bRet )
+ if (bRet)
{
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer();
+ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
}