diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-12-17 09:02:23 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-12-17 09:02:23 +0100 |
commit | de60fd06b84bc1aa080ef209b0eeb36914bd8b32 (patch) | |
tree | 91852e2ba1f7df04e02c5f75ca2fe4a1b58bfb5f /sw/inc/swtable.hxx | |
parent | 5e9bd0b1ce50ae0e03c0563ed2f0cd589d94a287 (diff) |
CWS swlayoutrefactoring: #i115510#: first step to clean up the SwClient mess
Diffstat (limited to 'sw/inc/swtable.hxx')
-rw-r--r-- | sw/inc/swtable.hxx | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 1b1316ce37d1..f8b59353097c 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -27,9 +27,7 @@ #ifndef _SWTABLE_HXX #define _SWTABLE_HXX #include <tools/mempool.hxx> -#ifndef _TOOLS_REF_HXX #include <tools/ref.hxx> -#endif #include <svl/svarray.hxx> #include <tblenum.hxx> #include <swtypes.hxx> @@ -43,6 +41,7 @@ class SwStartNode; #include <boost/noncopyable.hpp> #endif +class SwFmt; class Color; class SwFrmFmt; class SwTableFmt; @@ -86,7 +85,7 @@ typedef SwTableLine* SwTableLinePtr; class SW_DLLPUBLIC SwTable: public SwClient //Client vom FrmFmt { - using SwClient::IsModifyLocked; + protected: SwTableLines aLines; @@ -116,6 +115,8 @@ protected: BOOL IsModifyLocked(){ return bModifyLocked;} + virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); + public: enum SearchType { @@ -175,10 +176,9 @@ public: SwTableLines &GetTabLines() { return aLines; } const SwTableLines &GetTabLines() const { return aLines; } - SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; } - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; } - - virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + SwTableFmt* GetTableFmt() const { return (SwTableFmt*)GetRegisteredIn(); } void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart, BOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const; @@ -322,6 +322,7 @@ public: SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType, SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); + void RegisterToFormat( SwFmt& rFmt ); #ifdef DBG_UTIL void CheckConsistency() const; #endif @@ -348,8 +349,8 @@ public: void SetUpper( SwTableBox *pNew ) { pUpper = pNew; } - SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; } - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; } + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } //Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen. SwFrmFmt* ClaimFrmFmt(); @@ -364,6 +365,7 @@ public: SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const; bool hasSoftPageBreak() const; + void RegisterToFormat( SwFmt& rFmt ); }; class SW_DLLPUBLIC SwTableBox: public SwClient //Client vom FrmFmt @@ -402,8 +404,8 @@ public: const SwTableLine *GetUpper() const { return pUpper; } void SetUpper( SwTableLine *pNew ) { pUpper = pNew; } - SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; } - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; } + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } //Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen. SwFrmFmt* ClaimFrmFmt(); @@ -468,6 +470,8 @@ public: const SwTableBox& FindEndOfRowSpan( const SwTable& rTable, USHORT nMaxStep = USHRT_MAX ) const { return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); } + void RegisterToFormat( SwFmt& rFmt ) ; + void ForgetFrmFmt(); }; class SwCellFrm; |