summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/global.hxx7
-rw-r--r--sc/source/core/data/global.cxx11
2 files changed, 10 insertions, 8 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 3a7a76b6320f..0da17b43ae67 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: global.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: er $ $Date: 2001-07-02 09:53:19 $
+ * last change: $Author: er $ $Date: 2001-07-05 15:05:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -550,8 +550,9 @@ class ScGlobal
public:
static ::com::sun::star::lang::Locale* pLocale;
- static CharClass* pCharClass;
static SvtSysLocale* pSysLocale;
+ // for faster access a pointer to the single instance provided by SvtSysLocale
+ static const CharClass* pCharClass;
static CalendarWrapper* pCalendar;
static CollatorWrapper* pCollator;
static CollatorWrapper* pCaseCollator;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 0bce1d86de19..69cdc3a59481 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: global.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: er $ $Date: 2001-07-02 09:54:16 $
+ * last change: $Author: er $ $Date: 2001-07-05 15:04:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -147,8 +147,8 @@ ScUserList* ScGlobal::pUserList = NULL;
String** ScGlobal::ppRscString = NULL;
LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM;
::com::sun::star::lang::Locale* ScGlobal::pLocale = NULL;
-CharClass* ScGlobal::pCharClass = NULL;
SvtSysLocale* ScGlobal::pSysLocale = NULL;
+const CharClass* ScGlobal::pCharClass = NULL;
CalendarWrapper* ScGlobal::pCalendar = NULL;
CollatorWrapper* ScGlobal::pCollator = NULL;
CollatorWrapper* ScGlobal::pCaseCollator = NULL;
@@ -599,8 +599,8 @@ void ScGlobal::Init()
String aLanguage, aCountry;
ConvertLanguageToIsoNames( Application::GetSettings().GetLanguage(), aLanguage, aCountry );
pLocale = new ::com::sun::star::lang::Locale( aLanguage, aCountry, EMPTY_STRING );
- pCharClass = new CharClass( ::comphelper::getProcessServiceFactory(), *pLocale );
pSysLocale = new SvtSysLocale;
+ pCharClass = pSysLocale->GetCharClassPtr();
pCalendar = new CalendarWrapper( ::comphelper::getProcessServiceFactory() );
pCalendar->loadDefaultCalendar( *pLocale );
pCollator = new CollatorWrapper( ::comphelper::getProcessServiceFactory() );
@@ -710,8 +710,9 @@ void ScGlobal::Clear()
DELETEZ(pCaseCollator);
DELETEZ(pCollator);
DELETEZ(pCalendar);
+ //! do NOT delete pCharClass since it is a pointer to the single SvtSysLocale instance
+ pCharClass = NULL;
DELETEZ(pSysLocale);
- DELETEZ(pCharClass);
DELETEZ(pLocale);
DELETEZ(pScIntlWrapper);
DELETEZ(pStrClipDocName);