[Libreoffice-commits] core.git: basic/source
Tsutomu Uchino
hanya at apache.org
Thu Jan 8 08:51:50 PST 2015
basic/source/runtime/methods.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 340ca294d43f2c5b9fda1afbf178609a015f71e3
Author: Tsutomu Uchino <hanya at apache.org>
Date: Thu Jan 8 12:56:45 2015 +0000
Resolves: #i94895# fix illegal result of Replace runtime function
(cherry picked from commit a2700f75af61837033ff213607445cc1f74b36d6)
Conflicts:
basic/source/runtime/methods.cxx
Change-Id: If9c671a612de87d8d37bfc40704a97a6062fd150
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 7ccbab7..baa9603 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1405,7 +1405,7 @@ RTLFUNC(Replace)
if( nPos >= 0 )
{
aExpStr = aExpStr.replaceAt( nPos, nFindStrLen, aReplaceStr );
- nPos = nPos - nFindStrLen + nReplaceStrLen + 1;
+ nPos = nPos + nReplaceStrLen;
nCounts++;
}
else
@@ -1414,7 +1414,7 @@ RTLFUNC(Replace)
}
}
}
- rPar.Get(0)->PutString( aExpStr.copy( lStartPos - 1 ) );
+ rPar.Get(0)->PutString( aExpStr );
}
}
More information about the Libreoffice-commits
mailing list