summaryrefslogtreecommitdiff
path: root/sc/source/ui/formdlg
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-04 14:52:20 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-04 14:52:20 -0400
commit3f797070135b67d0bebb58d78f7fc167b2347b78 (patch)
tree5dfa351d9ee119f8b5656a0fb91b50eb0ec61ef2 /sc/source/ui/formdlg
parentcb884d1bdfa3b5b3920fdd41b40f166ad9d47e33 (diff)
Ported calc-formula-r1c1-ui-fix.diff from ooo-build.
This fixes incorrect display of cell addresses in the UI when the formula syntax mode is Excel R1C1.
Diffstat (limited to 'sc/source/ui/formdlg')
-rw-r--r--sc/source/ui/formdlg/formula.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 2d9cdef1b54e..25971594f116 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -452,10 +452,15 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
}
else
{
- USHORT nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() )
- ? SCA_VALID
- : SCA_VALID | SCA_TAB_3D;
- rRef.Format( aRefStr, nFmt, pRefDoc, pRefDoc->GetAddressConvention() );
+ ScTokenArray aArray;
+ ScComplexRefData aRefData;
+ aRefData.InitRangeRel(rRef, aCursorPos);
+ aArray.AddDoubleReference(aRefData);
+ ScCompiler aComp(pDoc, aCursorPos, aArray);
+ aComp.SetGrammar(pDoc->GetGrammar());
+ ::rtl::OUStringBuffer aBuf;
+ aComp.CreateStringFromTokenArray(aBuf);
+ aRefStr = aBuf.makeStringAndClear();
}
UpdateParaWin(theSel,aRefStr);