summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-07-04 14:01:17 +0300
committerAlex Ivan <alexnivan@yahoo.com>2013-07-04 14:01:17 +0300
commit6668e83e1341112872c8e7f376534c6c76aac514 (patch)
tree2da2c98085d6162fe3c2e1f186d096113b401a01
parent6f2572288be71068c32831824baf6d7b60217b59 (diff)
Remove SwAutoBoxFmt class from implementation
SwAutoBoxFmt class has been completely removed from the current implementation. All the functionality has been moved to SwTableBoxFmt. Change-Id: I4d4486a7819c125cf5ef6785eb4af39fff3cf145
-rw-r--r--sw/inc/tblafmt.hxx121
-rw-r--r--sw/source/core/bastyp/init.cxx3
-rw-r--r--sw/source/core/doc/tblafmt.cxx136
3 files changed, 0 insertions, 260 deletions
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 98f2132a50f3..a1e59b3a9791 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -63,124 +63,6 @@ struct SwAfVersions;
class SvNumberFormatter;
-class SwBoxAutoFmt
-{
- // common attributes of Calc and Writer
- // --- from 641 on: CJK and CTL font settings
- SvxFontItem aFont;
- SvxFontHeightItem aHeight;
- SvxWeightItem aWeight;
- SvxPostureItem aPosture;
-
- SvxFontItem aCJKFont;
- SvxFontHeightItem aCJKHeight;
- SvxWeightItem aCJKWeight;
- SvxPostureItem aCJKPosture;
-
- SvxFontItem aCTLFont;
- SvxFontHeightItem aCTLHeight;
- SvxWeightItem aCTLWeight;
- SvxPostureItem aCTLPosture;
-
- SvxUnderlineItem aUnderline;
- SvxOverlineItem aOverline;
- SvxCrossedOutItem aCrossedOut;
- SvxContourItem aContour;
- SvxShadowedItem aShadowed;
- SvxColorItem aColor;
- SvxBoxItem aBox;
- SvxLineItem aTLBR;
- SvxLineItem aBLTR;
- SvxBrushItem aBackground;
-
- // Writer specific
- SvxAdjustItem aAdjust;
- SvxFrameDirectionItem m_aTextOrientation;
- SwFmtVertOrient m_aVerticalAlignment;
-
- // Calc specific
- SvxHorJustifyItem aHorJustify;
- SvxVerJustifyItem aVerJustify;
- SfxBoolItem aStacked;
- SvxMarginItem aMargin;
- SfxBoolItem aLinebreak;
- SfxInt32Item aRotateAngle;
- SvxRotateModeItem aRotateMode;
-
- // number format
- String sNumFmtString;
- LanguageType eSysLanguage, eNumFmtLanguage;
-
-public:
- SwBoxAutoFmt();
- SwBoxAutoFmt( const SwBoxAutoFmt& rNew );
- ~SwBoxAutoFmt();
-
- int operator==( const SwBoxAutoFmt& rCmp ) const;
- SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew );
-
- // The get-methods.
- const SvxFontItem &GetFont() const { return aFont; }
- const SvxFontHeightItem &GetHeight() const { return aHeight; }
- const SvxWeightItem &GetWeight() const { return aWeight; }
- const SvxPostureItem &GetPosture() const { return aPosture; }
- const SvxFontItem &GetCJKFont() const { return aCJKFont; }
- const SvxFontHeightItem &GetCJKHeight() const { return aCJKHeight; }
- const SvxWeightItem &GetCJKWeight() const { return aCJKWeight; }
- const SvxPostureItem &GetCJKPosture() const { return aCJKPosture; }
- const SvxFontItem &GetCTLFont() const { return aCTLFont; }
- const SvxFontHeightItem &GetCTLHeight() const { return aCTLHeight; }
- const SvxWeightItem &GetCTLWeight() const { return aCTLWeight; }
- const SvxPostureItem &GetCTLPosture() const { return aCTLPosture; }
- const SvxUnderlineItem &GetUnderline() const { return aUnderline; }
- const SvxOverlineItem &GetOverline() const { return aOverline; }
- const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; }
- const SvxContourItem &GetContour() const { return aContour; }
- const SvxShadowedItem &GetShadowed() const { return aShadowed; }
- const SvxColorItem &GetColor() const { return aColor; }
- const SvxAdjustItem &GetAdjust() const { return aAdjust; }
- const SvxFrameDirectionItem& GetTextOrientation() const { return m_aTextOrientation; }
- const SwFmtVertOrient& GetVerticalAlignment() const { return m_aVerticalAlignment; }
- const SvxBoxItem &GetBox() const { return aBox; }
- const SvxLineItem &GetTLBR() const { return aTLBR; }
- const SvxLineItem &GetBLTR() const { return aBLTR; }
- const SvxBrushItem &GetBackground() const { return aBackground; }
- void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const
- { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; }
-
- // The set-methods.
- void SetFont( const SvxFontItem& rNew ) { aFont = rNew; }
- void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; }
- void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; }
- void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; }
- void SetCJKFont( const SvxFontItem& rNew ) { aCJKFont = rNew; }
- void SetCJKHeight( const SvxFontHeightItem& rNew ) { aCJKHeight = rNew; }
- void SetCJKWeight( const SvxWeightItem& rNew ) { aCJKWeight = rNew; }
- void SetCJKPosture( const SvxPostureItem& rNew ) { aCJKPosture = rNew; }
- void SetCTLFont( const SvxFontItem& rNew ) { aCTLFont = rNew; }
- void SetCTLHeight( const SvxFontHeightItem& rNew ) { aCTLHeight = rNew; }
- void SetCTLWeight( const SvxWeightItem& rNew ) { aCTLWeight = rNew; }
- void SetCTLPosture( const SvxPostureItem& rNew ) { aCTLPosture = rNew; }
- void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; }
- void SetOverline( const SvxOverlineItem& rNew ) { aOverline = rNew; }
- void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; }
- void SetContour( const SvxContourItem& rNew ) { aContour = rNew; }
- void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; }
- void SetColor( const SvxColorItem& rNew ) { aColor = rNew; }
- void SetAdjust( const SvxAdjustItem& rNew )
- {
- aAdjust.SetAdjust( rNew.GetAdjust() );
- aAdjust.SetOneWord( rNew.GetOneWord() );
- aAdjust.SetLastBlock( rNew.GetLastBlock() );
- }
- void SetTextOrientation(const SvxFrameDirectionItem& rNew) { m_aTextOrientation = rNew; }
- void SetVerticalAlignment(const SwFmtVertOrient& rNew) { m_aVerticalAlignment = rNew; }
- void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; }
- void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; }
- void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
- { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
-};
-
/*
@remarks
A table has a number of lines. These lines seem to correspond with rows, except in the case of
@@ -227,9 +109,6 @@ properties are stored per-table, and are lossless.
*/
class SW_DLLPUBLIC SwTableAutoFmt
{
- friend void _FinitCore(); // To destroy dflt. pointer.
- static SwBoxAutoFmt* pDfltBoxAutoFmt;
-
SwTableFmt* m_pTableStyle;
sal_uInt16 nStrResId;
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index e6af8f9b1f4c..934c821ac0cd 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -725,9 +725,6 @@ void _FinitCore()
delete pCollator;
delete pCaseCollator;
- // destroy default TableAutoFormat
- delete SwTableAutoFmt::pDfltBoxAutoFmt;
-
delete SwSelPaintRects::pMapMode;
delete SwFntObj::pPixMap;
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 1c72eb04ad08..14e55b61e320 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -87,8 +87,6 @@ const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_31005;
const sal_uInt16 AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_31005;
const sal_uInt16 AUTOFORMAT_FILE_VERSION= SOFFICE_FILEFORMAT_50;
-SwBoxAutoFmt* SwTableAutoFmt::pDfltBoxAutoFmt = 0;
-
#define sAutoTblFmtName "autotbl.fmt"
namespace
@@ -261,140 +259,6 @@ void SwAfVersions::Load( SvStream& rStream, sal_uInt16 nVer )
rStream >> nNumFmtVersion;
}
-SwBoxAutoFmt::SwBoxAutoFmt()
- : aFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_FONT ) ),
- aHeight( 240, 100, RES_CHRATR_FONTSIZE ),
- aWeight( WEIGHT_NORMAL, RES_CHRATR_WEIGHT ),
- aPosture( ITALIC_NONE, RES_CHRATR_POSTURE ),
-
- aCJKFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_CJK_FONT ) ),
- aCJKHeight( 240, 100, RES_CHRATR_CJK_FONTSIZE ),
- aCJKWeight( WEIGHT_NORMAL, RES_CHRATR_CJK_WEIGHT ),
- aCJKPosture( ITALIC_NONE, RES_CHRATR_CJK_POSTURE ),
-
- aCTLFont( *(SvxFontItem*)GetDfltAttr( RES_CHRATR_CTL_FONT ) ),
- aCTLHeight( 240, 100, RES_CHRATR_CTL_FONTSIZE ),
- aCTLWeight( WEIGHT_NORMAL, RES_CHRATR_CTL_WEIGHT ),
- aCTLPosture( ITALIC_NONE, RES_CHRATR_CTL_POSTURE ),
-
- aUnderline( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ),
- aOverline( UNDERLINE_NONE, RES_CHRATR_OVERLINE ),
- aCrossedOut( STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT ),
- aContour( sal_False, RES_CHRATR_CONTOUR ),
- aShadowed( sal_False, RES_CHRATR_SHADOWED ),
- aColor( RES_CHRATR_COLOR ),
- aBox( RES_BOX ),
- aTLBR( 0 ),
- aBLTR( 0 ),
- aBackground( RES_BACKGROUND ),
- aAdjust( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ),
- m_aTextOrientation(FRMDIR_ENVIRONMENT, RES_FRAMEDIR),
- m_aVerticalAlignment(0, com::sun::star::text::VertOrientation::NONE, com::sun::star::text::RelOrientation::FRAME),
- aHorJustify( SVX_HOR_JUSTIFY_STANDARD, 0),
- aVerJustify( SVX_VER_JUSTIFY_STANDARD, 0),
- aStacked( 0 ),
- aMargin( 0 ),
- aLinebreak( 0 ),
- aRotateAngle( 0 ),
-
-// FIXME - add attribute IDs for the diagonal line items
-// aTLBR( RES_... ),
-// aBLTR( RES_... ),
- aRotateMode( SVX_ROTATE_MODE_STANDARD, 0 )
-{
- eSysLanguage = eNumFmtLanguage = ::GetAppLanguage();
- aBox.SetDistance( 55 );
-}
-
-
-SwBoxAutoFmt::SwBoxAutoFmt( const SwBoxAutoFmt& rNew )
- : aFont( rNew.aFont ),
- aHeight( rNew.aHeight ),
- aWeight( rNew.aWeight ),
- aPosture( rNew.aPosture ),
- aCJKFont( rNew.aCJKFont ),
- aCJKHeight( rNew.aCJKHeight ),
- aCJKWeight( rNew.aCJKWeight ),
- aCJKPosture( rNew.aCJKPosture ),
- aCTLFont( rNew.aCTLFont ),
- aCTLHeight( rNew.aCTLHeight ),
- aCTLWeight( rNew.aCTLWeight ),
- aCTLPosture( rNew.aCTLPosture ),
- aUnderline( rNew.aUnderline ),
- aOverline( rNew.aOverline ),
- aCrossedOut( rNew.aCrossedOut ),
- aContour( rNew.aContour ),
- aShadowed( rNew.aShadowed ),
- aColor( rNew.aColor ),
- aBox( rNew.aBox ),
- aTLBR( rNew.aTLBR ),
- aBLTR( rNew.aBLTR ),
- aBackground( rNew.aBackground ),
- aAdjust( rNew.aAdjust ),
- m_aTextOrientation(rNew.m_aTextOrientation),
- m_aVerticalAlignment(rNew.m_aVerticalAlignment),
- aHorJustify( rNew.aHorJustify ),
- aVerJustify( rNew.aVerJustify ),
- aStacked( rNew.aStacked ),
- aMargin( rNew.aMargin ),
- aLinebreak( rNew.aLinebreak ),
- aRotateAngle( rNew.aRotateAngle ),
- aRotateMode( rNew.aRotateMode ),
- sNumFmtString( rNew.sNumFmtString ),
- eSysLanguage( rNew.eSysLanguage ),
- eNumFmtLanguage( rNew.eNumFmtLanguage )
-{
-}
-
-
-SwBoxAutoFmt::~SwBoxAutoFmt()
-{
-}
-
-SwBoxAutoFmt& SwBoxAutoFmt::operator=( const SwBoxAutoFmt& rNew )
-{
- aFont = rNew.aFont;
- aHeight = rNew.aHeight;
- aWeight = rNew.aWeight;
- aPosture = rNew.aPosture;
- aCJKFont = rNew.aCJKFont;
- aCJKHeight = rNew.aCJKHeight;
- aCJKWeight = rNew.aCJKWeight;
- aCJKPosture = rNew.aCJKPosture;
- aCTLFont = rNew.aCTLFont;
- aCTLHeight = rNew.aCTLHeight;
- aCTLWeight = rNew.aCTLWeight;
- aCTLPosture = rNew.aCTLPosture;
- aUnderline = rNew.aUnderline;
- aOverline = rNew.aOverline;
- aCrossedOut = rNew.aCrossedOut;
- aContour = rNew.aContour;
- aShadowed = rNew.aShadowed;
- aColor = rNew.aColor;
- SetAdjust( rNew.aAdjust );
- m_aTextOrientation = rNew.m_aTextOrientation;
- m_aVerticalAlignment = rNew.m_aVerticalAlignment;
- aBox = rNew.aBox;
- aTLBR = rNew.aTLBR;
- aBLTR = rNew.aBLTR;
- aBackground = rNew.aBackground;
-
- aHorJustify = rNew.aHorJustify;
- aVerJustify = rNew.aVerJustify;
- aStacked.SetValue( rNew.aStacked.GetValue() );
- aMargin = rNew.aMargin;
- aLinebreak.SetValue( rNew.aLinebreak.GetValue() );
- aRotateAngle.SetValue( rNew.aRotateAngle.GetValue() );
- aRotateMode.SetValue( rNew.aRotateMode.GetValue() );
-
- sNumFmtString = rNew.sNumFmtString;
- eSysLanguage = rNew.eSysLanguage;
- eNumFmtLanguage = rNew.eNumFmtLanguage;
-
- return *this;
-}
-
-
#define READ( aItem, aItemType, nVers )\
pNew = aItem.Create(rStream, nVers ); \
aItem = *(aItemType*)pNew; \