diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-26 16:38:36 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-31 00:21:13 +0100 |
commit | 5631652200a1261e4fee8e51cca238a35b465d14 (patch) | |
tree | c6cf5512ba9826b0ec89e79abd231094776cf78e /sw/source/core/graphic | |
parent | 60a03d97bc35c02cb1eff0e4a02b6f37fd1a6a34 (diff) |
Drop bDelayed from SwNodes::MakeGrfNode
There is no caller, which sets bDelayed. The comment
"// create object delayed, only from a SW/G-reader"
doesn't help me much either.
But in case of a linked image, it seems appropriate to just drop
the empty image and use the delayed SwGrfNode constructor.
At least a linked PDF and PNG still work.
Change-Id: Idff5599ac0ff04c3efcb141c731c0ee1cfa747de
Reviewed-on: https://gerrit.libreoffice.org/43908
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sw/source/core/graphic')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index e6dd87bd0616..7ef061715ba8 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -60,7 +60,8 @@ using namespace com::sun::star; SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, - const OUString& rGrfName, const OUString& rFltName, + const OUString& rGrfName, + const OUString& rFltName, const Graphic* pGraphic, SwGrfFormatColl *pGrfColl, SwAttrSet const * pAutoAttr ) : @@ -80,8 +81,9 @@ SwGrfNode::SwGrfNode( } SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, - const GraphicObject& rGrfObj, - SwGrfFormatColl *pGrfColl, SwAttrSet const * pAutoAttr ) : + const GraphicObject& rGrfObj, + SwGrfFormatColl *pGrfColl, + SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(rGrfObj), mpReplacementGraphic(nullptr), @@ -102,7 +104,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, * @note Does not read/open the image itself! */ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, - const OUString& rGrfName, const OUString& rFltName, + const OUString& rGrfName, + const OUString& rFltName, SwGrfFormatColl *pGrfColl, SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), @@ -119,7 +122,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, bInSwapIn = bChgTwipSize = bFrameInPaint = bScaleImageMap = false; - bGraphicArrived = true; + bGraphicArrived = false; InsertLink( rGrfName, rFltName ); if( IsLinkedFile() ) @@ -425,13 +428,12 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere, const OUString& rFltName, const Graphic* pGraphic, SwGrfFormatColl* pGrfColl, - SwAttrSet const * pAutoAttr, - bool bDelayed ) + SwAttrSet const * pAutoAttr ) { OSL_ENSURE( pGrfColl, "MakeGrfNode: Formatpointer is 0." ); SwGrfNode *pNode; // create object delayed, only from a SW/G-reader - if( bDelayed ) + if( !pGraphic ) pNode = new SwGrfNode( rWhere, rGrfName, rFltName, pGrfColl, pAutoAttr ); else |