From d05a33018794f7ec63daf4232d521fd2adcc5921 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 31 Jan 2014 23:00:24 +0100 Subject: fdo#73300: sw: don't swap in all images when loading files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (regression from bd55f05b332c1573bd410fd9e21ea7fcf977e1b0) Change-Id: I55532ac0fe983461e961a61149479343d2b879a1 (cherry picked from commit 9b9eb2e4f619c63eabdc54b5d749ac55d8eaf333) Reviewed-on: https://gerrit.libreoffice.org/7809 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svx/source/svdraw/svdograf.cxx | 3 +++ sw/source/core/graphic/ndgrf.cxx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index ff644a5f0276..5bb4b33c6042 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -314,6 +314,9 @@ sdr::contact::ViewContact* SdrGrafObj::CreateObjectSpecificViewContact() void SdrGrafObj::onGraphicChanged() { + if (!pGraphic || pGraphic->IsSwappedOut()) // don't force swap-in for this + return; + OUString aName; OUString aTitle; OUString aDesc; diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 87b81dee61ea..76644aabefe0 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -339,6 +339,9 @@ SwGrfNode::~SwGrfNode() /// allow reaction on change of content of GraphicObject void SwGrfNode::onGraphicChanged() { + if (GetGrfObj().IsSwappedOut()) // don't force swap-in for this + return; + // try to access SwFlyFrmFmt; since title/desc/name are set there, there is no // use to continue if it is not yet set. If not yet set, call onGraphicChanged() // when it is set. -- cgit v1.2.3