diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-09 16:16:38 +0000 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-11-28 00:13:24 -0500 |
commit | 0cd69d16547020bc2e8eae326cf6ef12836dc3d5 (patch) | |
tree | 5358ca98af37f0148b9717ab4060c0a4333ccaf2 /include/svtools | |
parent | a12e49be7f91611d03b704b878b55dcd97681532 (diff) |
post ctor, pre dtor there is always a mpMgr and its mpGlobalMgr
move the ImplEnsureGraphicManager calls to be the first thing
in the ctor to ensure that its also always available during
the ctoring, this is hopefully a good change
Change-Id: Iccddee7cac152df66dec0039df207a7575e1fa54
(cherry picked from commit a1d3dc1cbd1ca8b61e717c8ef8c7fdfe3ec33045)
Diffstat (limited to 'include/svtools')
-rw-r--r-- | include/svtools/grfmgr.hxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index 247b03612293..ac8bdea7f792 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -181,7 +181,6 @@ private: MapMode maPrefMapMode; sal_uLong mnSizeBytes; GraphicType meType; - GraphicManager* mpMgr; OUString maLink; Link<const GraphicObject*, SvStream*> maSwapStreamHdl; OUString maUserData; @@ -202,7 +201,7 @@ private: void SVT_DLLPRIVATE ImplConstruct(); void SVT_DLLPRIVATE ImplAssignGraphicData(); - void SVT_DLLPRIVATE ImplEnsureGraphicManager(); + static void SVT_DLLPRIVATE ImplEnsureGraphicManager(); void SVT_DLLPRIVATE ImplAutoSwapIn(); bool SVT_DLLPRIVATE ImplGetCropParams( OutputDevice* pOut, @@ -332,7 +331,12 @@ public: void FireSwapInRequest(); void FireSwapOutRequest(); - GraphicManager& GetGraphicManager() const { return *mpMgr; } + GraphicManager& GetGraphicManager() const + { + (void)this; // avoid loplugin:staticmethods because first GraphicManager ctor creates + // mpGlobalMgr and the last GraphicManager dtor destroys it + return *mpGlobalMgr; + } bool IsCached( OutputDevice* pOut, |