summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/runtime/basrdll.cxx28
-rw-r--r--include/basic/basrdll.hxx15
2 files changed, 28 insertions, 15 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();
diff --git a/include/basic/basrdll.hxx b/include/basic/basrdll.hxx
index bf6ba731cb11..274126d6c461 100644
--- a/include/basic/basrdll.hxx
+++ b/include/basic/basrdll.hxx
@@ -20,24 +20,23 @@
#ifndef INCLUDED_BASIC_BASRDLL_HXX
#define INCLUDED_BASIC_BASRDLL_HXX
-class ResMgr;
+#include <boost/scoped_ptr.hpp>
-#include <vcl/accel.hxx>
#include <basic/basicdllapi.h>
+class ResMgr;
+
class BASIC_DLLPUBLIC BasicDLL
{
-private:
- ResMgr* pBasResMgr;
-
- bool bDebugMode;
- bool bBreakEnabled;
+public:
+ struct Impl;
+ ::boost::scoped_ptr<Impl> m_pImpl;
public:
BasicDLL();
~BasicDLL();
- ResMgr* GetBasResMgr() const { return pBasResMgr; }
+ ResMgr* GetBasResMgr() const;
static void BasicBreak();