summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/formula.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d6b40124aa65..ae44642e461b 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -655,14 +655,16 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree,SvTreeListEntry* pParent,Formu
{
pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_ERROR,0,_pToken);
}
-
- else if ( eOp<ocAdd || eOp>ocNegSub ) // not ideal coding
+ else if (!((SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP) ||
+ (SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP)))
{
+ // Not a binary or unary operator.
bCalcSubformula = true;
pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_FOLDER,0,_pToken);
}
else
{
+ /* TODO: question remains, why not sub calculate operators? */
pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_FOLDER,0,_pToken);
}
}