summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Martens <ama@openoffice.org>2001-01-19 13:25:49 +0000
committerAndreas Martens <ama@openoffice.org>2001-01-19 13:25:49 +0000
commit4b5fc191a4ba41480ebe19e83c23656864e4d0c4 (patch)
tree07d1b3c1ebf729a397d2c53ba733da50cdd1f0d3
parent86cc9e5e0061a6410e338fff915ea17aab2068f8 (diff)
Fix: Tables with given left margin and width
-rw-r--r--sw/source/core/layout/tabfrm.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 842db57ca52e..249b9d1cb585 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabfrm.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2001-01-17 11:27:58 $
+ * last change: $Author: ama $ $Date: 2001-01-19 14:25:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1128,10 +1128,11 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
//2. Es gibt Rahmen mit Umlauf nur rechts bzw. nur links und diese sind
// rechts bzw. links ausgerichtet, diese geben ein Minimum fuer die
// Raender vor.
- long nRightOffset = 0,
+ long nTmpRight = -1000000,
nLeftOffset = 0;
- if( CalcFlyOffsets( nUpper, nLeftOffset, nRightOffset ) )
+ if( CalcFlyOffsets( nUpper, nLeftOffset, nTmpRight ) )
bValidPrtArea = FALSE;
+ long nRightOffset = Max( 0L, nTmpRight );
SwTwips nLower = pAttrs->CalcBottomLine();
@@ -1239,7 +1240,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
nLeft = 0;
nLeft += nLeftOffset;
}
- nRight = Max( nMax - nLeft - nWish, nRightOffset );
+ nRight = Max( nMax - nLeft - nWish, nTmpRight );
break;
default:
ASSERT( FALSE, "Ungueltige orientation fuer Table." );