summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/tblafmt.hxx6
-rw-r--r--sw/source/core/doc/tblafmt.cxx152
2 files changed, 0 insertions, 158 deletions
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index a4a330a13c81..05de6182283c 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -127,12 +127,6 @@ public:
void SetName( const String& rNew ) { m_pTableStyle->SetName( rNew ); nStrResId = USHRT_MAX; }
const String& GetName() const { return m_pTableStyle->GetName(); }
- enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
- void UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
- UpdateFlags eFlags, SvNumberFormatter* );
- void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
- SvNumberFormatter* ) const ;
-
void RestoreTableProperties(SwTable &table) const;
void StoreTableProperties(const SwTable &table);
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 426f0e6fc455..2ff9b387e40f 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -584,158 +584,6 @@ SwTableBoxFmt* SwTableAutoFmt::GetBoxFmt( sal_uInt8 nPos ) const
return m_pTableStyle->GetBoxFmt( nPos );
}
-
-void SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
- const SfxItemSet& rSet,
- UpdateFlags eFlags,
- SvNumberFormatter* pNFmtr)
-{
- OSL_ENSURE( nPos < 16, "wrong area" );
-
- SwTableBoxFmt* pFmt = GetBoxFmt( nPos );
-
- if( UPDATE_CHAR & eFlags )
- {
- pFmt->SetFont( (SvxFontItem&)rSet.Get( RES_CHRATR_FONT ) );
- pFmt->SetHeight( (SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE ) );
- pFmt->SetWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_WEIGHT ) );
- pFmt->SetPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_POSTURE ) );
- pFmt->SetCJKFont( (SvxFontItem&)rSet.Get( RES_CHRATR_CJK_FONT ) );
- pFmt->SetCJKHeight( (SvxFontHeightItem&)rSet.Get( RES_CHRATR_CJK_FONTSIZE ) );
- pFmt->SetCJKWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_CJK_WEIGHT ) );
- pFmt->SetCJKPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_CJK_POSTURE ) );
- pFmt->SetCTLFont( (SvxFontItem&)rSet.Get( RES_CHRATR_CTL_FONT ) );
- pFmt->SetCTLHeight( (SvxFontHeightItem&)rSet.Get( RES_CHRATR_CTL_FONTSIZE ) );
- pFmt->SetCTLWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_CTL_WEIGHT ) );
- pFmt->SetCTLPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_CTL_POSTURE ) );
- pFmt->SetUnderline( (SvxUnderlineItem&)rSet.Get( RES_CHRATR_UNDERLINE ) );
- pFmt->SetOverline( (SvxOverlineItem&)rSet.Get( RES_CHRATR_OVERLINE ) );
- pFmt->SetCrossedOut( (SvxCrossedOutItem&)rSet.Get( RES_CHRATR_CROSSEDOUT ) );
- pFmt->SetContour( (SvxContourItem&)rSet.Get( RES_CHRATR_CONTOUR ) );
- pFmt->SetShadowed( (SvxShadowedItem&)rSet.Get( RES_CHRATR_SHADOWED ) );
- pFmt->SetColor( (SvxColorItem&)rSet.Get( RES_CHRATR_COLOR ) );
- pFmt->SetAdjust( (SvxAdjustItem&)rSet.Get( RES_PARATR_ADJUST ) );
- }
- if( UPDATE_BOX & eFlags )
- {
- pFmt->SetBox( (SvxBoxItem&)rSet.Get( RES_BOX ) );
-// FIXME - add attribute IDs for the diagonal line items
-// pFmt->SetTLBR( (SvxLineItem&)rSet.Get( RES_... ) );
-// pFmt->SetBLTR( (SvxLineItem&)rSet.Get( RES_... ) );
- pFmt->SetBackground( (SvxBrushItem&)rSet.Get( RES_BACKGROUND ) );
- pFmt->SetTextOrientation(static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR)));
- pFmt->SetVerticalAlignment(static_cast<const SwFmtVertOrient&>(rSet.Get(RES_VERT_ORIENT)));
-
- const SwTblBoxNumFormat* pNumFmtItem;
- const SvNumberformat* pNumFormat = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_True,
- (const SfxPoolItem**)&pNumFmtItem ) && pNFmtr &&
- 0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
- pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(),
- pNumFormat->GetLanguage(),
- ::GetAppLanguage());
- else
- {
- // default
- pFmt->SetValueFormat( aEmptyStr, LANGUAGE_SYSTEM,
- ::GetAppLanguage() );
- }
- }
-
- // we cannot handle the rest, that's specific to StarCalc
-}
-
-
-void SwTableAutoFmt::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet,
- UpdateFlags eFlags, SvNumberFormatter* pNFmtr) const
-{
- const SwTableBoxFmt& rChg = *GetBoxFmt( nPos );
-
- if( UPDATE_CHAR & eFlags )
- {
- if( IsFont() )
- {
- rSet.Put( rChg.GetFont() );
- rSet.Put( rChg.GetHeight() );
- rSet.Put( rChg.GetWeight() );
- rSet.Put( rChg.GetPosture() );
- // do not insert empty CJK font
- const SvxFontItem& rCJKFont = rChg.GetCJKFont();
- if( rCJKFont.GetStyleName().Len() )
- {
- rSet.Put( rChg.GetCJKFont() );
- rSet.Put( rChg.GetCJKHeight() );
- rSet.Put( rChg.GetCJKWeight() );
- rSet.Put( rChg.GetCJKPosture() );
- }
- else
- {
- rSet.Put( rChg.GetHeight(), RES_CHRATR_CJK_FONTSIZE );
- rSet.Put( rChg.GetWeight(), RES_CHRATR_CJK_WEIGHT );
- rSet.Put( rChg.GetPosture(), RES_CHRATR_CJK_POSTURE );
- }
- // do not insert empty CTL font
- const SvxFontItem& rCTLFont = rChg.GetCTLFont();
- if( rCTLFont.GetStyleName().Len() )
- {
- rSet.Put( rChg.GetCTLFont() );
- rSet.Put( rChg.GetCTLHeight() );
- rSet.Put( rChg.GetCTLWeight() );
- rSet.Put( rChg.GetCTLPosture() );
- }
- else
- {
- rSet.Put( rChg.GetHeight(), RES_CHRATR_CTL_FONTSIZE );
- rSet.Put( rChg.GetWeight(), RES_CHRATR_CTL_WEIGHT );
- rSet.Put( rChg.GetPosture(), RES_CHRATR_CTL_POSTURE );
- }
- rSet.Put( rChg.GetUnderline() );
- rSet.Put( rChg.GetOverline() );
- rSet.Put( rChg.GetCrossedOut() );
- rSet.Put( rChg.GetContour() );
- rSet.Put( rChg.GetShadowed() );
- rSet.Put( rChg.GetColor() );
- }
- if( IsJustify() )
- rSet.Put( rChg.GetAdjust() );
- }
-
- if( UPDATE_BOX & eFlags )
- {
- if( IsFrame() )
- {
- rSet.Put( rChg.GetBox() );
-// FIXME - uncomment the lines to put the diagonal line items
-// rSet.Put( rChg.GetTLBR() );
-// rSet.Put( rChg.GetBLTR() );
- }
- if( IsBackground() )
- rSet.Put( rChg.GetBackground() );
-
- rSet.Put(rChg.GetTextOrientation());
- rSet.Put(rChg.GetVerticalAlignment());
-
- if( IsValueFormat() && pNFmtr )
- {
- String sFmt; LanguageType eLng, eSys;
- rChg.GetValueFormat( sFmt, eLng, eSys );
- if( sFmt.Len() )
- {
- short nType;
- bool bNew;
- xub_StrLen nCheckPos;
- sal_uInt32 nKey = pNFmtr->GetIndexPuttingAndConverting( sFmt, eLng,
- eSys, nType, bNew, nCheckPos);
- rSet.Put( SwTblBoxNumFormat( nKey ));
- }
- else
- rSet.ClearItem( RES_BOXATR_FORMAT );
- }
- }
-
- // we cannot handle the rest, that's specific to StarCalc
-}
-
void SwTableAutoFmt::RestoreTableProperties(SwTable &table) const
{
SwTableFmt::RestoreTableProperties( m_pTableStyle, table );