diff options
author | Niklas Nebel <nn@openoffice.org> | 2010-09-17 19:32:15 +0200 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2010-09-17 19:32:15 +0200 |
commit | 3024512c90d8660d35d4824471c436d68aa62241 (patch) | |
tree | 42747d7c3256b4370380e51bbbbf6a222d583a36 /sc/source/ui/docshell/docfunc.cxx | |
parent | 446e15e12e10de5511435969d08b46c9b5203e22 (diff) |
mib19: #163664# text values for VBA range Value property must be parsed (always English)
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index adbe26abf157..02dbc7546a38 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -986,7 +986,7 @@ ScTokenArray* lcl_ScDocFunc_CreateTokenArrayXML( const String& rText, const Stri ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos, - const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) + const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar, short* pRetFormatType ) { ScDocument* pDoc = rDocShell.GetDocument(); ScBaseCell* pNewCell = NULL; @@ -1020,7 +1020,12 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos, sal_uInt32 nEnglish = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US); double fVal; if ( pFormatter->IsNumberFormat( rText, nEnglish, fVal ) ) + { pNewCell = new ScValueCell( fVal ); + // return the format type from the English format, so a localized format can be created + if ( pRetFormatType ) + *pRetFormatType = pFormatter->GetType( nEnglish ); + } else if ( rText.Len() ) pNewCell = ScBaseCell::CreateTextCell( rText, pDoc ); |