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 @@
// 6 (SHL_TOOLS) removed
// 7 (SHL_SV) removed
// 8 (SHL_SVT) removed
#define SHL_SVDDE 9
// 9 (SHL_SVDDE) removed
// 10 (SHL_ERR) removed
//11 (SHL_IPC) removed
//12 (SHL_SVX) removed
......
......@@ -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;
}
......
......@@ -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();
......
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