diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-07-07 14:44:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-07-07 14:52:35 +0200 |
commit | 64fe80db1f06c01084a1c8c498ac874ce4e476ce (patch) | |
tree | 8e1f4b47ac465c2c102c4bc8015f7b6e1f5d19f3 /svl/source/svdde | |
parent | 2b429eff07ed3e3049e47e0219669a47bada4905 (diff) |
Replace GetAppData(SHL_SVDDE) with a static pointer var
Change-Id: I63d35dc3dbfb1185d5795316d2c1d77745d85451
Diffstat (limited to 'svl/source/svdde')
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 23 | ||||
-rw-r--r-- | svl/source/svdde/ddeimp.hxx | 6 |
2 files changed, 16 insertions, 13 deletions
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index 860f7c65579b..f771075a333d 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -29,20 +29,27 @@ #include <tools/solarmutex.hxx> #include <osl/mutex.hxx> -DdeInstData* ImpInitInstData() +namespace { + +DdeInstData * theDdeInstData; + +} + +DdeInstData* ImpGetInstData() { - DdeInstData* pData = new DdeInstData; + return theDdeInstData; +} - DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE ); - *ppInst = pData; - return pData; +DdeInstData* ImpInitInstData() +{ + theDdeInstData = new DdeInstData; + return theDdeInstData; } void ImpDeinitInstData() { - DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE ); - delete (*ppInst); - *ppInst = 0; + delete theDdeInstData; + theDdeInstData = 0; } diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx index 23bffe9f7405..265025cdb3b3 100644 --- a/svl/source/svdde/ddeimp.hxx +++ b/svl/source/svdde/ddeimp.hxx @@ -26,7 +26,6 @@ #include <boost/noncopyable.hpp> #include <rtl/ustring.hxx> #include <svl/svdde.hxx> -#include <tools/shl.hxx> #include <vector> @@ -121,10 +120,7 @@ public: } }; -inline DdeInstData* ImpGetInstData() -{ - return (DdeInstData*)(*GetAppData( SHL_SVDDE )); -} +DdeInstData* ImpGetInstData(); DdeInstData* ImpInitInstData(); void ImpDeinitInstData(); |