summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/app.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-11-11 13:12:13 +0100
committerMichael Stahl <mstahl@redhat.com>2015-11-13 11:03:03 +0100
commitc60ee62c2de57a6fca7d731062ca7c4146377fa1 (patch)
treedf82f3317d7d8c9de69e293830f517828858f167 /sfx2/source/appl/app.cxx
parentc4787618a1edb57c371215ce2b88eae3cc84f9f6 (diff)
sfx2: rename static variable SfxApplication::pApp etc.
Change-Id: I69bb8ab014864ad77448785dfcd291d7c51a0cef
Diffstat (limited to 'sfx2/source/appl/app.cxx')
-rw-r--r--sfx2/source/appl/app.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index ee91a5c0c745..aaba69dcc98f 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -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;
}