diff options
author | Eike Rathke <erack@redhat.com> | 2017-07-05 16:05:38 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-07-05 16:06:31 +0200 |
commit | eda1190de3f7cdd9abeb0a31fb3b2791ce418aab (patch) | |
tree | 4f8056acc2e21343ae183ffae121a449dcedfd7f /formula/source | |
parent | 98a223246a91ac54991efdaa953cf6694f03c897 (diff) |
Replace a "not ideal coding" ...
... with what was actually meant (worked though).
Change-Id: Ie7fb5f25bc45e8c224f0cc5853a45fc6e1574f3c
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 6 |
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); } } |