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

Caolán McNamara caolan at kemper.freedesktop.org
Mon Feb 27 08:22:27 PST 2012


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

New commits:
commit 3aeba34bc8fb66ef8530be336531763bc34afa37
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 );
    
    Signed-off-by: Norbert Thiebaud <nthiebaud at gmail.com>
    (cherry picked from commit 4f8094d0489d31563f18fb31bad366be2c19046f)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 817b1ac..4524a58 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