From 3aeba34bc8fb66ef8530be336531763bc34afa37 Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Sun, 26 Feb 2012 19:09:54 +0400 Subject: fdo#46144: "Distributy Columns Evenly" does not work with the selected columns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit regression from f7303fcac779f99931bfba48e8bfcf9c081af67f: - SvUShorts aWish( nTmp, nTmp ), + std::vector aWish( nTmp, nTmp ), aMins( nTmp, nTmp ); Signed-off-by: Norbert Thiebaud (cherry picked from commit 4f8094d0489d31563f18fb31bad366be2c19046f) Signed-off-by: Caolán McNamara --- sw/source/core/docnode/ndtbl1.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 817b1acdb13f..4524a58cb817 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 aWish( nTmp, nTmp ), - aMins( nTmp, nTmp ); + std::vector aWish(aTabCols.Count() + 1); + std::vector 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. -- cgit v1.2.3