summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-09 16:16:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-10 14:18:45 +0000
commita1d3dc1cbd1ca8b61e717c8ef8c7fdfe3ec33045 (patch)
tree834bdc45d015ca10b893d42b19f89d7fc2af6b55 /include
parent629765804a9d416c022697c1d0ae9493127d3efe (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
Diffstat (limited to 'include')
-rw-r--r--include/svtools/grfmgr.hxx10
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,