summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-10-23 20:40:49 +0200
committerMichael Stahl <mstahl@redhat.com>2014-10-23 21:30:45 +0200
commita7498603d8b532a1560c3ab816ddb941ad472945 (patch)
tree03527f37fce654236318daaf8f582b251fcb2c0a /basic
parentcefe8874a142ffb170d93654790b41197c37ef78 (diff)
basic: pimplify that
Change-Id: I0abe66ded0fd69a2720ad64e1a1426aafc7dfffb
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/basrdll.cxx28
1 files changed, 21 insertions, 7 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index 6438b5b8f6a6..9086a05079f2 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -29,31 +29,44 @@
#include <basrid.hxx>
#include <sb.hrc>
+struct BasicDLL::Impl
+{
+ bool bDebugMode;
+ bool bBreakEnabled;
+
+ ::boost::scoped_ptr<ResMgr> pBasResMgr;
+
+ Impl()
+ : bDebugMode(false)
+ , bBreakEnabled(true)
+ , pBasResMgr(ResMgr::CreateResMgr("sb", Application::GetSettings().GetUILanguageTag()))
+ { }
+};
+
BasResId::BasResId( sal_uInt32 nId ) :
ResId( nId, *(BASIC_DLL()->GetBasResMgr()) )
{
}
BasicDLL::BasicDLL()
+ : m_pImpl(new Impl)
{
BASIC_DLL() = this;
- pBasResMgr = ResMgr::CreateResMgr("sb", Application::GetSettings().GetUILanguageTag() );
- bDebugMode = false;
- bBreakEnabled = true;
}
BasicDLL::~BasicDLL()
{
- delete pBasResMgr;
}
+ResMgr* BasicDLL::GetBasResMgr() const { return m_pImpl->pBasResMgr.get(); }
+
void BasicDLL::EnableBreak( bool bEnable )
{
BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
- pThis->bBreakEnabled = bEnable;
+ pThis->m_pImpl->bBreakEnabled = bEnable;
}
}
@@ -63,7 +76,7 @@ void BasicDLL::SetDebugMode( bool bDebugMode )
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
- pThis->bDebugMode = bDebugMode;
+ pThis->m_pImpl->bDebugMode = bDebugMode;
}
}
@@ -78,7 +91,8 @@ void BasicDLL::BasicBreak()
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
- if ( StarBASIC::IsRunning() && !bJustStopping && ( pThis->bBreakEnabled || pThis->bDebugMode ) )
+ if (StarBASIC::IsRunning() && !bJustStopping
+ && (pThis->m_pImpl->bBreakEnabled || pThis->m_pImpl->bDebugMode))
{
bJustStopping = true;
StarBASIC::Stop();