diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-11 09:32:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-11 16:14:21 +0000 |
commit | 4ff1b3589076f66c3d783c3ea6c5f1fd9b9337ed (patch) | |
tree | 99c276736a1f8259ef2eb007f274dbf2fd6a09bd /svtools | |
parent | 05d509482cedb7d7c4697a76e80352e430fd8c7e (diff) |
fold ImplConstruct into ctors and reduce to necessary
ImplConstruct sets mnAnimationLoopCount, but is always followed by
ImplAssignGraphicData which overwrites it so we can omit that
ImplConstruct sets mnDataChangeTimeStamp, but is always
followed by ImplAssignGraphicData which always calls
ImplAfterDataChange which overwrites it so we can omit that
Change-Id: I2304dc1ea590071a83ca30768426f721c1bd259c
Reviewed-on: https://gerrit.libreoffice.org/32953
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 53 |
1 files changed, 21 insertions, 32 deletions
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index a42ab8fab207..ffaa93a0abc1 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -70,48 +70,49 @@ void GraphicObject::ImplAfterDataChange() mpGlobalMgr->ImplCheckSizeOfSwappedInGraphics(this); } -GraphicObject::GraphicObject() : - maLink (), - maUserData () +GraphicObject::GraphicObject() + : mbAutoSwapped(false) + , mbIsInSwapIn(false) + , mbIsInSwapOut(false) { ImplEnsureGraphicManager(); - ImplConstruct(); ImplAssignGraphicData(); mpGlobalMgr->ImplRegisterObj(*this, maGraphic, nullptr, nullptr); } -GraphicObject::GraphicObject( const Graphic& rGraphic ) : - maGraphic ( rGraphic ), - maLink (), - maUserData () +GraphicObject::GraphicObject(const Graphic& rGraphic) + : maGraphic(rGraphic) + , mbAutoSwapped(false) + , mbIsInSwapIn(false) + , mbIsInSwapOut(false) { ImplEnsureGraphicManager(); - ImplConstruct(); ImplAssignGraphicData(); mpGlobalMgr->ImplRegisterObj(*this, maGraphic, nullptr, nullptr); } -GraphicObject::GraphicObject( const GraphicObject& rGraphicObj ) : - maGraphic ( rGraphicObj.GetGraphic() ), - maAttr ( rGraphicObj.maAttr ), - maLink ( rGraphicObj.maLink ), - maUserData ( rGraphicObj.maUserData ) +GraphicObject::GraphicObject(const GraphicObject& rGraphicObj) + : maGraphic(rGraphicObj.GetGraphic()) + , maAttr(rGraphicObj.maAttr) + , maLink(rGraphicObj.maLink) + , maUserData(rGraphicObj.maUserData) + , mbAutoSwapped(false) + , mbIsInSwapIn(false) + , mbIsInSwapOut(false) { - ImplConstruct(); ImplAssignGraphicData(); mpGlobalMgr->ImplRegisterObj(*this, maGraphic, nullptr, &rGraphicObj); if( rGraphicObj.HasUserData() && rGraphicObj.IsSwappedOut() ) SetSwapState(); } -GraphicObject::GraphicObject( const OString& rUniqueID ) : - maLink (), - maUserData () +GraphicObject::GraphicObject(const OString& rUniqueID) + : mbAutoSwapped(false) + , mbIsInSwapIn(false) + , mbIsInSwapOut(false) { ImplEnsureGraphicManager(); - ImplConstruct(); - // assign default properties ImplAssignGraphicData(); @@ -132,18 +133,6 @@ GraphicObject::~GraphicObject() } } -void GraphicObject::ImplConstruct() -{ - maSwapStreamHdl = Link<const GraphicObject*, SvStream*>(); - mnAnimationLoopCount = 0; - mbAutoSwapped = false; - mbIsInSwapIn = false; - mbIsInSwapOut = false; - - // Init with a unique, increasing ID - mnDataChangeTimeStamp = aIncrementingTimeOfLastDataChange++; -} - void GraphicObject::ImplAssignGraphicData() { maPrefSize = maGraphic.GetPrefSize(); |