summaryrefslogtreecommitdiff
path: root/sw/source/core/graphic
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-09-29 10:38:32 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-09-29 10:38:32 +0200
commit437011b14652acebaf09c0925166ba021edb7694 (patch)
tree831a8fd204fc12e86172ea54b238b9fe35a75d40 /sw/source/core/graphic
parent01c64f9dffe04c3d3ff0c81ca740827d658ea3da (diff)
fix make check breakers due to GraphicObject refactorsfeature/graphicobject
Change-Id: I26194e4ea3a6557c160c0516c58a5d3cd136867c
Diffstat (limited to 'sw/source/core/graphic')
-rw-r--r--sw/source/core/graphic/ndgrf.cxx52
1 files changed, 19 insertions, 33 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 09c22f010cfd..a3ee0c04ce51 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -478,7 +478,6 @@ sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
*/
short SwGrfNode::SwapIn( sal_Bool bWaitForData )
{
-#if 0 /* FIXME FIXME FIXME */
if( bInSwapIn ) // not recursively!
return !mxGrfObj->IsSwappedOut();
@@ -488,42 +487,35 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
if( pLink )
{
- if(mxGrfObj.is())
+ if( GRAPHIC_NONE == mxGrfObj->GetType() ||
+ GRAPHIC_DEFAULT == mxGrfObj->GetType() )
{
- if( GRAPHIC_NONE == mxGrfObj->GetType() ||
- GRAPHIC_DEFAULT == mxGrfObj->GetType() )
+ // link was not loaded yet
+ if( pLink->SwapIn( bWaitForData ) )
{
- // link was not loaded yet
- if( pLink->SwapIn( bWaitForData ) )
- {
- nRet = -1;
- }
- else if( GRAPHIC_DEFAULT == mxGrfObj->GetType() )
- {
- // no default bitmap anymore, thus re-paint
- mxReplacementGraphic.clear();
-
- mxGrfObj = GraphicObject::Create(Graphic());
- onGraphicChanged();
- SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
- ModifyNotification( &aMsgHint, &aMsgHint );
- }
+ nRet = -1;
}
- else if( mxGrfObj->IsSwappedOut() ) {
- // link to download
- nRet = pLink->SwapIn( bWaitForData ) ? 1 : 0;
- }
- else
+ else if( GRAPHIC_DEFAULT == mxGrfObj->GetType() )
{
- nRet = 1;
+ // no default bitmap anymore, thus re-paint
+ mxReplacementGraphic = GraphicObject::Create(Graphic());
+
+ mxGrfObj = GraphicObject::Create(Graphic());
+ onGraphicChanged();
+ SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
+ ModifyNotification( &aMsgHint, &aMsgHint );
}
}
+ else if( mxGrfObj->IsSwappedOut() ) {
+ // link to download
+ nRet = pLink->SwapIn( bWaitForData ) ? 1 : 0;
+ }
else
{
nRet = 1;
}
}
- else if( mxGrfObj.is() && mxGrfObj->IsSwappedOut() )
+ else if( mxGrfObj->IsSwappedOut() )
{
// graphic is in storage or in a temp file
if( !HasStreamName() )
@@ -568,14 +560,11 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
}
bInSwapIn = sal_False;
return nRet;
-#else
- return 0;
-#endif
}
short SwGrfNode::SwapOut()
{
-#if 0 /* FIXME FIXME */
+
if( mxGrfObj->GetType() != GRAPHIC_DEFAULT &&
mxGrfObj->GetType() != GRAPHIC_NONE &&
!mxGrfObj->IsSwappedOut() && !bInSwapIn )
@@ -593,9 +582,6 @@ short SwGrfNode::SwapOut()
return (short) mxGrfObj->SwapOut( NULL );
}
return 1;
-#else
- return 0;
-#endif
}
bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const