diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-24 18:34:24 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-24 18:34:24 +0000 |
commit | cad6150eabde5d454ccb48a7e759a420fb989480 (patch) | |
tree | b4b0d8d0424a10bf4c87f3dafaf24f213340778d /formula | |
parent | c8ea02049373f99ec30758ef3e8a09049c0af6c1 (diff) |
CWS-TOOLING: integrate CWS dba31m_DEV300
2009-04-08 21:06:02 +0200 fs r270660 : #i100956# hold the assigned events in the ModelImpl, not in the DatabaseDocument, so they survive the model being destroyed
2009-04-08 12:40:13 +0200 b_michaelsen r270635 : #i100928# Opening the Tools->Options->Improvement Program Tabpage on first start accidently activates Usage Tracking
2009-04-07 12:56:29 +0200 fs r270594 : #i100866# don't call into the StatusIndicator with our mutex locked
2009-04-07 10:31:02 +0200 fs r270581 : #i100866# impl_import_throw -> impl_import_nolck_throw
2009-04-06 22:53:10 +0200 fs r270575 : #i100866# some more mutex lock tweaking
2009-04-06 22:01:51 +0200 fs r270573 : #i100861# load the Show/Hide strings from the proper (an existing, in particular) resource
2009-04-06 12:43:16 +0200 fs r270537 : #i100866# notifyEvent: instantiate the ScriptDocument only when required.
2009-04-06 12:42:03 +0200 fs r270536 : #i100866#
rework how and when it is determined whether the DBDoc or sub documents contain
scripts/macros. In particular, cache this information in the ODatabaseDocument
implementation, so that queryInterface does not need to lock the mutex
2009-04-03 10:21:02 +0200 oj r270465 : #i100789# surround uno call with try catch
2009-04-03 09:18:37 +0200 oj r270453 : #i100789# check token is not null
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 73 |
1 files changed, 44 insertions, 29 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index a2a46b74f3a6..004f2f03cee4 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -53,6 +53,7 @@ #include <unotools/charclass.hxx> #include <tools/urlobj.hxx> +#include <tools/diagnose_ex.h> #include "formdlgs.hrc" #include "funcpage.hxx" @@ -676,49 +677,56 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvLBoxEntry* pParent,Formul uno::Sequence<sheet::FormulaToken> aArgs(1); aArgs[0] = m_aTokenMap.find(_pToken)->second; - const String aResult = m_pHelper->getFormulaParser()->printFormula(aArgs); - - if ( nParas > 0 ) + try { - SvLBoxEntry* pEntry; + const String aResult = m_pHelper->getFormulaParser()->printFormula(aArgs); - String aTest=_pTree->GetEntryText(pParent); - - if(aTest==aResult && - (eOp==ocAdd || eOp==ocMul || - eOp==ocAmpersand)) + if ( nParas > 0 ) { - pEntry=pParent; + SvLBoxEntry* pEntry; + + String aTest=_pTree->GetEntryText(pParent); + + if(aTest==aResult && + (eOp==ocAdd || eOp==ocMul || + eOp==ocAmpersand)) + { + pEntry=pParent; + } + else + { + if(eOp==ocBad) + { + pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_ERROR,0,_pToken); + } + else + { + pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_FOLDER,0,_pToken); + } + } + + MakeTree(_pTree,pEntry,m_pTokenArray->PrevRPN(),nParas); + --Count; + m_pTokenArray->NextRPN(); + MakeTree(_pTree,pParent,m_pTokenArray->PrevRPN(),Count); } else { if(eOp==ocBad) { - pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_ERROR,0,_pToken); + _pTree->InsertEntry(aResult,pParent,STRUCT_ERROR,0,_pToken); } else { - pEntry=_pTree->InsertEntry(aResult,pParent,STRUCT_FOLDER,0,_pToken); + _pTree->InsertEntry(aResult,pParent,STRUCT_END,0,_pToken); } + --Count; + MakeTree(_pTree,pParent,m_pTokenArray->PrevRPN(),Count); } - - MakeTree(_pTree,pEntry,m_pTokenArray->PrevRPN(),nParas); - --Count; - m_pTokenArray->NextRPN(); - MakeTree(_pTree,pParent,m_pTokenArray->PrevRPN(),Count); } - else + catch(uno::Exception&) { - if(eOp==ocBad) - { - _pTree->InsertEntry(aResult,pParent,STRUCT_ERROR,0,_pToken); - } - else - { - _pTree->InsertEntry(aResult,pParent,STRUCT_END,0,_pToken); - } - --Count; - MakeTree(_pTree,pParent,m_pTokenArray->PrevRPN(),Count); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -737,7 +745,14 @@ void FormulaDlg_Impl::UpdateTokenArray( const String& rStrExp) { m_aTokenMap.clear(); m_aTokenList.realloc(0); - m_aTokenList = m_pHelper->getFormulaParser()->parseFormula(rStrExp); + try + { + m_aTokenList = m_pHelper->getFormulaParser()->parseFormula(rStrExp); + } + catch(const uno::Exception&) + { + DBG_UNHANDLED_EXCEPTION(); + } GetFormulaOpCodeMapper(); // just to get it initialized m_pTokenArray = m_pHelper->convertToTokenArray(m_aTokenList); const sal_Int32 nLen = static_cast<sal_Int32>(m_pTokenArray->GetLen()); |