diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-07 10:41:51 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-07 10:45:15 +0100 |
commit | 9e68beb85da94386443f53ff9f8bd4685f2c50ea (patch) | |
tree | 1e00e2b3c2ba38b02be2ed4cee736b1ef7b34c38 /sw/source/core/edit | |
parent | 5e52aa124b444a34edbef823a91c63ccd58dc17c (diff) |
More replacements of manual swapping with SwGrfNode::GetGrf()/GetGrfObj()
Change-Id: Ie56584c03af8a6d3ea8f8d4294f5492a841933b7
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index c59b59c697fd..f9df5120c545 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -238,28 +238,7 @@ const Graphic* SwEditShell::GetGraphic( bool bWait ) const const Graphic* pGrf( 0L ); if ( pGrfNode ) { - pGrf = &(pGrfNode->GetGrf()); - // --> #i73788# - // no load of linked graphic, if its not needed now (bWait = sal_False). - if ( bWait ) - { - if( pGrf->IsSwapOut() || - ( pGrfNode->IsLinkedFile() && GRAPHIC_DEFAULT == pGrf->GetType() ) ) - { - bool const bResult = pGrfNode->SwapIn(bWait); - OSL_ENSURE(bResult || !bWait, "Graphic could not be loaded" ); - (void) bResult; // unused in non-debug - } - } - else - { - if ( pGrf->IsSwapOut() && !pGrfNode->IsLinkedFile() ) - { - bool const bResult = pGrfNode->SwapIn(bWait); - OSL_ENSURE(bResult || !bWait, "Graphic could not be loaded" ); - (void) bResult; // unused in non-debug - } - } + pGrf = &(pGrfNode->GetGrf(bWait && GRAPHIC_DEFAULT == pGrfNode->GetGrf().GetType())); } return pGrf; } @@ -611,15 +590,7 @@ Graphic SwEditShell::GetIMapGraphic() const if( rNd.IsGrfNode() ) { SwGrfNode & rGrfNode(static_cast<SwGrfNode&>(rNd)); - const Graphic& rGrf = rGrfNode.GetGrf(); - if( rGrf.IsSwapOut() || ( rGrfNode.IsLinkedFile() && - GRAPHIC_DEFAULT == rGrf.GetType() ) ) - { - bool const bResult = rGrfNode.SwapIn(true); - OSL_ENSURE(bResult, "Graphic could not be loaded" ); - (void) bResult; // unused in non-debug - } - aRet = rGrf; + aRet = rGrfNode.GetGrf(GRAPHIC_DEFAULT == rGrfNode.GetGrf().GetType()); } else if ( rNd.IsOLENode() ) { |