View | Details | Raw Unified | Return to issue 20496
Collapse All | Expand All

(-)sc/source/ui/view/tabvwsha.cxx (-1 / +38 lines)
Lines 497-503 void ScTabViewShell::ExecuteCellFormatDl Link Here
497
void ScTabViewShell::ExecuteInputDirect()
497
void ScTabViewShell::ExecuteInputDirect()
498
{
498
{
499
	ScModule* pScMod = SC_MOD();
499
	ScModule* pScMod = SC_MOD();
500
	if( !pScMod->IsFormulaMode() )
500
	BOOL bCallInputHandler = TRUE;
501
	
502
	if( pScMod->IsFormulaMode() )
503
	{
504
		ScInputHandler *pHdl = pScMod->GetInputHdl();
505
		String sString = pHdl->GetEditString();
506
		bCallInputHandler = FALSE;
507
508
		if(!pHdl->GetSelIsRef() && sString.Len() > 1)
509
		{
510
			switch(sString.GetChar(0))
511
			{
512
				case '+':
513
				case '-':
514
				case '=':
515
					{
516
						ScViewData *pViewData = GetViewData();
517
						ScDocument *pDoc = pViewData->GetDocument();
518
						ScAddress aPos(pViewData->GetCurPos());
519
						ScFormulaCell* pFCell = new ScFormulaCell( pDoc, aPos, sString );
520
						if(pFCell)
521
						{
522
							USHORT err = pFCell->GetErrCode();
523
							
524
							if(!(err == errUnknownToken || err == errParameterExpected))
525
								bCallInputHandler = TRUE;
526
527
							delete pFCell;
528
						}
529
					}
530
					break;
531
				default:
532
					break;
533
			}
534
		}
535
	}
536
537
	if(bCallInputHandler)
501
		pScMod->InputEnterHandler();
538
		pScMod->InputEnterHandler();
502
}
539
}
503
540

Return to issue 20496