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

(-)sc/source/ui/view/tabvwsha.cxx (-1 / +37 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 bFormulaMode = FALSE;
501
	
502
	if( pScMod->IsFormulaMode() )
503
	{
504
		ScInputHandler *pHdl = pScMod->GetInputHdl();
505
		String sString = pHdl->GetEditString();
506
		bFormulaMode = TRUE;
507
508
		if(!pHdl->GetSelIsRef() && sString.Len() > 1)
509
		{
510
			switch(sString.GetChar(0))
511
			{
512
				case '=':
513
				case '+':
514
				case '-':
515
					switch(sString.GetChar(sString.Len()-1))
516
					{
517
						case '+':case '-':case '*':case '/':
518
						case '>':case '<':case '=':case '.':
519
						case ':':case '(':case '[':case '|':
520
						case '{':case '!':case '@':case '%':
521
						case '^':case '&':case ',':case '\'':
522
						case '"':case ';':case '`':case '$':
523
						case '_':case '#':
524
							break;
525
						default:
526
							bFormulaMode = FALSE;
527
							break;
528
					}
529
					break;
530
				default:
531
					break;
532
			}
533
		}
534
	}
535
536
	if(!bFormulaMode)
501
		pScMod->InputEnterHandler();
537
		pScMod->InputEnterHandler();
502
}
538
}
503
539

Return to issue 20496