summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-31 21:50:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 15:37:26 +0100
commit652c7ca06db65bfc7138659ee4f89122548aee07 (patch)
tree2a8ff37101dc6627ac40a862d4fbb43281dda771
parent909fa34d46cf6c382180b56c5c8b58478b4337f0 (diff)
make this per-class instead of a local static
-rw-r--r--starmath/inc/parse.hxx3
-rw-r--r--starmath/source/parse.cxx6
2 files changed, 5 insertions, 4 deletions
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index cc17e951df28..7b1319d43bba 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -209,6 +209,9 @@ class SmParser
// map of used symbols (used to reduce file size by exporting only actually used symbols)
std::set< rtl::OUString > m_aUsedSymbols;
+ //! locale where '.' is decimal seperator!
+ ::com::sun::star::lang::Locale m_aDotLoc;
+
// declare copy-constructor and assignment-operator private
SmParser(const SmParser &);
SmParser & operator = (const SmParser &);
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 1aa56358693d..a3d23c4741b4 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -430,12 +430,9 @@ void SmParser::NextToken()
// (note that #i11752# remains fixed)
if ((aRes.TokenType & KParseType::IDENTNAME) && IsDigit( cFirstChar ))
{
- //! locale where '.' is decimal seperator!
- static lang::Locale aDotLoc( SvxCreateLocale( LANGUAGE_ENGLISH_US ) );
-
ParseResult aTmpRes;
lang::Locale aOldLoc( aCC.getLocale() );
- aCC.setLocale( aDotLoc );
+ aCC.setLocale( m_aDotLoc );
aTmpRes = aCC.parsePredefinedToken(
KParseType::ASC_NUMBER,
m_aBufferString, m_nBufferIndex,
@@ -2396,6 +2393,7 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
+ : m_aDotLoc( SvxCreateLocale( LANGUAGE_ENGLISH_US ) )
{
m_eConversion = CONVERT_NONE;
bImportSymNames = m_bExportSymNames = false;