Author: hanya Date: Sat Jan 11 09:17:58 2014 New Revision: 1557329 URL: http://svn.apache.org/r1557329 Log: #i106665# fix failed to replace with empty string on text view
Modified: openoffice/trunk/main/svtools/source/edit/textview.cxx Modified: openoffice/trunk/main/svtools/source/edit/textview.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/edit/textview.cxx?rev=1557329&r1=1557328&r2=1557329&view=diff ============================================================================== --- openoffice/trunk/main/svtools/source/edit/textview.cxx (original) +++ openoffice/trunk/main/svtools/source/edit/textview.cxx Sat Jan 11 09:17:58 2014 @@ -1378,7 +1378,7 @@ void TextView::InsertNewText( const rtl: */ sal_Int32 nLen = rStr.getLength(); sal_Int32 nPos = 0; - while( nLen ) + do { sal_Int32 nChunkLen = nLen > 65534 ? 65534 : nLen; String aChunk( rStr.copy( nPos, nChunkLen ) ); @@ -1400,7 +1400,7 @@ void TextView::InsertNewText( const rtl: ImpSetSelection( aNewSel ); nLen -= nChunkLen; nPos += nChunkLen; - } + } while( nLen ); mpImpl->mpTextEngine->UndoActionEnd(); mpImpl->mpTextEngine->FormatAndUpdate( this );