diff options
author | Alex Ivan <alexnivan@yahoo.com> | 2013-09-12 16:19:51 +0300 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-09-24 01:00:15 +0200 |
commit | bcfb6c9c273b7fad069a9f39b993ef66afceb3d3 (patch) | |
tree | c0399963c0da8972eca01969fb9d3fb109494041 | |
parent | a09c3bf76d1a75d79a2e78c222ed6b18fc80c6ef (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.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/doc/tblafmt.cxx | 152 |
2 files changed, 0 insertions, 158 deletions
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index 8ca1b74289dc..4737268c3262 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -127,12 +127,6 @@ public: void SetName( const OUString& rNew ) { m_pTableStyle->SetName( rNew ); nStrResId = USHRT_MAX; } OUString 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 a1681db730eb..6207277ed774 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -580,158 +580,6 @@ SwTableBoxFormat* SwTableAutoFormat::GetBoxFormat( sal_uInt8 nPos ) const return m_pTableStyle->GetBoxFormat( nPos ); } - -void SwTableAutoFormat::UpdateFromSet( sal_uInt8 nPos, - const SfxItemSet& rSet, - UpdateFlags eFlags, - SvNumberFormatter* pNFormatr) -{ - OSL_ENSURE( nPos < 16, "wrong area" ); - - SwTableBoxFormat* pFormat = GetBoxFormat( nPos ); - - if( UPDATE_CHAR & eFlags ) - { - pFormat->SetFont( static_cast<const SvxFontItem&>(rSet.Get( RES_CHRATR_FONT )) ); - pFormat->SetHeight( static_cast<const SvxFontHeightItem&>(rSet.Get( RES_CHRATR_FONTSIZE )) ); - pFormat->SetWeight( static_cast<const SvxWeightItem&>(rSet.Get( RES_CHRATR_WEIGHT )) ); - pFormat->SetPosture( static_cast<const SvxPostureItem&>(rSet.Get( RES_CHRATR_POSTURE )) ); - pFormat->SetCJKFont( static_cast<const SvxFontItem&>(rSet.Get( RES_CHRATR_CJK_FONT )) ); - pFormat->SetCJKHeight( static_cast<const SvxFontHeightItem&>(rSet.Get( RES_CHRATR_CJK_FONTSIZE )) ); - pFormat->SetCJKWeight( static_cast<const SvxWeightItem&>(rSet.Get( RES_CHRATR_CJK_WEIGHT )) ); - pFormat->SetCJKPosture( static_cast<const SvxPostureItem&>(rSet.Get( RES_CHRATR_CJK_POSTURE )) ); - pFormat->SetCTLFont( static_cast<const SvxFontItem&>(rSet.Get( RES_CHRATR_CTL_FONT )) ); - pFormat->SetCTLHeight( static_cast<const SvxFontHeightItem&>(rSet.Get( RES_CHRATR_CTL_FONTSIZE )) ); - pFormat->SetCTLWeight( static_cast<const SvxWeightItem&>(rSet.Get( RES_CHRATR_CTL_WEIGHT )) ); - pFormat->SetCTLPosture( static_cast<const SvxPostureItem&>(rSet.Get( RES_CHRATR_CTL_POSTURE )) ); - pFormat->SetUnderline( static_cast<const SvxUnderlineItem&>(rSet.Get( RES_CHRATR_UNDERLINE )) ); - pFormat->SetOverline( static_cast<const SvxOverlineItem&>(rSet.Get( RES_CHRATR_OVERLINE )) ); - pFormat->SetCrossedOut( static_cast<const SvxCrossedOutItem&>(rSet.Get( RES_CHRATR_CROSSEDOUT )) ); - pFormat->SetContour( static_cast<const SvxContourItem&>(rSet.Get( RES_CHRATR_CONTOUR )) ); - pFormat->SetShadowed( static_cast<const SvxShadowedItem&>(rSet.Get( RES_CHRATR_SHADOWED )) ); - pFormat->SetColor( static_cast<const SvxColorItem&>(rSet.Get( RES_CHRATR_COLOR )) ); - pFormat->SetAdjust( static_cast<const SvxAdjustItem&>(rSet.Get( RES_PARATR_ADJUST )) ); - } - if( UPDATE_BOX & eFlags ) - { - pFormat->SetBox( static_cast<const SvxBoxItem&>(rSet.Get( RES_BOX )) ); -// FIXME - add attribute IDs for the diagonal line items -// pFormat->SetTLBR( (SvxLineItem&)rSet.Get( RES_... ) ); -// pFormat->SetBLTR( (SvxLineItem&)rSet.Get( RES_... ) ); - pFormat->SetBackground( static_cast<const SvxBrushItem&>(rSet.Get( RES_BACKGROUND )) ); - pFormat->SetTextOrientation(static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR))); - pFormat->SetVerticalAlignment(static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT))); - - const SwTableBoxNumFormat* pNumFormatItem; - const SvNumberformat* pNumFormat = 0; - if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, true, - reinterpret_cast<const SfxPoolItem**>(&pNumFormatItem) ) && pNFormatr && - 0 != (pNumFormat = pNFormatr->GetEntry( pNumFormatItem->GetValue() )) ) - pFormat->SetValueFormat( pNumFormat->GetFormatstring(), - pNumFormat->GetLanguage(), - ::GetAppLanguage()); - else - { - // default - pFormat->SetValueFormat( OUString(), LANGUAGE_SYSTEM, - ::GetAppLanguage() ); - } - } - - // we cannot handle the rest, that's specific to StarCalc -} - -void SwTableAutoFormat::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet, - UpdateFlags eFlags, SvNumberFormatter* pNFormatr) const -{ - const SwTableBoxFormat& rChg = *GetBoxFormat( 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().isEmpty()) - { - 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().isEmpty()) - { - 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.makeBackgroundBrushItem() ); - - rSet.Put(rChg.GetTextOrientation()); - rSet.Put(rChg.GetVerticalAlignment()); - - if( IsValueFormat() && pNFormatr ) - { - OUString sFormat; - LanguageType eLng, eSys; - rChg.GetValueFormat( sFormat, eLng, eSys ); - if( !sFormat.isEmpty() ) - { - short nType; - bool bNew; - sal_Int32 nCheckPos; - sal_uInt32 nKey = pNFormatr->GetIndexPuttingAndConverting( sFormat, eLng, - eSys, nType, bNew, nCheckPos); - rSet.Put( SwTableBoxNumFormat( nKey )); - } - else - rSet.ClearItem( RES_BOXATR_FORMAT ); - } - } - - // we cannot handle the rest, that's specific to StarCalc -} - void SwTableAutoFormat::RestoreTableProperties(SwTable &table) const { SwTableFormat::RestoreTableProperties( m_pTableStyle, table ); |