summaryrefslogtreecommitdiff
path: root/sw/source/ui/frmdlg/colex.cxx
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2001-06-22 15:15:54 +0000
committerDaniel Rentz <dr@openoffice.org>2001-06-22 15:15:54 +0000
commit5fb4659c298d5990bde826fa6ffb7d9a4c5974e7 (patch)
tree2c223d6c339924dd8a99ea27c9bfed21da3bb00b /sw/source/ui/frmdlg/colex.cxx
parente2e76db51c9b69f07b949cb03cbacd9315e5b3a7 (diff)
#88289# Redesign fixes
Diffstat (limited to 'sw/source/ui/frmdlg/colex.cxx')
-rw-r--r--sw/source/ui/frmdlg/colex.cxx145
1 files changed, 73 insertions, 72 deletions
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index 30acf04adfea..0acca64353e0 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: colex.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2001-04-19 11:52:43 $
+ * last change: $Author: dr $ $Date: 2001-06-22 16:14:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -363,6 +363,7 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId)
aWinSize = PixelToLogic( aWinSize );
+ SetBorderStyle( WINDOW_BORDER_MONO );
}
/*-----------------25.10.96 09.16-------------------
@@ -372,87 +373,87 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId)
void SwColumnOnlyExample::Paint( const Rectangle& rRect )
{
- long nWidth = aFrmSize.Width();
- long nHeight = aFrmSize.Height();
- Fraction aXScale( aWinSize.Width(), std::max( (long)(nWidth + nWidth / 8), (long) 1 ) );
- Fraction aYScale( aWinSize.Height(), std::max( nHeight, (long) 1 ) );
- MapMode aMapMode( GetMapMode() );
- aMapMode.SetScaleX( aXScale );
- aMapMode.SetScaleY( aYScale );
- SetMapMode( aMapMode );
-
- Size aLogSize(PixelToLogic(GetOutputSizePixel()));
- Point aTL( (aLogSize.Width() - aFrmSize.Width()) / 2,
- (aLogSize.Height() - aFrmSize.Height()) / 2);
- Rectangle aRect(aTL, aFrmSize);
-
- SetFillColor( Color( COL_WHITE ) );
+ long nWidth = aFrmSize.Width();
+ long nHeight = aFrmSize.Height();
+ Fraction aXScale( aWinSize.Width(), std::max( (long)(nWidth + nWidth / 8), (long) 1 ) );
+ Fraction aYScale( aWinSize.Height(), std::max( nHeight, (long) 1 ) );
+ MapMode aMapMode( GetMapMode() );
+ aMapMode.SetScaleX( aXScale );
+ aMapMode.SetScaleY( aYScale );
+ SetMapMode( aMapMode );
+
+ Size aLogSize(PixelToLogic(GetOutputSizePixel()));
+ Point aTL( (aLogSize.Width() - aFrmSize.Width()) / 2,
+ (aLogSize.Height() - aFrmSize.Height()) / 2);
+ Rectangle aRect(aTL, aFrmSize);
+
+ SetFillColor( Color( COL_WHITE ) );
// SetPen(aSolidPen);
- DrawRect(aRect);
+ DrawRect(aRect);
+
+ Size aInside(aFrmSize.Width() - nDistance, aFrmSize.Height() - nDistance);
+ long nDist2 = nDistance / 2;
+ aTL.X() += nDist2;
+ aTL.Y() += nDist2;
+ Rectangle aInsRect(aTL, aInside);
+ DrawRect(aInsRect);
+
+ SetFillColor(Color( COL_LIGHTGRAY ) );
+
+ //Spaltentrenner?
+ long nLength = aLogSize.Height() - 2 * aTL.Y();
+ Point aUp( aTL );
+ Point aDown( aTL.X(), nLength );
+ BOOL bLines = FALSE;
+ if(aCols.GetLineAdj() != COLADJ_NONE)
+ {
+ bLines = TRUE;
- Size aInside(aFrmSize.Width() - nDistance, aFrmSize.Height() - nDistance);
- long nDist2 = nDistance / 2;
- aTL.X() += nDist2;
- aTL.Y() += nDist2;
- Rectangle aInsRect(aTL, aInside);
- DrawRect(aInsRect);
-
- SetFillColor(Color( COL_LIGHTGRAY ) );
-
- //Spaltentrenner?
- long nLength = aLogSize.Height() - 2 * aTL.Y();
- Point aUp( aTL );
- Point aDown( aTL.X(), nLength );
- BOOL bLines = FALSE;
- if(aCols.GetLineAdj() != COLADJ_NONE)
+ USHORT nPercent = aCols.GetLineHeight();
+ if( nPercent != 100 )
{
- bLines = TRUE;
-
- USHORT nPercent = aCols.GetLineHeight();
- if( nPercent != 100 )
+ nLength -= nLength * nPercent / 100;
+ switch(aCols.GetLineAdj())
{
- nLength -= nLength * nPercent / 100;
- switch(aCols.GetLineAdj())
- {
- case COLADJ_BOTTOM: aUp.Y() += nLength; break;
- case COLADJ_TOP: aDown.Y() -= nLength; break;
- case COLADJ_CENTER:
- aUp.Y() += nLength / 2;
- aDown.Y() -= nLength / 2;
- break;
- }
+ case COLADJ_BOTTOM: aUp.Y() += nLength; break;
+ case COLADJ_TOP: aDown.Y() -= nLength; break;
+ case COLADJ_CENTER:
+ aUp.Y() += nLength / 2;
+ aDown.Y() -= nLength / 2;
+ break;
}
-
}
- const SwColumns& rCols = aCols.GetColumns();
- USHORT nColCount = rCols.Count();
- if( !nColCount)
- DrawRect(aRect);
- else
+ }
+
+ const SwColumns& rCols = aCols.GetColumns();
+ USHORT nColCount = rCols.Count();
+ if( nColCount )
+ {
+ DrawRect(aRect);
+ SetFillColor( Color( COL_WHITE ) );
+ Rectangle aFrmRect(aTL, aInside);
+ long nSum = aTL.X();
+ for(USHORT i = 0; i < nColCount; i++)
{
- Rectangle aFrmRect(aTL, aInside);
- long nSum = aTL.X();
- for(USHORT i = 0; i < nColCount; i++)
+ SwColumn* pCol = rCols[i];
+ aFrmRect.Left() = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X();
+ nSum += pCol->GetWishWidth();
+ aFrmRect.Right() = nSum - pCol->GetRight();
+ DrawRect(aFrmRect);
+ }
+ if(bLines )
+ {
+ nSum = aTL.X();
+ for(USHORT i = 0; i < nColCount - 1; i++)
{
- SwColumn* pCol = rCols[i];
- aFrmRect.Left() = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X();
- nSum += pCol->GetWishWidth();
- aFrmRect.Right() = nSum - pCol->GetRight();
- DrawRect(aFrmRect);
- }
- if(bLines )
- {
- nSum = aTL.X();
- for(USHORT i = 0; i < nColCount - 1; i++)
- {
- nSum += rCols[i]->GetWishWidth();
- aUp.X() = nSum;
- aDown.X() = nSum;
- DrawLine(aUp, aDown);
- }
+ nSum += rCols[i]->GetWishWidth();
+ aUp.X() = nSum;
+ aDown.X() = nSum;
+ DrawLine(aUp, aDown);
}
}
+ }
}
/*-----------------25.10.96 12.05-------------------