This patch solves https://bugs.freedesktop.org/show_bug.cgi?id=40152 .

Uray M. János
From d10f4ddea22d332fee1a642d076bbce25ac4b10a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Uray=20M.=20J=C3=A1nos"?= <uray.ja...@gmail.com>
Date: Wed, 25 Jul 2012 09:42:12 +0200
Subject: [PATCH] fdo#40152 replace with empty string in Basic IDE

Change-Id: I2ee41160e5cb10694ccdb5a1cdaf7d4abfeb23bb
---
 svtools/source/edit/textview.cxx |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx
index 1b62541..5d6d988 100644
--- a/svtools/source/edit/textview.cxx
+++ b/svtools/source/edit/textview.cxx
@@ -1369,7 +1369,7 @@ void TextView::InsertNewText( const rtl::OUString& rStr, sal_Bool bSelect )
     */
     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 ) );
@@ -1392,6 +1392,8 @@ void TextView::InsertNewText( const rtl::OUString& rStr, sal_Bool bSelect )
         nLen -= nChunkLen;
         nPos += nChunkLen;
     }
+    while( nLen );
+
     mpImpl->mpTextEngine->UndoActionEnd();
 
     mpImpl->mpTextEngine->FormatAndUpdate( this );
-- 
1.7.7

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to