From 5345916a90c80923d7f5a6a621b7461c7ab63f6e Mon Sep 17 00:00:00 2001 From: Alex Ivan Date: Fri, 2 Aug 2013 18:13:24 +0300 Subject: Remove default attribute values from Sw*Fmt These values, because they were being set in the Sw*Fmts from the hard format, were "blocking" the attributes from the table style. All atributes are not yet correctly propagated. Also, the changes are not instant. There needs to be some other interaction with the document before they come into effect. Change-Id: I0c9775c5e988862d67067ac3bc9869851d85945b --- sw/source/core/doc/swtblfmt.cxx | 82 +---------------------------------------- 1 file changed, 2 insertions(+), 80 deletions(-) diff --git a/sw/source/core/doc/swtblfmt.cxx b/sw/source/core/doc/swtblfmt.cxx index 62aeace9b9c0..8c91b77e9bce 100644 --- a/sw/source/core/doc/swtblfmt.cxx +++ b/sw/source/core/doc/swtblfmt.cxx @@ -23,14 +23,6 @@ SwTableFmt::SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SwFrmFmt *pDrvdFrm ) : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) { - SetBreak( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); - SetKeepWithNextPara( SvxFmtKeepItem( sal_False, RES_KEEP ) ); - SetLayoutSplit( sal_True ); - SetCollapsingBorders( sal_True ); - SetRowSplit( sal_True ); - SetRepeatHeading( 0 ); - SetShadow( SvxShadowItem( RES_SHADOW ) ); - SwDoc* pDoc = GetDoc(); m_pFstLineFmt.reset( pDoc->MakeTableLineFmt() ); @@ -48,14 +40,6 @@ SwTableFmt::SwTableFmt( SwAttrPool& rPool, const String &rFmtNm, SwFrmFmt *pDrvdFrm ) : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) { - SetBreak( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); - SetKeepWithNextPara( SvxFmtKeepItem( sal_False, RES_KEEP ) ); - SetLayoutSplit( sal_True ); - SetCollapsingBorders( sal_True ); - SetRowSplit( sal_True ); - SetRepeatHeading( 0 ); - SetShadow( SvxShadowItem( RES_SHADOW ) ); - SwDoc* pDoc = GetDoc(); m_pFstLineFmt.reset( pDoc->MakeTableLineFmt() ); @@ -457,74 +441,12 @@ SwTableLineFmt& SwTableLineFmt::operator=( const SwTableLineFmt& rNew ) SwTableBoxFmt::SwTableBoxFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SwFrmFmt *pDrvdFrm ) : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) - { - SetFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_FONT ) ); - SetHeight( SvxFontHeightItem( 240, 100, RES_CHRATR_FONTSIZE) ); - SetWeight( SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT ) ); - SetPosture( SvxPostureItem( ITALIC_NONE, RES_CHRATR_POSTURE ) ); - - SetCJKFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_CJK_FONT ) ); - SetCJKHeight( SvxFontHeightItem( 240, 100, RES_CHRATR_CJK_FONTSIZE) ); - SetCJKWeight( SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_CJK_WEIGHT ) ); - SetCJKPosture( SvxPostureItem( ITALIC_NONE, RES_CHRATR_CJK_POSTURE ) ); - - SetCTLFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_CTL_FONT ) ); - SetCTLHeight( SvxFontHeightItem( 240, 100, RES_CHRATR_CTL_FONTSIZE) ); - SetCTLWeight( SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_CTL_WEIGHT ) ); - SetCTLPosture( SvxPostureItem( ITALIC_NONE, RES_CHRATR_CTL_POSTURE ) ); - - SetUnderline( SvxUnderlineItem( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ) ); - SetOverline( SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE ) ); - SetCrossedOut( SvxCrossedOutItem( STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT ) ); - SetContour( SvxContourItem( sal_False, RES_CHRATR_CONTOUR ) ); - SetShadowed( SvxShadowedItem( sal_False, RES_CHRATR_SHADOWED ) ); - SetColor( SvxColorItem( RES_CHRATR_COLOR ) ); - SvxBoxItem rNew = SvxBoxItem( RES_BOX ); - rNew.SetDistance( 55 ); - SetBox( rNew ); - SetBackground( SvxBrushItem( RES_BACKGROUND ) ); - SetAdjust( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) ); - SetTextOrientation( SvxFrameDirectionItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ) ); - SetVerticalAlignment( SwFmtVertOrient( 0, com::sun::star::text::VertOrientation::NONE, com::sun::star::text::RelOrientation::FRAME ) ); - - eSysLanguage = eNumFmtLanguage = ::GetAppLanguage(); - } + {} SwTableBoxFmt::SwTableBoxFmt( SwAttrPool& rPool, const String &rFmtNm, SwFrmFmt *pDrvdFrm ) : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) - { - SetFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_FONT ) ); - SetHeight( SvxFontHeightItem( 240, 100, RES_CHRATR_FONTSIZE) ); - SetWeight( SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT ) ); - SetPosture( SvxPostureItem( ITALIC_NONE, RES_CHRATR_POSTURE ) ); - - SetCJKFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_CJK_FONT ) ); - SetCJKHeight( SvxFontHeightItem( 240, 100, RES_CHRATR_CJK_FONTSIZE) ); - SetCJKWeight( SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_CJK_WEIGHT ) ); - SetCJKPosture( SvxPostureItem( ITALIC_NONE, RES_CHRATR_CJK_POSTURE ) ); - - SetCTLFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_CTL_FONT ) ); - SetCTLHeight( SvxFontHeightItem( 240, 100, RES_CHRATR_CTL_FONTSIZE) ); - SetCTLWeight( SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_CTL_WEIGHT ) ); - SetCTLPosture( SvxPostureItem( ITALIC_NONE, RES_CHRATR_CTL_POSTURE ) ); - - SetUnderline( SvxUnderlineItem( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ) ); - SetOverline( SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE ) ); - SetCrossedOut( SvxCrossedOutItem( STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT ) ); - SetContour( SvxContourItem( sal_False, RES_CHRATR_CONTOUR ) ); - SetShadowed( SvxShadowedItem( sal_False, RES_CHRATR_SHADOWED ) ); - SetColor( SvxColorItem( RES_CHRATR_COLOR ) ); - SvxBoxItem rNew = SvxBoxItem( RES_BOX ); - rNew.SetDistance( 55 ); - SetBox( rNew ); - SetBackground( SvxBrushItem( RES_BACKGROUND ) ); - SetAdjust( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) ); - SetTextOrientation( SvxFrameDirectionItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ) ); - SetVerticalAlignment( SwFmtVertOrient( 0, com::sun::star::text::VertOrientation::NONE, com::sun::star::text::RelOrientation::FRAME ) ); - - eSysLanguage = eNumFmtLanguage = ::GetAppLanguage(); - } + {} void SwTableBoxFmt::SetFont( const SvxFontItem& rNew ) { -- cgit v1.2.3