summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-07-06 23:15:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-07-07 07:48:12 +0200
commite69fd541ca4fd542f7e39ca8a1dd9cc113b95be2 (patch)
treeacf3d81a51ce8f0439edeceb77e5d06cb8ad748a /basic
parente294fa9283071cb2816b6d8c759ed76ee552410e (diff)
Replace GetAppData(SHL_IDL) with a static pointer var
Change-Id: Ia1e22ff95457a958ef26974091aa2092b32505bd
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/basrdll.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index e02c0f6798a0..e10b7b356111 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/shl.hxx>
#include <vcl/svapp.hxx>
#include <svl/solar.hrc>
#include <tools/debug.hxx>
@@ -46,15 +45,21 @@ struct BasicDLL::Impl
{ }
};
+namespace {
+
+BasicDLL * BASIC_DLL;
+
+}
+
BasResId::BasResId( sal_uInt32 nId ) :
- ResId( nId, *(BASIC_DLL()->GetBasResMgr()) )
+ ResId( nId, *(BASIC_DLL->GetBasResMgr()) )
{
}
BasicDLL::BasicDLL()
: m_xImpl(new Impl)
{
- BASIC_DLL() = this;
+ BASIC_DLL = this;
}
BasicDLL::~BasicDLL()
@@ -65,7 +70,7 @@ ResMgr* BasicDLL::GetBasResMgr() const { return m_xImpl->xBasResMgr.get(); }
void BasicDLL::EnableBreak( bool bEnable )
{
- BasicDLL* pThis = BASIC_DLL();
+ BasicDLL* pThis = BASIC_DLL;
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
@@ -75,7 +80,7 @@ void BasicDLL::EnableBreak( bool bEnable )
void BasicDLL::SetDebugMode( bool bDebugMode )
{
- BasicDLL* pThis = BASIC_DLL();
+ BasicDLL* pThis = BASIC_DLL;
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
@@ -86,7 +91,7 @@ void BasicDLL::SetDebugMode( bool bDebugMode )
void BasicDLL::BasicBreak()
{
- BasicDLL* pThis = BASIC_DLL();
+ BasicDLL* pThis = BASIC_DLL;
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
@@ -106,7 +111,7 @@ void BasicDLL::BasicBreak()
SbxAppData& GetSbxData_Impl()
{
- return *BASIC_DLL()->m_xImpl->xSbxAppData;
+ return *BASIC_DLL->m_xImpl->xSbxAppData;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */