Kaydet (Commit) 64fe80db authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Replace GetAppData(SHL_SVDDE) with a static pointer var

Change-Id: I63d35dc3dbfb1185d5795316d2c1d77745d85451
üst 2b429eff
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
// 6 (SHL_TOOLS) removed // 6 (SHL_TOOLS) removed
// 7 (SHL_SV) removed // 7 (SHL_SV) removed
// 8 (SHL_SVT) removed // 8 (SHL_SVT) removed
#define SHL_SVDDE 9 // 9 (SHL_SVDDE) removed
// 10 (SHL_ERR) removed // 10 (SHL_ERR) removed
//11 (SHL_IPC) removed //11 (SHL_IPC) removed
//12 (SHL_SVX) removed //12 (SHL_SVX) removed
......
...@@ -29,20 +29,27 @@ ...@@ -29,20 +29,27 @@
#include <tools/solarmutex.hxx> #include <tools/solarmutex.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
DdeInstData* ImpInitInstData() namespace {
DdeInstData * theDdeInstData;
}
DdeInstData* ImpGetInstData()
{ {
DdeInstData* pData = new DdeInstData; return theDdeInstData;
}
DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE ); DdeInstData* ImpInitInstData()
*ppInst = pData; {
return pData; theDdeInstData = new DdeInstData;
return theDdeInstData;
} }
void ImpDeinitInstData() void ImpDeinitInstData()
{ {
DdeInstData** ppInst = (DdeInstData**)GetAppData( SHL_SVDDE ); delete theDdeInstData;
delete (*ppInst); theDdeInstData = 0;
*ppInst = 0;
} }
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <svl/svdde.hxx> #include <svl/svdde.hxx>
#include <tools/shl.hxx>
#include <vector> #include <vector>
...@@ -121,10 +120,7 @@ public: ...@@ -121,10 +120,7 @@ public:
} }
}; };
inline DdeInstData* ImpGetInstData() DdeInstData* ImpGetInstData();
{
return (DdeInstData*)(*GetAppData( SHL_SVDDE ));
}
DdeInstData* ImpInitInstData(); DdeInstData* ImpInitInstData();
void ImpDeinitInstData(); void ImpDeinitInstData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment