diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-02-26 10:37:59 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-02-26 10:37:59 +0000 |
commit | e648e13598479a011ebcc250d7b7e4523cc572be (patch) | |
tree | 90aa2449f847ce68562ad0cd6f882c3678876fc8 /sw/inc/tabcol.hxx | |
parent | 038f5a795db1d16e0f5065763e8990080886b82c (diff) |
INTEGRATION: CWS os27 (1.1.1.1.568); FILE MERGED
2004/02/20 14:17:28 fme 1.1.1.1.568.3: #i24134# Feature - Modify table rows with the ruler
2004/01/28 13:35:28 fme 1.1.1.1.568.2: #i24134# Feature - Modify table rows with the rules
2004/01/23 07:43:10 fme 1.1.1.1.568.1: #i24134# Feature - Modify table rows with the ruler
Diffstat (limited to 'sw/inc/tabcol.hxx')
-rw-r--r-- | sw/inc/tabcol.hxx | 62 |
1 files changed, 39 insertions, 23 deletions
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index 0110e27c4a66..40238a06af6b 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -2,9 +2,9 @@ * * $RCSfile: tabcol.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * last change: $Author: kz $ $Date: 2004-02-26 11:37:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,7 +67,23 @@ #include <svtools/svstdarr.hxx> #endif -class SwTabCols : public SvLongs +#include <vector> + +struct SwTabColsEntry +{ + long nPos; + long nMin; + long nMax; + BOOL bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht. + //Wenn das Flag Hidden TRUE ist liegt der Spalten- + //trenner nicht in der aktuellen Zeile; er muss + //mit gepflegt werden, darf aber nicht angezeigt + //werden. +}; + +typedef std::vector< SwTabColsEntry > SwTabColsEntries; + +class SwTabCols { long nLeftMin, //Linker aeusserer Rand (Bezugspunkt) in //Dokumentkordinaten. @@ -76,27 +92,33 @@ class SwTabCols : public SvLongs nRight, //Rechter Rand der Tabelle. nRightMax; //Maximaler rechter Rand der Tabelle. + bool bLastRowAllowedToChange; // if the last row of the table frame + // is split across pages, it may not + // change its size + SwTabColsEntries aData; - SvBools aHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht. - //Wenn das Flag Hidden TRUE ist liegt der Spalten- - //trenner nicht in der aktuellen Zeile; er muss - //mit gepflegt werden, darf aber nicht angezeigt - //werden. + //fuer den CopyCTor + const SwTabColsEntries& GetData() const { return aData; } public: SwTabCols( USHORT nSize = 0 ); SwTabCols( const SwTabCols& ); SwTabCols &operator=( const SwTabCols& ); BOOL operator==( const SwTabCols& rCmp ) const; + long& operator[]( USHORT nPos ) { return aData[nPos].nPos; } + long operator[]( USHORT nPos ) const { return aData[nPos].nPos; } + USHORT Count() const { return aData.size(); } - BOOL IsHidden( USHORT nPos ) const { return aHidden[nPos]; } - void SetHidden( USHORT nPos, BOOL bValue ) { aHidden[nPos] = bValue; } - inline void InsertHidden( USHORT nPos, BOOL bValue ); - inline void DeleteHidden( USHORT nPos, USHORT nAnz = 1 ); + BOOL IsHidden( USHORT nPos ) const { return aData[nPos].bHidden; } + void SetHidden( USHORT nPos, BOOL bValue ) { aData[nPos].bHidden = bValue; } - //fuer den CopyCTor - const SvBools& GetHidden() const { return aHidden; } + void Insert( long nValue, BOOL bValue, USHORT nPos ); + void Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos ); + void Remove( USHORT nPos, USHORT nAnz = 1 ); + + const SwTabColsEntry& GetEntry( USHORT nPos ) const { return aData[nPos]; } + SwTabColsEntry& GetEntry( USHORT nPos ) { return aData[nPos]; } long GetLeftMin() const { return nLeftMin; } long GetLeft() const { return nLeft; } @@ -107,15 +129,9 @@ public: void SetLeft ( long nNew ) { nLeft = nNew; } void SetRight ( long nNew ) { nRight = nNew; } void SetRightMax( long nNew ) { nRightMax = nNew;} -}; -inline void SwTabCols::InsertHidden( USHORT nPos, BOOL bValue ) -{ - aHidden.Insert( bValue, nPos ); -} -inline void SwTabCols::DeleteHidden( USHORT nPos, USHORT nAnz ) -{ - aHidden.Remove( nPos, nAnz ); -} + bool IsLastRowAllowedToChange() const { return bLastRowAllowedToChange; } + void SetLastRowAllowedToChange( bool bNew ) { bLastRowAllowedToChange = bNew; } +}; #endif //_TABCOL_HXX |