Kaydet (Commit) c60ee62c authored tarafından Michael Stahl's avatar Michael Stahl

sfx2: rename static variable SfxApplication::pApp etc.

Change-Id: I69bb8ab014864ad77448785dfcd291d7c51a0cef
üst c4787618
......@@ -115,8 +115,6 @@ class SfxObjectShellLock;
class SFX2_DLLPUBLIC SfxApplication: public SfxShell
{
SAL_DLLPRIVATE static SfxApplication* pApp;
SfxAppData_Impl* pAppData_Impl;
DECL_DLLPRIVATE_LINK_TYPED( GlobalBasicErrorHdl_Impl, StarBASIC*, bool );
......@@ -135,7 +133,7 @@ public:
SfxApplication();
virtual ~SfxApplication();
static SfxApplication* GetOrCreate();
static SfxApplication* Get() { return pApp;}
static SfxApplication* Get();
// Resource Manager
static ResMgr* GetSfxResManager();
......
......@@ -121,8 +121,8 @@
using namespace ::com::sun::star;
// Static member
SfxApplication* SfxApplication::pApp = nullptr;
static SfxApplication* g_pSfxApplication = nullptr;
#if HAVE_FEATURE_SCRIPTING
static BasicDLL* pBasic = nullptr;
#endif
......@@ -142,20 +142,25 @@ namespace
#include <sfx2/imagemgr.hxx>
#include "fwkhelper.hxx"
SfxApplication* SfxApplication::Get()
{
return g_pSfxApplication;
}
SfxApplication* SfxApplication::GetOrCreate()
{
// SFX on demand
::osl::MutexGuard aGuard(theApplicationMutex::get());
if (!pApp)
if (!g_pSfxApplication)
{
SAL_INFO( "sfx.appl", "SfxApplication::SetApp" );
pApp = new SfxApplication;
g_pSfxApplication = new SfxApplication;
// at the moment a bug may occur when Initialize_Impl returns FALSE,
// but this is only temporary because all code that may cause such
// a fault will be moved outside the SFX
pApp->Initialize_Impl();
g_pSfxApplication->Initialize_Impl();
::framework::SetImageProducer( GetImage );
::framework::SetRefreshToolbars( RefreshToolbars );
......@@ -176,7 +181,7 @@ SfxApplication* SfxApplication::GetOrCreate()
Help::DisableBalloonHelp();
#endif
}
return pApp;
return g_pSfxApplication;
}
SfxApplication::SfxApplication()
......@@ -243,7 +248,7 @@ SfxApplication::~SfxApplication()
#endif
delete pAppData_Impl;
pApp = nullptr;
g_pSfxApplication = nullptr;
}
......
......@@ -58,8 +58,8 @@ bool getBool(utl::OConfigurationNode const & aNode, const char* pNodeName)
ResourceManager& ResourceManager::Instance()
{
static ResourceManager maInstance;
return maInstance;
static ResourceManager s_SidebarResourceManagerInstance;
return s_SidebarResourceManagerInstance;
}
ResourceManager::ResourceManager()
......
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