diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-09-03 10:25:24 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-09-03 10:29:24 +0400 |
commit | 03737426620f570e33b93f92a4bd4e4b6d2deba3 (patch) | |
tree | 1eba30c02f0e42e86df24ac1e750fab05bc72105 /editeng | |
parent | a5e59d4509b145f02993d85fa6de9afd5bf8a122 (diff) |
fix string conversion
regression from 710f41b7aec8e7d35a0da8be332aa289f98942af
Change-Id: I7c5e41294e072eceb036a24397fbb899a568587c
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index e746a14fe674..946391bbf01e 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -127,7 +127,10 @@ EditPaM ImpEditEngine::ReadText( SvStream& rInput, EditSelection aSel ) bool bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() ); while ( bDone ) { - aTmpStr = aTmpStr.copy(0, MAXCHARSINPARA ); + if (aTmpStr.getLength() > MAXCHARSINPARA) + { + aTmpStr = aTmpStr.copy(0, MAXCHARSINPARA); + } aPaM = ImpInsertText( EditSelection( aPaM, aPaM ), aTmpStr ); aPaM = ImpInsertParaBreak( aPaM ); bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() ); |