Get rid of SHL_SBC
GetAppData(SHL_SBC) was used only locally in the sb library so no need for it. Just use a static pointer field. Change-Id: I37c8429b6c9e521a00c52bb622f78bdc4afe345c
This commit is contained in:
parent
9be3e8e8d5
commit
c3d8b06f00
@ -25,7 +25,6 @@
|
||||
#include <tools/stream.hxx>
|
||||
#include <tools/errinf.hxx>
|
||||
#include <basic/sbx.hxx>
|
||||
#include <tools/shl.hxx>
|
||||
#include <tools/rc.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
@ -964,12 +963,10 @@ StarBASIC::~StarBASIC()
|
||||
RemoveFactory( GetSbData()->pFormFac );
|
||||
delete GetSbData()->pFormFac; GetSbData()->pFormFac = NULL;
|
||||
|
||||
SbiGlobals** pp = (SbiGlobals**) ::GetAppData( SHL_SBC );
|
||||
SbiGlobals* p = *pp;
|
||||
if( p )
|
||||
if( SbiGlobals::pGlobals )
|
||||
{
|
||||
delete p;
|
||||
*pp = 0;
|
||||
delete SbiGlobals::pGlobals;
|
||||
SbiGlobals::pGlobals = 0;
|
||||
}
|
||||
}
|
||||
else if( bDocBasic )
|
||||
|
@ -17,8 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <tools/shl.hxx>
|
||||
|
||||
#include "sbintern.hxx"
|
||||
#include "sbunoobj.hxx"
|
||||
#include "token.hxx"
|
||||
@ -27,13 +25,13 @@
|
||||
#include "codegen.hxx"
|
||||
#include <basic/basmgr.hxx>
|
||||
|
||||
SbiGlobals* SbiGlobals::pGlobals = 0;
|
||||
|
||||
SbiGlobals* GetSbData()
|
||||
{
|
||||
SbiGlobals** pp = (SbiGlobals**) ::GetAppData( SHL_SBC );
|
||||
SbiGlobals* p = *pp;
|
||||
if( !p )
|
||||
p = *pp = new SbiGlobals;
|
||||
return p;
|
||||
if( !SbiGlobals::pGlobals )
|
||||
SbiGlobals::pGlobals = new SbiGlobals;
|
||||
return SbiGlobals::pGlobals;
|
||||
}
|
||||
|
||||
SbiGlobals::SbiGlobals()
|
||||
|
@ -80,6 +80,7 @@ public:
|
||||
|
||||
struct SbiGlobals
|
||||
{
|
||||
static SbiGlobals* pGlobals;
|
||||
SbiInstance* pInst; // all active runtime instances
|
||||
SbiFactory* pSbFac; // StarBASIC-Factory
|
||||
SbUnoFactory* pUnoFac; // Factory for Uno-Structs at DIM AS NEW
|
||||
|
@ -53,7 +53,7 @@
|
||||
//25 (SHL_LNKCCH) removed
|
||||
//26 (SHL_CHANNEL) removed
|
||||
//27 (SHL_SBX) removed
|
||||
#define SHL_SBC 28
|
||||
//28 (SHL_SBC) removed
|
||||
//29 (SHL_SDB) removed
|
||||
//30 (SHL_SBA) removed
|
||||
//31 (SHL_SBA2) removed
|
||||
|
Loading…
x
Reference in New Issue
Block a user