Author: orw
Date: Thu Jun 19 09:51:56 2014
New Revision: 1603799
URL: http://svn.apache.org/r1603799
Log:
124999: As Writer graphics are no longer painted via the graphic manager - see
<SwNoTxtFrm::PaintPicture(..)> - it is needed to swap out the Writer graphics
automatically after a certain amount of time. --> 5000ms
cherry-picked from trunk
Modified:
openoffice/branches/AOO410/ (props changed)
openoffice/branches/AOO410/main/ (props changed)
openoffice/branches/AOO410/main/sw/source/core/graphic/ndgrf.cxx
Propchange: openoffice/branches/AOO410/
------------------------------------------------------------------------------
Merged /openoffice/trunk:r1600883
Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
Merged /openoffice/trunk/main:r1600883
Modified: openoffice/branches/AOO410/main/sw/source/core/graphic/ndgrf.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sw/source/core/graphic/ndgrf.cxx?rev=1603799&r1=1603798&r2=1603799&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/sw/source/core/graphic/ndgrf.cxx (original)
+++ openoffice/branches/AOO410/main/sw/source/core/graphic/ndgrf.cxx Thu Jun 19
09:51:56 2014
@@ -62,6 +62,11 @@
using namespace com::sun::star;
+// As Writer graphics are no longer painted via the graphic manager - see
<SwNoTxtFrm::PaintPicture(..)> -
+// it is needed to swap out the Writer graphics automatically after a certain
amount of time.
+// --> 5000ms
+#define TIMETOSWAPOUTGRAPHICAUTOMATICALLY 5000
+
// --------------------
// SwGrfNode
// --------------------
@@ -78,7 +83,7 @@ SwGrfNode::SwGrfNode(
mbLinkedInputStreamReady( false ),
mbIsStreamReadOnly( sal_False )
{
- maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
+ maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ),
TIMETOSWAPOUTGRAPHICAUTOMATICALLY );
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
bFrameInPaint = bScaleImageMap = sal_False;
bGrafikArrived = sal_True;
@@ -97,7 +102,7 @@ SwGrfNode::SwGrfNode(
mbIsStreamReadOnly( sal_False )
{
maGrfObj = rGrfObj;
- maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
+ maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ),
TIMETOSWAPOUTGRAPHICAUTOMATICALLY );
if ( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() )
maGrfObj.SetSwapState();
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
bFrameInPaint = bScaleImageMap = sal_False;
@@ -120,7 +125,7 @@ SwGrfNode::SwGrfNode(
mbLinkedInputStreamReady( false ),
mbIsStreamReadOnly( sal_False )
{
- maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
+ maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ),
TIMETOSWAPOUTGRAPHICAUTOMATICALLY );
Graphic aGrf;
aGrf.SetDefaultType();