diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-11 09:32:20 +0000 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:45 -0500 |
commit | 377c7dce522514528c80d4466de2faad7f6d2c00 (patch) | |
tree | cb4f97ca7790d962e52c29bc4ec35e80ddb06ac9 /svtools | |
parent | ba4ddbf7ed26161ee6593dc144e93487da614eed (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>
(cherry picked from commit 4ff1b3589076f66c3d783c3ea6c5f1fd9b9337ed)
(cherry picked from commit 5df3ec82798e3fff1ea1e71e64a23e501c89af22)
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(); |