editeng/source/items/frmitems.cxx | 14 ++++------ sw/source/core/graphic/ndgrf.cxx | 52 +++++++++++++------------------------- 2 files changed, 25 insertions(+), 41 deletions(-)
New commits: commit 437011b14652acebaf09c0925166ba021edb7694 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Sun Sep 29 10:38:32 2013 +0200 fix make check breakers due to GraphicObject refactors Change-Id: I26194e4ea3a6557c160c0516c58a5d3cd136867c diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 3aa9b47..77cf594 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -3327,7 +3327,7 @@ SvxBrushItem::SvxBrushItem( sal_uInt16 _nWhich ) : aColor ( COL_TRANSPARENT ), nShadingValue ( ShadingPattern::CLEAR ), - pImpl ( new SvxBrushItem_Impl( 0 ) ), + pImpl ( new SvxBrushItem_Impl( GraphicObject::Create( Graphic() ) )), pStrLink ( NULL ), pStrFilter ( NULL ), eGraphicPos ( GPOS_NONE ), @@ -3344,7 +3344,7 @@ SvxBrushItem::SvxBrushItem( const Color& rColor, sal_uInt16 _nWhich) : aColor ( rColor ), nShadingValue ( ShadingPattern::CLEAR ), - pImpl ( new SvxBrushItem_Impl( 0 ) ), + pImpl ( new SvxBrushItem_Impl( GraphicObject::Create( Graphic() ) )), pStrLink ( NULL ), pStrFilter ( NULL ), eGraphicPos ( GPOS_NONE ), @@ -3401,7 +3401,7 @@ SvxBrushItem::SvxBrushItem( aColor ( COL_TRANSPARENT ), nShadingValue ( ShadingPattern::CLEAR ), - pImpl ( new SvxBrushItem_Impl( NULL ) ), + pImpl ( new SvxBrushItem_Impl( GraphicObject::Create( Graphic() ) )), pStrLink ( new String( rLink ) ), pStrFilter ( new String( rFilter ) ), eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ), @@ -3420,7 +3420,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion, aColor ( COL_TRANSPARENT ), nShadingValue ( ShadingPattern::CLEAR ), - pImpl ( new SvxBrushItem_Impl( NULL ) ), + pImpl ( new SvxBrushItem_Impl( GraphicObject::Create( Graphic() ) )), pStrLink ( NULL ), pStrFilter ( NULL ), eGraphicPos ( GPOS_NONE ) @@ -3535,7 +3535,7 @@ SvxBrushItem::SvxBrushItem( const SvxBrushItem& rItem ) : SfxPoolItem( rItem.Which() ), nShadingValue ( ShadingPattern::CLEAR ), - pImpl ( new SvxBrushItem_Impl( NULL ) ), + pImpl ( new SvxBrushItem_Impl( GraphicObject::Create( Graphic() ) )), pStrLink ( NULL ), pStrFilter ( NULL ), eGraphicPos ( GPOS_NONE ), @@ -3810,7 +3810,6 @@ SvxBrushItem& SvxBrushItem::operator=( const SvxBrushItem& rItem ) aColor = rItem.aColor; eGraphicPos = rItem.eGraphicPos; - pImpl->mxGraphicObject.clear(); DELETEZ( pStrLink ); DELETEZ( pStrFilter ); @@ -3997,7 +3996,6 @@ void SvxBrushItem::SetGraphicPos( SvxGraphicPosition eNew ) if ( GPOS_NONE == eGraphicPos ) { - pImpl->mxGraphicObject.clear(); DELETEZ( pStrLink ); DELETEZ( pStrFilter ); pImpl->mxGraphicObject = GraphicObject::Create(Graphic()); // Creating a dummy @@ -4059,7 +4057,7 @@ void SvxBrushItem::SetGraphicLink( const String& rNew ) else pStrLink = new String( rNew ); - pImpl->mxGraphicObject.clear(); + pImpl->mxGraphicObject = GraphicObject::Create(Graphic()); } } diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 09c22f0..a3ee0c0 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits