summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomofumi Yagi <yagit@mknada.sakura.ne.jp>2013-04-30 14:17:54 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-04-30 14:20:46 -0400
commitd715b40442bbe007a59c6c305fa42896704dbe2c (patch)
tree8b73fdbe3f85fae9bafc4717fdf9c931e5965d9c /sc
parenta514c72071a4e572bb712f78b8b119ed0b2eb6b2 (diff)
Fix erroneous reference conversion.
Type '=A1+2', move the cursor over the 'A1', then press Shift-F4. It's supposed to convert A1 to $A$1, but it changes it to $A$11 instead. This commit fixes that bug. Change-Id: Ia41c0617c5a93ad4a153dc4c84cd7db9e2b928f1
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/reffind.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 6a424305acbd..8b5b863b8e8f 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -291,7 +291,7 @@ void ScRefFinder::ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos )
OUString aTotal = maFormula.copy(0, nStartPos);
aTotal += aResult;
if (nEndPos < maFormula.getLength()-1)
- aTotal += maFormula.copy(nEndPos);
+ aTotal += maFormula.copy(nEndPos+1);
maFormula = aTotal;
}