summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authoros <os@openoffice.org>2011-02-22 09:25:05 +0100
committeros <os@openoffice.org>2011-02-22 09:25:05 +0100
commit480ed8e16fcf2858edb7a78e0005aef57eddb03a (patch)
treef3a0eb4da21aaa1b91fbc1b8da8902c0b43422bf /sw
parent6d800fdab09298e4eecc6bc19c7491fda60391da (diff)
#i101353# stop column width balancing in small tables
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/table/tabledlg.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 38b0e6e54799..f55861fcc1d5 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1098,12 +1098,18 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
if(!bModifyTable && !bProp )
{
-// Tabellenbreite bleibt, Differenz wird mit der/den
-// naechsten Zellen ausgeglichen
+// the table width is constant, the difference is balanced with the other columns
+ sal_uInt16 nLoopCount = 0;
while( nDiff )
{
if( ++nAktPos == nNoOfVisibleCols)
+ {
nAktPos = 0;
+ ++nLoopCount;
+ //#i101353# in small tables it might not be possible to balance column width
+ if( nLoopCount > 1 )
+ break;
+ }
if( nDiff < 0 )
{
SetVisibleWidth(nAktPos, GetVisibleWidth(nAktPos) -nDiff);