[Libreoffice-commits] .: sw/source

Ivan Timofeev ivantimofeev at kemper.freedesktop.org
Sun Feb 26 07:30:04 PST 2012


 sw/source/core/docnode/ndtbl1.cxx |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 996f44c310520e3d7868c62d336aaec7bb0f845a
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date:   Sun Feb 26 19:09:54 2012 +0400

    fdo#46144: "Distributy Columns Evenly" does not work with the selected columns
    
    regression from f7303fcac779f99931bfba48e8bfcf9c081af67f:
    
    -    SvUShorts aWish( nTmp, nTmp ),
    +    std::vector<sal_uInt16> aWish( nTmp, nTmp ),
                   aMins( nTmp, nTmp );

diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 9e8ea04..b650774 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1469,16 +1469,11 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance )
     if ( ! aTabCols.Count() )
         return;
 
-    const sal_uInt8 nTmp = (sal_uInt8)Max( sal_uInt16(255), sal_uInt16(aTabCols.Count() + 1) );
-    std::vector<sal_uInt16> aWish( nTmp, nTmp ),
-              aMins( nTmp, nTmp );
+    std::vector<sal_uInt16> aWish(aTabCols.Count() + 1);
+    std::vector<sal_uInt16> aMins(aTabCols.Count() + 1);
+
     sal_uInt16 i;
 
-    for ( i = 0; i <= aTabCols.Count(); ++i )
-    {
-        aWish.push_back( 0 );
-        aMins.push_back( 0 );
-    }
     ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, sal_True  );
 
     //Es ist Robuster wenn wir die Min-Werte fuer die ganze Tabelle berechnen.


More information about the Libreoffice-commits mailing list