summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-02-26 19:09:54 +0400
committerCaolán McNamara <caolanm@redhat.com>2012-02-27 16:22:14 +0000
commit3aeba34bc8fb66ef8530be336531763bc34afa37 (patch)
tree2a99a42b3a95f3333740b1c89c39774931fa8ef5
parentd87bbaf9bccc25b189ff11d8231ca210c69ce738 (diff)
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@gmail.com> (cherry picked from commit 4f8094d0489d31563f18fb31bad366be2c19046f) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx11
1 files 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<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.