summaryrefslogtreecommitdiff
path: root/sw/inc/fmtclds.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc/fmtclds.hxx')
-rw-r--r--sw/inc/fmtclds.hxx99
1 files changed, 50 insertions, 49 deletions
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 8a649ed5b80f..fe68a6d16aa2 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,23 +28,23 @@
#ifndef _FMTCLDS_HXX
#define _FMTCLDS_HXX
+#include <editeng/borderline.hxx>
#include <tools/color.hxx>
#include <svl/poolitem.hxx>
#include "swdllapi.h"
#include <hintids.hxx>
#include <format.hxx>
-//Der ColumnDescriptor --------------------------
-
+// ColumnDescriptor
class SwColumn
{
- sal_uInt16 nWish; //Wunschbreite incl. Raender.
- //Verhaelt sich proportional zum Verhaeltniss:
- //Wunschbreite der Umgebung / aktuelle Breite der Spalte
- sal_uInt16 nUpper; //Oberer Rand
- sal_uInt16 nLower; //Unterer Rand
- sal_uInt16 nLeft; //Linker Rand
- sal_uInt16 nRight; //Rechter Rand
+ sal_uInt16 nWish; // Desired width, borders included.
+ // It is inversely proportional to the ratio of
+ // desired width environment / current width column.
+ sal_uInt16 nUpper; // Top border.
+ sal_uInt16 nLower; // Bottom border.
+ sal_uInt16 nLeft; // Left border.
+ sal_uInt16 nRight; // Right border.
public:
SwColumn();
@@ -77,25 +78,23 @@ enum SwColLineAdj
class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
{
-// Pen aPen; //Pen fuer die Linine zwischen den Spalten
- sal_uLong nLineWidth; //width of the separator line
- Color aLineColor; //color of the separator line
-
- sal_uInt8 nLineHeight; //Prozentuale Hoehe der Linien
- //(Relativ zu der Hoehe der Spalten incl. UL).
- SwColLineAdj eAdj; //Linie wird oben, mittig oder unten ausgerichtet.
-
- SwColumns aColumns; //Informationen fuer die einzelnen Spalten.
- sal_uInt16 nWidth; //Gesamtwunschbreite aller Spalten.
-
- sal_Bool bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
- //der GutterWidth eine 'optische Verteilung'
- //vorgenommen.
- //Es muss zurueckgesetzt werden wenn an den
- //Spaltenbreiten bzw. den Raendern gedreht wird.
- //Wenn es wieder gesetzt wird wird automatisch neu
- //gemischt (optisch verteilt).
- //Das Flag ist initial gesetzt.
+ SvxBorderStyle eLineStyle; //style of the separator line
+ sal_uLong nLineWidth; // Width of the separator line.
+ Color aLineColor; // Color of the separator line.
+
+ sal_uInt16 nLineHeight; // Percentile height of lines.
+ // (Based on height of columns including UL).
+
+ SwColLineAdj eAdj; // Line will be adjusted top, centered or bottom.
+
+ SwColumns aColumns; // Information concerning the columns.
+ sal_uInt16 nWidth; // Total desired width of all columns.
+
+ sal_Bool bOrtho; // Only if this flag is set, the setting of GutterWidth will
+ // be accompanied by a "visual rearrangement".
+ // The flag must be reset if widths of columns or borders are changed.
+ // When it is set (again) the visual arrangement is recalculated.
+ // The flag is initially set.
SW_DLLPRIVATE void Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct );
@@ -106,7 +105,7 @@ public:
SwFmtCol& operator=( const SwFmtCol& );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -115,13 +114,14 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwColumns &GetColumns() const { return aColumns; }
SwColumns &GetColumns() { return aColumns; }
sal_uInt16 GetNumCols() const { return aColumns.Count(); }
-// const Pen& GetLinePen() const { return aPen; }
+
+ SvxBorderStyle GetLineStyle() const { return eLineStyle;}
sal_uLong GetLineWidth() const { return nLineWidth;}
const Color& GetLineColor() const { return aLineColor;}
@@ -131,41 +131,41 @@ public:
sal_uInt16 GetWishWidth() const { return nWidth; }
sal_uInt8 GetLineHeight()const { return nLineHeight; }
- //Return USHRT_MAX wenn uneindeutig.
- //Return die kleinste Breite wenn bMin True ist.
+ // Return USHRT_MAX if ambiguous.
+ // Return smallest width if bMin is true.
sal_uInt16 GetGutterWidth( sal_Bool bMin = sal_False ) const;
-// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
+ void SetLineStyle(SvxBorderStyle eStyle) { eLineStyle = eStyle;}
void SetLineWidth(sal_uLong nLWidth) { nLineWidth = nLWidth;}
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
void SetLineHeight( sal_uInt8 nNew ) { nLineHeight = nNew; }
void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
void SetWishWidth( sal_uInt16 nNew ) { nWidth = nNew; }
- //Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
- //werden. Das Ortho Flag wird automatisch gesetzt.
+ // This function allows to (repeatedly) initialize the columns.
+ // The Ortho flag is set automatically.
void Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
- //Stellt die Raender fuer die Spalten in aColumns ein.
- //Wenn das Flag bOrtho gesetzt ist, werden die Spalten neu optisch
- //verteilt. Ist das Flag nicht gesetzt werden die Spaltenbreiten nicht
- //veraendert und die Raender werden einfach eingestellt.
+ // Adjusts borders for columns in aColumns.
+ // If flag bOrtho is set, columns are visually re-arranged.
+ // If the flag is not set, columns widths are not changed and
+ // borders are adjusted.
void SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct );
- //Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
- //nur dann wird auch der zweite Param. benoetigt und beachtet.
+ // This too re-arranges columns automatically if flag is set.
+ // Only in this case the second parameter is needed and evaluated.
void SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
- //Fuer den Reader
+ //For the reader
void _SetOrtho( sal_Bool bNew ) { bOrtho = bNew; }
- //Berechnet die aktuelle Breite der Spalte nCol.
- //Das Verhaeltniss von Wunschbreite der Spalte zum Returnwert ist
- //proportional zum Verhaeltniss des Gesamtwunschwertes zu nAct.
+ // Calculates current width of column nCol.
+ // The ratio of desired width of this column to return value is
+ // proportional to ratio of total desired value to nAct.
sal_uInt16 CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
- //Wie oben, aber es wir die Breite der PrtArea - also das was fuer
- //den Anwender die Spalte ist - geliefert.
+ // As above except that it returns the width of PrtArea -
+ // that corresponds to what constitutes the column for the user.
sal_uInt16 CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
};
@@ -177,3 +177,4 @@ inline const SwFmtCol &SwFmt::GetCol(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */