diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-09 05:29:14 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-14 18:09:33 +0200 |
commit | 153fad53d04729432408f2eeba80c84f7531049e (patch) | |
tree | bbb455e7a3bc112bb6b0bbaeeee38fe40f049088 | |
parent | 1d4e66a79453f7b020a3dcea328c03637407add9 (diff) |
revert accidently commited code
Change-Id: I3158762e7da10eacaf2616a7d868531ad7fa7a51
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index b89b3b0d6c36..a7ea722cd0f4 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -272,26 +272,6 @@ ScFormatEntry* ScConditionFrmtEntry::createConditionEntry() const return pEntry; } -namespace { - -bool containsOnlyColumnLabel(Edit* pEdit, ScTokenArray* pArr) -{ - formula::FormulaToken* token = pArr->First(); - formula::StackVar t = token->GetType(); - OpCode op = token->GetOpCode(); - if( ( op == ocColRowName ) || - ( ( op == ocBad ) && ( t == formula::svString ) ) - ) - { - pEdit->SetControlBackground(COL_YELLOW); - return true; - } - - return false; -} - -} - IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit*, pEdit) { OUString aFormula = pEdit->GetText(); @@ -315,27 +295,14 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit*, pEdit) } // Recognized col/row name or string token, warn the user - bool bContainsColumnLabel = containsOnlyColumnLabel(pEdit, ta.get());; - if (!bContainsColumnLabel) - { - ScCompiler aComp2( mpDoc, maPos ); - aComp2.SetGrammar( mpDoc->GetGrammar() ); - if (&maEdVal1 == pEdit) - { - OUString aFormula2 = maEdVal2.GetText(); - boost::scoped_ptr<ScTokenArray> pArr2(aComp2.CompileString(aFormula2)); - bContainsColumnLabel = containsOnlyColumnLabel(&maEdVal2, pArr2.get()); - } - else - { - OUString aFormula1 = maEdVal1.GetText(); - boost::scoped_ptr<ScTokenArray> pArr1(aComp2.CompileString(aFormula1)); - bContainsColumnLabel = containsOnlyColumnLabel(&maEdVal1, pArr1.get()); - } - } - - if (bContainsColumnLabel) + formula::FormulaToken* token = ta->First(); + formula::StackVar t = token->GetType(); + OpCode op = token->GetOpCode(); + if( ( op == ocColRowName ) || + ( ( op == ocBad ) && ( t == formula::svString ) ) + ) { + pEdit->SetControlBackground(COL_YELLOW); maFtVal.SetText(ScGlobal::GetRscString(STR_UNQUOTED_STRING)); return 0; } |