[Libreoffice-commits] core.git: editeng/source
Caolán McNamara
caolanm at redhat.com
Wed Oct 26 20:24:24 UTC 2016
editeng/source/accessibility/AccessibleEditableTextPara.cxx | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 424c7fb6cadd726480f01354c25bf4d01a685635
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 26 21:23:16 2016 +0100
we don't need ree after the loop here
Change-Id: Ib288ab3a7abf8f45c1175c36dcd4349dc4ad019f
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 0faf064..b887715 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1617,11 +1617,10 @@ namespace accessibility
SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
sal_Int32 nAllFieldLen = 0;
sal_Int32 nField = rCacheTF.GetFieldCount(nParaIndex), nFoundFieldIndex = -1;
- EFieldInfo ree;
sal_Int32 reeBegin=0, reeEnd=0;
- for (sal_Int32 j = 0; j < nField; j++)
+ for (sal_Int32 j = 0; j < nField; ++j)
{
- ree = rCacheTF.GetFieldInfo(nParaIndex, j);
+ EFieldInfo ree = rCacheTF.GetFieldInfo(nParaIndex, j);
reeBegin = ree.aPosition.nIndex + nAllFieldLen;
reeEnd = reeBegin + ree.aCurrentText.getLength();
nAllFieldLen += (ree.aCurrentText.getLength() - 1);
@@ -1655,11 +1654,10 @@ namespace accessibility
SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
sal_Int32 nAllFieldLen = 0;
sal_Int32 nField = rCacheTF.GetFieldCount(nParaIndex), nFoundFieldIndex = -1;
- EFieldInfo ree;
sal_Int32 reeBegin=0, reeEnd=0;
- for (sal_Int32 j = 0; j < nField; j++)
+ for (sal_Int32 j = 0; j < nField; ++j)
{
- ree = rCacheTF.GetFieldInfo(nParaIndex, j);
+ EFieldInfo ree = rCacheTF.GetFieldInfo(nParaIndex, j);
reeBegin = ree.aPosition.nIndex + nAllFieldLen;
reeEnd = reeBegin + ree.aCurrentText.getLength();
nAllFieldLen += (ree.aCurrentText.getLength() - 1);
More information about the Libreoffice-commits
mailing list