[Libreoffice-commits] core.git: basic/qa basic/source

Tsutomu Uchino hanya at apache.org
Sun Jan 11 12:46:28 PST 2015


 basic/qa/vba_tests/replace.vb    |    2 +-
 basic/source/runtime/methods.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bf964151a77d8f63dac031fec5800a7bb43b3e5b
Author: Tsutomu Uchino <hanya at apache.org>
Date:   Sun Jan 11 02:53:26 2015 +0000

    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

diff --git a/basic/qa/vba_tests/replace.vb b/basic/qa/vba_tests/replace.vb
index bd4817b..e04cde0 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 baa9603..113f94d 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 )  );
     }
 }
 


More information about the Libreoffice-commits mailing list