diff options
author | jp <jp@openoffice.org> | 2001-07-06 12:02:49 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-07-06 12:02:49 +0000 |
commit | 3a578758c2dde0e2cc60417c4b1edf3bf4207063 (patch) | |
tree | 6f64fe9bd8e4784c1f18847e420b6fd6e375e16f | |
parent | 27b6990cc1b8dd7be32499db6252c88cd0317e21 (diff) |
changes for remove GetAppInternational
-rw-r--r-- | starmath/inc/smmod.hxx | 14 | ||||
-rw-r--r-- | starmath/source/parse.cxx | 19 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 21 |
3 files changed, 34 insertions, 20 deletions
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 42aad1b48388..38257ad2b71d 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -2,9 +2,9 @@ * * $RCSfile: smmod.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tl $ $Date: 2001-05-02 16:58:48 $ + * last change: $Author: jp $ $Date: 2001-07-06 13:02:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,13 +87,16 @@ class SmModule; \************************************************************************/ class SmRectCache; +class SvtSysLocale; class SmModule : public SmModuleDummy { SmConfig *pConfig; SmRectCache *pRectCache; + SvtSysLocale *pSysLocale; virtual void FillStatusBar(StatusBar &rBar); + void _CreateSysLocale() const; public: TYPEINFO(); @@ -110,6 +113,13 @@ public: void GetState(SfxItemSet&); + const SvtSysLocale& GetSysLocale() const + { + if( !pSysLocale ) + _CreateSysLocale(); + return *pSysLocale; + } + //virtuelle Methoden fuer den Optionendialog virtual SfxItemSet* CreateItemSet( USHORT nId ); virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet ); diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 7acb7053ea38..2f5f924277f7 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2,9 +2,9 @@ * * $RCSfile: parse.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: tl $ $Date: 2001-06-05 08:25:33 $ + * last change: $Author: jp $ $Date: 2001-07-06 13:02:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,6 +76,9 @@ #ifndef _UNO_LINGU_HXX #include <svx/unolingu.hxx> #endif +#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX +#include <svtools/syslocale.hxx> +#endif #ifndef PARSE_HXX #include "parse.hxx" @@ -408,14 +411,6 @@ static const SmTokenTableEntry * GetTokenTableEntry( const String &rName ) /////////////////////////////////////////////////////////////////////////// -static CharClass& GetCharClass() -{ - static CharClass aCharClass( SvxCreateLocale( - Application::GetAppInternational().GetLanguage() ) ); - return aCharClass; -} - - BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos ) // returns 'TRUE' iff cChar is '\0' or a delimeter { @@ -433,7 +428,7 @@ BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos ) BOOL bIsDelim = *pDelim != 0; - INT16 nTypJp = ::GetCharClass().getType( rTxt, nPos ); + INT16 nTypJp = SM_MOD1()->GetSysLocale().GetCharClass().getType( rTxt, nPos ); bIsDelim |= nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR || nTypJp == com::sun::star::i18n::UnicodeType::CONTROL; @@ -468,7 +463,7 @@ void SmParser::NextToken() ParseResult aRes; xub_StrLen nRealStart; BOOL bCont; - CharClass& rCC = ::GetCharClass(); + const CharClass& rCC = SM_MOD1()->GetSysLocale().GetCharClass(); do { //?? does parseAnyToken handles Japanese (CJK) spaces correct ?? diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 9f987208619f..f96c675d2501 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -2,9 +2,9 @@ * * $RCSfile: smmod.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tl $ $Date: 2001-05-02 16:58:48 $ + * last change: $Author: jp $ $Date: 2001-07-06 13:02:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -98,6 +98,9 @@ #ifndef _SV_MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif +#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX +#include <svtools/syslocale.hxx> +#endif #ifndef _SMMOD_HXX #include "smmod.hxx" @@ -126,12 +129,12 @@ SFX_IMPL_INTERFACE(SmModule, SfxModule, SmResId(RID_APPLICATION)) SmModule::SmModule(SvFactory* pObjFact) : - SmModuleDummy(SFX_APP()->CreateResManager("sm"), FALSE, pObjFact) + SmModuleDummy(SFX_APP()->CreateResManager("sm"), FALSE, pObjFact), + pConfig( 0 ), + pRectCache( new SmRectCache ), + pSysLocale( 0 ) { SetName( C2S("StarMath" )); - - pConfig = 0; - pRectCache = new SmRectCache; } @@ -139,8 +142,14 @@ SmModule::~SmModule() { delete pConfig; delete pRectCache; + delete pSysLocale; } +void SmModule::_CreateSysLocale() const +{ + SmModule* pThis = (SmModule*)this; + pThis->pSysLocale = new SvtSysLocale; +} SmConfig * SmModule::GetConfig() { |