summaryrefslogtreecommitdiff
path: root/sc/source/ui/formdlg/formula.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-05-14 08:58:05 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-05-14 08:58:05 +0000
commitf25928188dac38349e54b9f48ef5ebea16158fdb (patch)
treecd755fc7c8b81aa805dacbd99c7c97d0233fa578 /sc/source/ui/formdlg/formula.cxx
parent81c7de82653d935a4a65d9c075bcaeb7697873e0 (diff)
INTEGRATION: CWS koheiformula01 (1.17.12); FILE MERGED
2008/04/23 15:08:58 kohei 1.17.12.5: RESYNC: (1.17-1.18); FILE MERGED 2008/03/20 23:20:27 kohei 1.17.12.4: Use the current address convention everywhere instead of always using the OOo convention. 2008/03/19 17:37:13 kohei 1.17.12.3: changed a lot of places to prepare for a single global grammar value that applies to all places where formulas are used. 2008/03/18 23:14:33 kohei 1.17.12.2: switched to putting the separators into mxSymbolsNative and put everything else back to the way it was. 2008/03/14 01:06:13 kohei 1.17.12.1: initial commit from the ooo-build patch with lots of build breakages fixed.
Diffstat (limited to 'sc/source/ui/formdlg/formula.cxx')
-rw-r--r--sc/source/ui/formdlg/formula.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 5bdc3546ec37..6b2f3f282e79 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formula.cxx,v $
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
* This file is part of OpenOffice.org.
*
@@ -223,7 +223,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
aMEFormula.UpdateOldSel();
pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp );
- pComp=new ScCompiler( pDoc, aCursorPos );
+ pComp=new ScCompiler( pDoc, aCursorPos, pDoc->GetGrammar() );
pComp->SetCompileForFAP(TRUE);
UpdateTokenArray(pMEdit->GetText());
FormulaCursorHdl(&aMEFormula);
@@ -346,7 +346,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
pData->SetMode( (USHORT) eMode );
rStrExp=pMEdit->GetText();
pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp );
- pComp=new ScCompiler( pDoc, aCursorPos );
+ pComp=new ScCompiler( pDoc, aCursorPos, pDoc->GetGrammar() );
pComp->SetCompileForFAP(TRUE);
CalcStruct(rStrExp);
FillDialog();
@@ -1065,8 +1065,6 @@ BOOL ScFormulaDlg::CalcValue( const String& rStrExp, String& rStrResult )
{
ScFormulaCell* pFCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp );
- ScCompiler* pCompi=new ScCompiler( pDoc, aCursorPos, *(pFCell->GetCode()));
-
// #35521# HACK! um bei ColRowNames kein #REF! zu bekommen,
// wenn ein Name eigentlich als Bereich in die Gesamt-Formel
// eingefuegt wird, bei der Einzeldarstellung aber als
@@ -1126,7 +1124,6 @@ BOOL ScFormulaDlg::CalcValue( const String& rStrExp, String& rStrResult )
}
delete pFCell;
- delete pCompi;
}
else
bResult = FALSE;
@@ -1523,7 +1520,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
USHORT nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() )
? SCA_VALID
: SCA_VALID | SCA_TAB_3D;
- rRef.Format( aRefStr, nFmt, pRefDoc );
+ rRef.Format( aRefStr, nFmt, pRefDoc, pRefDoc->GetAddressConvention() );
}
aEdRef.ReplaceSelected( aRefStr );
@@ -1645,6 +1642,8 @@ void ScFormulaDlg::UpdateTokenArray( const String& rStrExp)
xub_StrLen ScFormulaDlg::GetFunctionPos(xub_StrLen nPos)
{
+ const sal_Unicode sep = ScCompiler::GetStringFromOpCode(ocSep).GetChar(0);
+
xub_StrLen nTokPos=1;
xub_StrLen nOldTokPos=1;
xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testweise
@@ -1670,7 +1669,7 @@ xub_StrLen ScFormulaDlg::GetFunctionPos(xub_StrLen nPos)
if(eOp==ocPush || eOp==ocSpaces)
{
- xub_StrLen n1=aFormString.Search(';',nTokPos);
+ xub_StrLen n1=aFormString.Search(sep, nTokPos);
xub_StrLen n2=aFormString.Search(')',nTokPos);
xub_StrLen nXXX=nTokPos;
if(n1<n2)