summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docfunc.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-23 10:01:58 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-23 10:01:58 +0100
commit74dfed04ee929e2e67510842bb1f7d07880e4948 (patch)
tree7e695a03aee1e8dfeb909d6f372d9b84126141e4 /sc/source/ui/docshell/docfunc.cxx
parentfa47896d1aa97f7b796cdfe51f62b8398f767423 (diff)
parente0cef95bab1bd41fce1f08be9d6a2fed71f16944 (diff)
undoapi: merged after pulling DEV300_m96. Most probably still not buildable:A number of changes which happened in the CWS need to be redone due to the new build system
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index ba5b040d1cd8..fddb687abd55 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -851,13 +851,13 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi
return TRUE;
}
-void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
+void ScDocFunc::NotifyInputHandler( const ScAddress& rPos )
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh && pViewSh->GetViewData()->GetDocShell() == &rDocShell )
{
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
- if ( pInputHdl )
+ if ( pInputHdl && pInputHdl->GetCursorPos() == rPos )
{
sal_Bool bIsEditMode(pInputHdl->IsEditMode());
@@ -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 );
@@ -2648,8 +2653,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
if ( xVBAModuleInfo.is() )
{
- String sCodeName( genModuleName );
- rDoc.SetCodeName( nTab, sCodeName );
+ rDoc.SetCodeName( nTab, genModuleName );
script::ModuleInfo sModuleInfo = lcl_InitModuleInfo( rDocSh, genModuleName );
xVBAModuleInfo->insertModuleInfo( genModuleName, sModuleInfo );
xLib->insertByName( genModuleName, aSourceAny );