[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Thu Nov 18 03:39:32 PST 2010


 sw/source/filter/ww8/wrtww8.hxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7307c9e0f901c40bb1baf2560fc4abc410dd2dd8
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Thu Nov 18 12:37:58 2010 +0100

    Fixed an infinite loop while exporting some files in doc/docx/rtf

diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index d1ec023..b1d6782 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1404,7 +1404,7 @@ public:
 
     bool IsTxtAttr(xub_StrLen nSwPos);
 
-    void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
+    void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
 
     void OutAttr( xub_StrLen nSwPos );
     virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
@@ -1465,7 +1465,7 @@ public:
     bool IsDropCap( int nSwPos );
     bool RequiresImplicitBookmark();
 
-    void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
+    void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
 
     void OutAttr( xub_StrLen nSwPos, bool bRuby = false );
     virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;


More information about the Libreoffice-commits mailing list