[Libreoffice-commits] core.git: Branch 'feature/table-style' - sw/inc
Alex Ivan
alexnivan at yahoo.com
Tue Jun 25 09:10:36 PDT 2013
sw/inc/swtblfmt.hxx | 89 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 84 insertions(+), 5 deletions(-)
New commits:
commit f5beea954e1cfe38de9608c6fb8431b1c67f10e5
Author: Alex Ivan <alexnivan at yahoo.com>
Date: Tue Jun 25 18:44:36 2013 +0300
Add structure for format classes
SwTableFmt now stores data about the lines/columns.
These, in turn, store information about the boxes.
Not yet integrated with the current implementation.
Change-Id: Ibc936f68c20905fca1cd636977eb47850eb0faa9
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
index a54faa49..76c6311 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -22,6 +22,8 @@
#include <frmfmt.hxx>
class SwDoc;
+class SwTableLineFmt;
+class SwTableBoxFmt;
class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt
{
@@ -31,14 +33,64 @@ protected:
SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange )
- {}
+ {
+ pFstLineFmt = NULL;
+ pLstLineFmt = NULL;
+ pOddLineFmt = NULL;
+ pEvnLineFmt = NULL;
+
+ pFstColFmt = NULL;
+ pLstColFmt = NULL;
+ pOddColFmt = NULL;
+ pEvnColFmt = NULL;
+ }
SwTableFmt( SwAttrPool& rPool, const String &rFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange )
- {}
-
+ {
+ pFstLineFmt = NULL;
+ pLstLineFmt = NULL;
+ pOddLineFmt = NULL;
+ pEvnLineFmt = NULL;
+
+ pFstColFmt = NULL;
+ pLstColFmt = NULL;
+ pOddColFmt = NULL;
+ pEvnColFmt = NULL;
+ }
+
+ SwTableLineFmt* pFstLineFmt;
+ SwTableLineFmt* pLstLineFmt;
+ SwTableLineFmt* pOddLineFmt;
+ SwTableLineFmt* pEvnLineFmt;
+
+ SwTableLineFmt* pFstColFmt;
+ SwTableLineFmt* pLstColFmt;
+ SwTableLineFmt* pOddColFmt;
+ SwTableLineFmt* pEvnColFmt;
public:
+
+ void SetFirstLineFmt( SwTableLineFmt* pNew ) { pFstLineFmt = pNew; }
+ void SetLastLineFmt( SwTableLineFmt* pNew ) { pLstLineFmt = pNew; }
+ void SetOddLineFmt( SwTableLineFmt* pNew ) { pOddLineFmt = pNew; }
+ void SetEvenLineFmt( SwTableLineFmt* pNew ) { pEvnLineFmt = pNew; }
+
+ void SetFirstColFmt( SwTableLineFmt* pNew ) { pFstColFmt = pNew; }
+ void SetLastColFmt( SwTableLineFmt* pNew ) { pLstColFmt = pNew; }
+ void SetOddColFmt( SwTableLineFmt* pNew ) { pOddColFmt = pNew; }
+ void SetEvenColFmt( SwTableLineFmt* pNew ) { pEvnColFmt = pNew; }
+
+ SwTableLineFmt* GetFirstLineFmt() { return pFstLineFmt; }
+ SwTableLineFmt* GetLastLineFmt() { return pLstLineFmt; }
+ SwTableLineFmt* GetOddLineFmt() { return pOddLineFmt; }
+ SwTableLineFmt* GetEvenLineFmt() { return pEvnLineFmt; }
+
+ SwTableLineFmt* GetFirstColFmt() { return pFstColFmt; }
+ SwTableLineFmt* GetLastColFmt() { return pLstColFmt; }
+ SwTableLineFmt* GetOddColFmt() { return pOddColFmt; }
+ SwTableLineFmt* GetEvenColFmt() { return pEvnColFmt; }
+
TYPEINFO(); // Already in base class Content.
DECL_FIXEDMEMPOOL_NEWDEL(SwTableFmt)
@@ -52,13 +104,40 @@ protected:
SwTableLineFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange )
- {}
+ {
+ pFstBoxFmt = NULL;
+ pLstBoxFmt = NULL;
+ pOddBoxFmt = NULL;
+ pEvnBoxFmt = NULL;
+ }
SwTableLineFmt( SwAttrPool& rPool, const String &rFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange )
- {}
+ {
+ pFstBoxFmt = NULL;
+ pLstBoxFmt = NULL;
+ pOddBoxFmt = NULL;
+ pEvnBoxFmt = NULL;
+ }
+
+ // Odd and Even Box formats will be used to handle alternating columns
+ SwTableBoxFmt* pFstBoxFmt;
+ SwTableBoxFmt* pLstBoxFmt;
+ SwTableBoxFmt* pOddBoxFmt;
+ SwTableBoxFmt* pEvnBoxFmt;
public:
+
+ void SetFirstBoxFmt( SwTableBoxFmt* pNew ) { pFstBoxFmt = pNew; }
+ void SetLastBoxFmt( SwTableBoxFmt* pNew ) { pLstBoxFmt = pNew; }
+ void SetOddBoxFmt( SwTableBoxFmt* pNew ) { pOddBoxFmt = pNew; }
+ void SetEvenBoxFmt( SwTableBoxFmt* pNew ) { pEvnBoxFmt = pNew; }
+
+ SwTableBoxFmt* GetFirstBoxFmt() { return pFstBoxFmt; }
+ SwTableBoxFmt* GetLastBoxFmt() { return pLstBoxFmt; }
+ SwTableBoxFmt* GetOddBoxFmt() { return pOddBoxFmt; }
+ SwTableBoxFmt* GetEvenBoxFmt() { return pEvnBoxFmt; }
+
TYPEINFO(); // Already in base class Content.
DECL_FIXEDMEMPOOL_NEWDEL(SwTableLineFmt)
More information about the Libreoffice-commits
mailing list