diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-15 10:46:14 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-15 10:46:14 +0000 |
commit | 23337b9a2d42b6ce33cd5d3a09e7c09e2a0effdc (patch) | |
tree | 6a6e30ff3299a1fcca44bf253e93bbcb430b91ad /formula | |
parent | ea4f54c117c5d1a85102697d56588a881b0009bc (diff) |
CWS-TOOLING: integrate CWS calc50
2009-05-28 12:32:46 +0200 nn r272399 : gcc warning
2009-05-28 10:56:48 +0200 nn r272382 : CWS-TOOLING: rebase CWS calc50 to trunk@272291 (milestone: DEV300:m49)
2009-05-27 14:24:52 +0200 nn r272343 : #i50825# DataPilotUpdate: prevent overwriting source data above the table
2009-05-26 18:29:21 +0200 nn r272316 : #i50019# allow borders for multiple cell ranges
2009-05-26 13:43:36 +0200 nn r272300 : #i101960# UpdateExternalRefLinks: set document modified
2009-05-25 18:01:23 +0200 nn r272267 : #i102056# copied from CWS calc311fixes
2009-05-20 12:24:22 +0200 nn r272114 : #i59672# ExecFilter/SC_AUTOFILTER_CUSTOM: select database range (patch from gaozm)
2009-05-15 18:24:44 +0200 nn r271961 : #i100544# correct ScTokenConversion::ConvertToTokenArray
2009-05-13 17:45:02 +0200 nn r271866 : #i101869# DeleteRange: before broadcasting, check if EndListening removed the note cells
2009-05-13 12:43:31 +0200 nn r271856 : #i101806# correct reference undo for inserting/deleting columns/rows across sheets
2009-05-11 18:44:46 +0200 nn r271783 : #i101725# don't copy hash_set with pointers from the other collection
2009-05-11 17:54:21 +0200 nn r271780 : #i101690# correct merge error in frmdlg integration
2009-05-07 15:28:55 +0200 nn r271674 : #i96940# check for negative count in fillAuto
2009-05-07 13:47:58 +0200 nn r271661 : #i101512# SetCompileForFAP is in formula::FormulaCompiler
2009-05-07 13:47:27 +0200 nn r271660 : #i101512# use SetCompileForFAP for CompileTokenArray
2009-05-05 18:47:03 +0200 nn r271551 : #i73074# RepeatDB: re-evaluate advanced filter source range
2009-05-05 18:23:21 +0200 nn r271546 : #i97857# use GetInputString for direct reference as validity range source
2009-05-05 17:38:23 +0200 nn r271538 : #i95834# better enable/disable handling of next/previous buttons (patch by cmc)
Diffstat (limited to 'formula')
-rw-r--r-- | formula/inc/formula/FormulaCompiler.hxx | 3 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 25 |
2 files changed, 19 insertions, 9 deletions
diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx index 1fc77e2db01e..009e5df7dfb7 100644 --- a/formula/inc/formula/FormulaCompiler.hxx +++ b/formula/inc/formula/FormulaCompiler.hxx @@ -219,6 +219,9 @@ public: */ OpCode GetEnglishOpCode( const String& rName ) const; + void SetCompileForFAP( BOOL bVal ) + { bCompileForFAP = bVal; bIgnoreErrors = bVal; } + static BOOL DeQuote( String& rStr ); static const String& GetNativeSymbol( OpCode eOp ); diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 004f2f03cee4..ed9337c4762e 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -132,7 +132,7 @@ namespace formula void UpdateFunctionDesc(); void ResizeArgArr( const IFunctionDescription* pNewFunc ); void FillListboxes(); - void FillControls(); + void FillControls(BOOL &rbNext, BOOL &rbPrev); FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate); void SetMeText(const String& _sText); @@ -675,8 +675,10 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvLBoxEntry* pParent,Formul long nParas = _pToken->GetParamCount(); OpCode eOp = _pToken->GetOpCode(); + // #i101512# for output, the original token is needed + FormulaToken* pOrigToken = (_pToken->GetType() == svFAP) ? _pToken->GetFAPOrigToken() : _pToken; uno::Sequence<sheet::FormulaToken> aArgs(1); - aArgs[0] = m_aTokenMap.find(_pToken)->second; + aArgs[0] = m_aTokenMap.find(pOrigToken)->second; try { const String aResult = m_pHelper->getFormulaParser()->printFormula(aArgs); @@ -766,14 +768,21 @@ void FormulaDlg_Impl::UpdateTokenArray( const String& rStrExp) } // if ( pTokens && nLen == m_aTokenList.getLength() ) FormulaCompiler aCompiler(*m_pTokenArray.get()); + aCompiler.SetCompileForFAP(TRUE); // #i101512# special handling is needed aCompiler.CompileTokenArray(); } void FormulaDlg_Impl::FillDialog(BOOL nFlag) { - if ( nFlag ) - FillControls(); + BOOL bNext=TRUE, bPrev=TRUE; + if(nFlag) + FillControls(bNext, bPrev); FillListboxes(); + if(nFlag) + { + aBtnBackward.Enable(bPrev); + aBtnForward.Enable(bNext); + } String aStrResult; @@ -821,7 +830,7 @@ void FormulaDlg_Impl::FillListboxes() m_pParent->SetUniqueId( nOldUnique ); } // ----------------------------------------------------------------------------- -void FormulaDlg_Impl::FillControls() +void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) { // Umschalten zwischen den "Seiten" FormEditData* pData = m_pHelper->getFormEditData(); @@ -917,12 +926,10 @@ void FormulaDlg_Impl::FillControls() // Test, ob vorne/hinten noch mehr Funktionen sind xub_StrLen nTempStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); - BOOL bNext = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nTempStart ); + rbNext = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nTempStart ); nTempStart=(xub_StrLen)pMEdit->GetSelection().Min(); pData->SetFStart(nTempStart); - BOOL bPrev = m_aFormulaHelper.GetNextFunc( aFormula, TRUE, nTempStart ); - aBtnBackward.Enable(bPrev); - aBtnForward.Enable(bNext); + rbPrev = m_aFormulaHelper.GetNextFunc( aFormula, TRUE, nTempStart ); } // ----------------------------------------------------------------------------- |