incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mayo...@apache.org
Subject svn commit: r1350879 - /incubator/ooo/trunk/main/sw/source/core/layout/colfrm.cxx
Date Sat, 16 Jun 2012 07:47:31 GMT
Author: mayongl
Date: Sat Jun 16 07:47:30 2012
New Revision: 1350879

URL: http://svn.apache.org/viewvc?rev=1350879&view=rev
Log:
118878: Writer crash after column number and width of frame are modified

Patch by: Lin Yuan
Review by: mayongl
Reported by: Ji Yan


Modified:
    incubator/ooo/trunk/main/sw/source/core/layout/colfrm.cxx

Modified: incubator/ooo/trunk/main/sw/source/core/layout/colfrm.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/layout/colfrm.cxx?rev=1350879&r1=1350878&r2=1350879&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/layout/colfrm.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/layout/colfrm.cxx Sat Jun 16 07:47:30 2012
@@ -371,7 +371,7 @@ void SwLayoutFrm::AdjustColumns( const S
     long nGutter = 0;
     // <--
 
-    for ( sal_uInt16 i = 0; i < pAttr->GetNumCols(); ++i )
+    for ( sal_uInt16 i = 0; i < pAttr->GetNumCols() && pCol; ++i ) //i118878,
value returned by GetNumCols() can't be trusted
 	{
         if( !bOrtho )
         {
@@ -448,7 +448,7 @@ void SwLayoutFrm::AdjustColumns( const S
     {
         long nInnerWidth = ( nAvail - nGutter ) / pAttr->GetNumCols();
         pCol = Lower();
-        for( sal_uInt16 i = 0; i < pAttr->GetNumCols(); pCol = pCol->GetNext(),
++i )
+        for( sal_uInt16 i = 0; i < pAttr->GetNumCols() && pCol; pCol = pCol->GetNext(),
++i ) //i118878, value returned by GetNumCols() can't be trusted
         {
             SwTwips nWidth;
             if ( i == pAttr->GetNumCols() - 1 )



Mime
View raw message