summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-13 12:32:04 +0100
committerAndras Timar <andras.timar@collabora.com>2016-09-20 23:07:15 +0200
commit20ad6a7d62c70f6fa031d363084ecf655f1354d9 (patch)
tree5f8f5932c57a0e6077194598464292fe535efc32 /sd
parente2f9a31323c488af7899a64a22b9a35aa5df6e9d (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. Reviewed-on: https://gerrit.libreoffice.org/28879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3) detangle gadzillion checks into something readable no logic change intended (cherry picked from commit fad9786b06d188ba6e354620f57176f3d94a6637) + partial merge of commit c09b3e32372537be739182b02ae83a96386d1e1c Author: Noel Grandin <noel@peralex.com> Date: Tue Mar 8 13:13:59 2016 +0200 loplugin:constantparam in sw for bool bUI is always true in UpdateLinks Unmodified default SdrOle2Obj size is 101x101 svx/source/unodraw/unoshape.cxx sets a css::awt::Size maSize to 100, 100 svx/source/unodraw/unopage.cxx increases that by 1, 1 awt::Size aSize = xShape->getSize(); aSize.Width += 1; aSize.Height += 1; to call SdrObjFactory::MakeNewObject with 101, 101 so default size is 101x101 (getWidth() vs GetWidth() confusion ?) Reviewed-on: https://gerrit.libreoffice.org/28895 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7f0a219c9ad38ae33b51ff69d545f69659691c1e) b6af93afc1f80b7fc36239c96d5e0a71fcbcb789 4d4375dff64d7b8e236d1a24322e749e04ee530f Reviewed-on: https://gerrit.libreoffice.org/28930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 2ff4c68b63c4842ec85a21287317096b6ca8e66e) Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc.cxx6
-rw-r--r--sd/source/ui/docshell/docshel4.cxx5
2 files changed, 10 insertions, 1 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 3e1aff87a95f..77f4199b4c67 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -729,6 +729,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 64d25b85e231..672823758601 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -287,8 +287,11 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
}
bRet = SfxObjectShell::Load( rMedium );
- if( bRet )
+ if (bRet)
{
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer();
+ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
+
bRet = SdXMLFilter( rMedium, *this, true, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
}