Kaydet (Commit) c163d068 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Be explicit here when to swap out as a link

Change-Id: I70dd00d5f82c5f4f622805e1d6ee1dfc30900b31
üst 9e68beb8
...@@ -620,17 +620,16 @@ bool SwGrfNode::SwapOut() ...@@ -620,17 +620,16 @@ bool SwGrfNode::SwapOut()
maGrfObj.GetType() != GRAPHIC_NONE && maGrfObj.GetType() != GRAPHIC_NONE &&
!maGrfObj.IsSwappedOut() && !bInSwapIn ) !maGrfObj.IsSwappedOut() && !bInSwapIn )
{ {
if( !refLink.Is() ) if( refLink.Is() || HasEmbeddedStreamName() )
{ {
// Swapping is only needed for embedded pictures. // written graphics and links are removed here
// The graphic will be written into a temp file if it is new, i.e. return maGrfObj.SwapOut( GRFMGR_AUTOSWAPSTREAM_LINK );
// if there is no stream name in the storage yet
if( !HasEmbeddedStreamName() )
if( !maGrfObj.SwapOut() )
return false;
} }
// written graphics and links are removed here else
return maGrfObj.SwapOut( GRFMGR_AUTOSWAPSTREAM_LINK ); {
return maGrfObj.SwapOut();
}
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment