summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-10-23 21:05:31 +0200
committerMichael Stahl <mstahl@redhat.com>2014-10-23 21:30:45 +0200
commit51906611abb53e8a22f2d460964e87b0b399d684 (patch)
treefc35b485a564622b53e58858fd10c4aab33f42a0 /basic/source
parenta7498603d8b532a1560c3ab816ddb941ad472945 (diff)
basic: move SbxAppData to a BasicDLL member
... so it is deleted by ~SfxApplication. Change-Id: I161bd92eb9b5082d1fdeea603921d0372a4d97e6
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/runtime/basrdll.cxx8
-rw-r--r--basic/source/sbx/sbxbase.cxx11
2 files changed, 12 insertions, 7 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index 9086a05079f2..167433c0af75 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -28,6 +28,7 @@
#include <basic/basrdll.hxx>
#include <basrid.hxx>
#include <sb.hrc>
+#include <sbxbase.hxx>
struct BasicDLL::Impl
{
@@ -35,11 +36,13 @@ struct BasicDLL::Impl
bool bBreakEnabled;
::boost::scoped_ptr<ResMgr> pBasResMgr;
+ ::boost::scoped_ptr<SbxAppData> pSbxAppData;
Impl()
: bDebugMode(false)
, bBreakEnabled(true)
, pBasResMgr(ResMgr::CreateResMgr("sb", Application::GetSettings().GetUILanguageTag()))
+ , pSbxAppData(new SbxAppData)
{ }
};
@@ -102,4 +105,9 @@ void BasicDLL::BasicBreak()
}
}
+SbxAppData& GetSbxData_Impl()
+{
+ return *BASIC_DLL()->m_pImpl->pSbxAppData;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 89cb73564f65..c9ec487f5ebe 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -32,14 +32,11 @@
TYPEINIT0(SbxBase)
-namespace
+SbxAppData::SbxAppData()
+ : eSbxError(SbxERR_OK)
+ , pBasicFormater(0)
+ , eBasicFormaterLangType(LANGUAGE_DONTKNOW)
{
- class theSbxAppData : public rtl::Static<SbxAppData, theSbxAppData> {};
-}
-
-SbxAppData& GetSbxData_Impl()
-{
- return theSbxAppData::get();
}
SbxAppData::~SbxAppData()