diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-03 16:44:42 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-07 10:45:15 +0100 |
commit | c163d06882b9ef39165bf277606fc70f7ed0435e (patch) | |
tree | 789f0fd3a2aa77a5e526df8ce36b9949029f0208 /sw | |
parent | 9e68beb85da94386443f53ff9f8bd4685f2c50ea (diff) |
Be explicit here when to swap out as a link
Change-Id: I70dd00d5f82c5f4f622805e1d6ee1dfc30900b31
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 3cd7ef95507d..9973837390d6 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -620,17 +620,16 @@ bool SwGrfNode::SwapOut() maGrfObj.GetType() != GRAPHIC_NONE && !maGrfObj.IsSwappedOut() && !bInSwapIn ) { - if( !refLink.Is() ) + if( refLink.Is() || HasEmbeddedStreamName() ) { - // Swapping is only needed for embedded pictures. - // The graphic will be written into a temp file if it is new, i.e. - // if there is no stream name in the storage yet - if( !HasEmbeddedStreamName() ) - if( !maGrfObj.SwapOut() ) - return false; + // written graphics and links are removed here + return maGrfObj.SwapOut( GRFMGR_AUTOSWAPSTREAM_LINK ); } - // written graphics and links are removed here - return maGrfObj.SwapOut( GRFMGR_AUTOSWAPSTREAM_LINK ); + else + { + return maGrfObj.SwapOut(); + } + } return true; } |