summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTsutomu Uchino <hanya@apache.org>2015-01-11 02:53:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-11 20:45:28 +0000
commitbf964151a77d8f63dac031fec5800a7bb43b3e5b (patch)
treec1bd82d0e37a7c4127ba03691fb1bd9c6100c311 /basic
parent5e6a4591d31619f9bf32a9891c59a6dcc3af80b5 (diff)
Related: #i94895# revert the part of revision 1650261
replaced string should be starting with the start postion if specified (cherry picked from commit 68c6265584fb6cb0469098507dd287e6e1127324) Conflicts: basic/source/runtime/methods.cxx Change-Id: Ib729facfa78ffddebc258440324f05d037fae46f
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/vba_tests/replace.vb2
-rw-r--r--basic/source/runtime/methods.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/qa/vba_tests/replace.vb b/basic/qa/vba_tests/replace.vb
index bd4817b1e455..e04cde058eb2 100644
--- a/basic/qa/vba_tests/replace.vb
+++ b/basic/qa/vba_tests/replace.vb
@@ -37,7 +37,7 @@ Function verify_testReplace() as String
retStr = Replace(srcStr, destStr, repStr, compare:=vbTextCompare)
TestLog_ASSERT retStr = "aefefdef", "text compare:" & retStr
retStr = Replace(srcStr, destStr, repStr, 3, -1, vbBinaryCompare)
- TestLog_ASSERT retStr = "abcefdBc", "start = 3:" & retStr
+ TestLog_ASSERT retStr = "cefdBc", "start = 3:" & retStr
retStr = Replace(srcStr, destStr, repStr, 1, 2, vbBinaryCompare)
TestLog_ASSERT retStr = "aefefdBc", "count = 2: " & retStr
retStr = Replace(srcStr, destStr, repStr, 1, 0, vbBinaryCompare)
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index baa9603afbae..113f94d27de3 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1414,7 +1414,7 @@ RTLFUNC(Replace)
}
}
}
- rPar.Get(0)->PutString( aExpStr );
+ rPar.Get(0)->PutString( aExpStr.copy( lStartPos - 1 ) );
}
}