[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Feb 2 05:14:19 PST 2011


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

New commits:
commit b61d4e3e3d519672f908f87ad1987b02cf14c40e
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 a807481..4af4bb1 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1405,7 +1405,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;
@@ -1466,7 +1466,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