summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-09-12 16:19:51 +0300
committerAlex Ivan <alexnivan@yahoo.com>2013-09-12 16:19:51 +0300
commitb3781d43adbc0c9701af80d393c302c9c2252ba2 (patch)
treea3afecf49a90e27a4a373372ad99b6ab6efb7df1
parentd78e8d25c190f8a73f5d43e68ba99177e914c313 (diff)
Remove obsolete UpdateTo/FromSet methods
These should have been removed some time ago, since they were not used any more. Seems they somehow escaped. Change-Id: I958de698f96a6c48e4cb41dc5226f96134d2886b
-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 );