sw/source/core/graphic/ndgrf.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 040b2ad8a671f4a9ca024de6cd86157a29713d47 Author: Michael Stahl <[email protected]> Date: Sun Feb 2 23:59:17 2014 +0100 fdo#73300: sw: GraphicObjects are never swapped out In SwNoTxtFrm::PaintPicture() the GraphicObjects are no longer painted via GraphicObject::Draw() any more there is the problem that they are not cached any more in the display cache of the GraphicManager; that used to immediately swap out the Graphic but now they are never swapped out. Since there appears to be no use of the GraphicManager's display cache in the new drawinglayer based rendering path i have no idea how to swap out the Graphic immediately; instead use the same time-out that SdrGrafObj is using already. This timeout is derived from the setting: Tools->Options->LibreOffice->Memory->Graphics cache->"Remove from memory after". (Changed to the hardcoded value for cp4.1.) (regression from 2e5167528f7566dd9b000e50fc1610b7bf99132a) (cherry picked from commit 2d9d20edc999ef2c2ad2ee628a6a5f27efb801d8) Signed-off-by: LuboÅ¡ LuÅák <[email protected]> Conflicts: svx/source/svdraw/svdograf.cxx Change-Id: I0d9b535a82646d9b6635cfb3917f74dcc3ad8720 diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 97ff385..483666e 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -55,6 +55,8 @@ using namespace com::sun::star; +#define SWAPGRAPHIC_TIMEOUT 5000 + SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, const String& rGrfName, const String& rFltName, @@ -68,7 +70,7 @@ SwGrfNode::SwGrfNode( mbLinkedInputStreamReady( false ), mbIsStreamReadOnly( sal_False ) { - maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) ); + maGrfObj.SetSwapStreamHdl( LINK(this, SwGrfNode, SwapGraphic), SWAPGRAPHIC_TIMEOUT ); bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf = bFrameInPaint = bScaleImageMap = sal_False; @@ -86,7 +88,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, mbLinkedInputStreamReady( false ), mbIsStreamReadOnly( sal_False ) { - maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) ); + maGrfObj.SetSwapStreamHdl( LINK(this, SwGrfNode, SwapGraphic), SWAPGRAPHIC_TIMEOUT ); if( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() ) maGrfObj.SetSwapState(); bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf = @@ -111,7 +113,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, mbLinkedInputStreamReady( false ), mbIsStreamReadOnly( sal_False ) { - maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) ); + maGrfObj.SetSwapStreamHdl( LINK(this, SwGrfNode, SwapGraphic), SWAPGRAPHIC_TIMEOUT ); Graphic aGrf; aGrf.SetDefaultType(); maGrfObj.SetGraphic( aGrf, rGrfName );
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
