diff options
author | Alex Ivan <alexnivan@yahoo.com> | 2013-06-28 19:46:02 +0300 |
---|---|---|
committer | Alex Ivan <alexnivan@yahoo.com> | 2013-06-28 19:46:02 +0300 |
commit | 2ff314df35dbcc0ae0cfdd76cba53155db9b2764 (patch) | |
tree | 7947ffb2f72b19f4d698ae51f22a0cb3212c08d7 /sw/source/core/doc/swtblfmt.cxx | |
parent | 61a362510e0632b0b764dc02fb6242874b15418c (diff) |
Proper initilization of members in SwTable*Fmt
Modified initilization of members in SwTableFmt and SwTableLineFmt
in order to properly create formats for lines and, respectively, boxes.
Change-Id: I5e7e1a57b6745ac60a8167b3e0968202657fb4ef
Diffstat (limited to 'sw/source/core/doc/swtblfmt.cxx')
-rw-r--r-- | sw/source/core/doc/swtblfmt.cxx | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/sw/source/core/doc/swtblfmt.cxx b/sw/source/core/doc/swtblfmt.cxx index b5d387f5fb11..d7b5e1ce18c3 100644 --- a/sw/source/core/doc/swtblfmt.cxx +++ b/sw/source/core/doc/swtblfmt.cxx @@ -31,15 +31,17 @@ SwTableFmt::SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SetRepeatHeading( 0 ); SetShadow( SvxShadowItem( RES_SHADOW ) ); - pFstLineFmt = NULL; - pLstLineFmt = NULL; - pOddLineFmt = NULL; - pEvnLineFmt = NULL; - - pFstColFmt = NULL; - pLstColFmt = NULL; - pOddColFmt = NULL; - pEvnColFmt = NULL; + SwDoc* pDoc = GetDoc(); + + pFstLineFmt = pDoc->MakeTableLineFmt(); + pLstLineFmt = pDoc->MakeTableLineFmt(); + pOddLineFmt = pDoc->MakeTableLineFmt(); + pEvnLineFmt = pDoc->MakeTableLineFmt(); + + pFstColFmt = pDoc->MakeTableLineFmt(); + pLstColFmt = pDoc->MakeTableLineFmt(); + pOddColFmt = pDoc->MakeTableLineFmt(); + pEvnColFmt = pDoc->MakeTableLineFmt(); } SwTableFmt::SwTableFmt( SwAttrPool& rPool, const String &rFmtNm, @@ -54,15 +56,17 @@ SwTableFmt::SwTableFmt( SwAttrPool& rPool, const String &rFmtNm, SetRepeatHeading( 0 ); SetShadow( SvxShadowItem( RES_SHADOW ) ); - pFstLineFmt = NULL; - pLstLineFmt = NULL; - pOddLineFmt = NULL; - pEvnLineFmt = NULL; + SwDoc* pDoc = GetDoc(); + + pFstLineFmt = pDoc->MakeTableLineFmt(); + pLstLineFmt = pDoc->MakeTableLineFmt(); + pOddLineFmt = pDoc->MakeTableLineFmt(); + pEvnLineFmt = pDoc->MakeTableLineFmt(); - pFstColFmt = NULL; - pLstColFmt = NULL; - pOddColFmt = NULL; - pEvnColFmt = NULL; + pFstColFmt = pDoc->MakeTableLineFmt(); + pLstColFmt = pDoc->MakeTableLineFmt(); + pOddColFmt = pDoc->MakeTableLineFmt(); + pEvnColFmt = pDoc->MakeTableLineFmt(); } SwTableFmt& SwTableFmt::operator=( const SwTableFmt& rNew ) @@ -152,20 +156,24 @@ SwTableLineFmt::SwTableLineFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SwFrmFmt *pDrvdFrm ) : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) { - pFstBoxFmt = NULL; - pLstBoxFmt = NULL; - pOddBoxFmt = NULL; - pEvnBoxFmt = NULL; + SwDoc* pDoc = GetDoc(); + + pFstBoxFmt = pDoc->MakeTableBoxFmt(); + pLstBoxFmt = pDoc->MakeTableBoxFmt(); + pOddBoxFmt = pDoc->MakeTableBoxFmt(); + pEvnBoxFmt = pDoc->MakeTableBoxFmt(); } SwTableLineFmt::SwTableLineFmt( SwAttrPool& rPool, const String &rFmtNm, SwFrmFmt *pDrvdFrm ) : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) { - pFstBoxFmt = NULL; - pLstBoxFmt = NULL; - pOddBoxFmt = NULL; - pEvnBoxFmt = NULL; + SwDoc* pDoc = GetDoc(); + + pFstBoxFmt = pDoc->MakeTableBoxFmt(); + pLstBoxFmt = pDoc->MakeTableBoxFmt(); + pOddBoxFmt = pDoc->MakeTableBoxFmt(); + pEvnBoxFmt = pDoc->MakeTableBoxFmt(); } SwTableBoxFmt::SwTableBoxFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, |