From d715b40442bbe007a59c6c305fa42896704dbe2c Mon Sep 17 00:00:00 2001 From: Tomofumi Yagi Date: Tue, 30 Apr 2013 14:17:54 -0400 Subject: 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 --- sc/source/core/tool/reffind.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc') 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; } -- cgit