summaryrefslogtreecommitdiff
path: root/embeddedobj
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 /embeddedobj
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 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/visobj.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx
index fea7c3a2cf0a..6bf9c49e84e2 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -174,7 +174,10 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe
bool bBackToLoaded = false;
if ( m_nObjectState == embed::EmbedStates::LOADED )
{
- changeState( embed::EmbedStates::RUNNING );
+ awt::Size aOrigSize = getVisualAreaSize(nAspect);
+ changeState(embed::EmbedStates::RUNNING);
+ if (aOrigSize != getVisualAreaSize(nAspect))
+ setVisualAreaSize(nAspect, aOrigSize);
// the links should be switched back to loaded state for now to avoid locking problems
bBackToLoaded = m_bIsLink;