diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-07-06 22:58:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-07-07 07:48:11 +0200 |
commit | af1be90e528ceeca70ee8f266fc6f6d8682b2c0d (patch) | |
tree | e3e7c92020cd1598d350d00e220aa66470bef434 | |
parent | 1fd5509aaa7956ecdff5099c52818809ce8d45ed (diff) |
Replace GetAppData(SHL_SVD) with an rtl::Static
Change-Id: Ie1ccffe5461475a0425891861f825aeea149e876
-rw-r--r-- | include/svx/svdetc.hxx | 10 | ||||
-rw-r--r-- | include/tools/shl.hxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdetc.cxx | 9 |
3 files changed, 11 insertions, 10 deletions
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx index 47d1dc67660b..1b8a97a4d84d 100644 --- a/include/svx/svdetc.hxx +++ b/include/svx/svdetc.hxx @@ -24,7 +24,6 @@ #include <editeng/outliner.hxx> #include <svx/svxdllapi.h> #include <tools/link.hxx> -#include <tools/shl.hxx> #include <tools/fract.hxx> #include <vcl/outdev.hxx> @@ -239,14 +238,7 @@ public: OLEObjCache& GetOLEObjCache() { return aOLEObjCache; } }; -inline SdrGlobalData& GetSdrGlobalData() -{ - void** ppAppData=GetAppData(SHL_SVD); - if (*ppAppData==NULL) { - *ppAppData=new SdrGlobalData; - } - return *static_cast<SdrGlobalData*>(*ppAppData); -} +SVX_DLLPUBLIC SdrGlobalData & GetSdrGlobalData(); namespace sdr { diff --git a/include/tools/shl.hxx b/include/tools/shl.hxx index 1e790193c941..e4bce5508c54 100644 --- a/include/tools/shl.hxx +++ b/include/tools/shl.hxx @@ -38,7 +38,7 @@ //11 (SHL_IPC) removed //12 (SHL_SVX) removed //13 (SHL_ITEM) removed -#define SHL_SVD 14 +//14 (SHL_SVD) removed //15 (SHL_SI) removed //16 (SHL_SFC) removed //17 (SHL_SFX) removed diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index abdb896b7232..76e75f886405 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -92,6 +92,15 @@ const LocaleDataWrapper* SdrGlobalData::GetLocaleData() return pLocaleData; } +namespace { + +struct TheSdrGlobalData: public rtl::Static<SdrGlobalData, TheSdrGlobalData> {}; + +} + +SdrGlobalData & GetSdrGlobalData() { + return TheSdrGlobalData::get(); +} OLEObjCache::OLEObjCache() { |