diff options
-rwxr-xr-x | editeng/inc/editeng/borderline.hxx | 31 | ||||
-rwxr-xr-x | editeng/inc/editeng/editrids.hrc | 30 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 204 | ||||
-rwxr-xr-x | editeng/source/items/svxitems.src | 64 | ||||
-rw-r--r-- | editeng/source/rtf/rtfitem.cxx | 16 |
5 files changed, 200 insertions, 145 deletions
diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx index 1c6701f41253..de812250ab90 100755 --- a/editeng/inc/editeng/borderline.hxx +++ b/editeng/inc/editeng/borderline.hxx @@ -32,6 +32,7 @@ #include <tools/color.hxx> #include <svl/poolitem.hxx> #include <editeng/editengdllapi.h> +#include <svtools/ctrlbox.hxx> // Line defaults in twips (former Writer defaults): @@ -113,6 +114,12 @@ class EDITENG_DLLPUBLIC SvxBorderLine { protected: Color aColor; + + double m_nWidth; + BorderWidthImpl m_aWidthImpl; + long m_nMult; + long m_nDiv; + SvxBorderStyle m_nStyle; sal_uInt16 nOutWidth; sal_uInt16 nInWidth; @@ -124,9 +131,11 @@ protected: Color (*m_pColorGapFn)( Color ); public: - SvxBorderLine( const Color *pCol = 0, sal_uInt16 nOut = 0, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0, - SvxBorderStyle nStyle = SOLID, bool bUseLeftTop = false, - Color (*pColorOutFn)( Color ) = &darkColor, Color (*pColorInFn)( Color ) = &darkColor, + SvxBorderLine( const Color *pCol = 0, + long nWidth = 0, SvxBorderStyle nStyle = SOLID, + bool bUseLeftTop = false, + Color (*pColorOutFn)( Color ) = &darkColor, + Color (*pColorInFn)( Color ) = &darkColor, Color (*pColorGapFn)( Color ) = NULL ); SvxBorderLine( const SvxBorderLine& r ); @@ -137,9 +146,9 @@ public: Color GetColorIn( bool bLeftOrTop = true ) const; bool HasGapColor() const { return m_pColorGapFn != NULL; } Color GetColorGap() const; - sal_uInt16 GetOutWidth() const { return nOutWidth; } - sal_uInt16 GetInWidth() const { return nInWidth; } - sal_uInt16 GetDistance() const { return nDistance; } + sal_uInt16 GetOutWidth() const; + sal_uInt16 GetInWidth() const; + sal_uInt16 GetDistance() const; SvxBorderStyle GetStyle() const { return m_nStyle; } @@ -148,9 +157,6 @@ public: void SetColorInFn( Color (*pColorInFn)( Color ) ) { m_pColorInFn = pColorInFn; } void SetColorGapFn( Color (*pColorGapFn)( Color ) ) { m_pColorGapFn = pColorGapFn; } void SetUseLeftTop( bool bUseLeftTop ) { m_bUseLeftTop = bUseLeftTop; } - void SetOutWidth( sal_uInt16 nNew ) { nOutWidth = nNew; } - void SetInWidth( sal_uInt16 nNew ) { nInWidth = nNew; } - void SetDistance( sal_uInt16 nNew ) { nDistance = nNew; } void SetStyle( SvxBorderStyle nNew ); void ScaleMetrics( long nMult, long nDiv ); @@ -162,9 +168,9 @@ public: bool HasPriority( const SvxBorderLine& rOtherLine ) const; - bool isEmpty() const { return (0 == nOutWidth && 0 == nInWidth && 0 == nDistance); } - bool isDouble() const { return (0 != nOutWidth && 0 != nInWidth); } - sal_uInt16 getWidth() const { return nOutWidth + nInWidth + nDistance; } + bool isEmpty() const { return m_aWidthImpl.IsEmpty( ); } + bool isDouble() const { return m_aWidthImpl.IsDouble(); } + sal_uInt16 getWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); } static Color darkColor( Color aMain ); static Color lightColor( Color aMain ); @@ -173,6 +179,7 @@ public: static Color threeDMediumColor( Color aMain ); static Color threeDDarkColor( Color aMain ); + static BorderWidthImpl getWidthImpl( SvxBorderStyle nStyle ); }; // ============================================================================ diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc index 88370d44dfef..a77b87bfac91 100755 --- a/editeng/inc/editeng/editrids.hrc +++ b/editeng/inc/editeng/editrids.hrc @@ -280,22 +280,20 @@ #define RID_SVXITEMS_SHADOW_BOTTOMRIGHT (RID_EDIT_START + 233) // Border lines -#define RID_SINGLE_LINE0 (RID_EDIT_START + 234) -#define RID_SINGLE_LINE1 (RID_EDIT_START + 235) -#define RID_SINGLE_LINE2 (RID_EDIT_START + 236) -#define RID_SINGLE_LINE3 (RID_EDIT_START + 237) -#define RID_SINGLE_LINE4 (RID_EDIT_START + 238) -#define RID_DOUBLE_LINE0 (RID_EDIT_START + 239) -#define RID_DOUBLE_LINE1 (RID_EDIT_START + 240) -#define RID_DOUBLE_LINE2 (RID_EDIT_START + 241) -#define RID_DOUBLE_LINE3 (RID_EDIT_START + 242) -#define RID_DOUBLE_LINE4 (RID_EDIT_START + 243) -#define RID_DOUBLE_LINE5 (RID_EDIT_START + 244) -#define RID_DOUBLE_LINE6 (RID_EDIT_START + 245) -#define RID_DOUBLE_LINE7 (RID_EDIT_START + 246) -#define RID_DOUBLE_LINE8 (RID_EDIT_START + 247) -#define RID_DOUBLE_LINE9 (RID_EDIT_START + 248) -#define RID_DOUBLE_LINE10 (RID_EDIT_START + 249) +#define RID_SOLID (RID_EDIT_START + 234) +#define RID_DOTTED (RID_EDIT_START + 235) +#define RID_DASHED (RID_EDIT_START + 236) +#define RID_DOUBLE (RID_EDIT_START + 237) +#define RID_THINTHICK_SMALLGAP (RID_EDIT_START + 238) +#define RID_THINTHICK_MEDIUMGAP (RID_EDIT_START + 239) +#define RID_THINTHICK_LARGEGAP (RID_EDIT_START + 240) +#define RID_THICKTHIN_SMALLGAP (RID_EDIT_START + 241) +#define RID_THICKTHIN_MEDIUMGAP (RID_EDIT_START + 242) +#define RID_THICKTHIN_LARGEGAP (RID_EDIT_START + 243) +#define RID_EMBOSSED (RID_EDIT_START + 244) +#define RID_ENGRAVED (RID_EDIT_START + 245) +#define RID_OUTSET (RID_EDIT_START + 246) +#define RID_INSET (RID_EDIT_START + 247) // Metric-Text #define RID_SVXITEMS_METRIC_MM (RID_EDIT_START + 250) diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 23ac50c0df71..e6d6359e68fd 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1601,14 +1601,15 @@ Color SvxBorderLine::threeDMediumColor( Color aMain ) return lcl_compute3DColor( aMain, -42, -0, 42 ); } -SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist, +SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth, SvxBorderStyle nStyle, bool bUseLeftTop, Color (*pColorOutFn)( Color ), Color (*pColorInFn)( Color ), Color (*pColorGapFn)( Color ) ) -: m_nStyle( nStyle ) -, nOutWidth( nOut ) -, nInWidth ( nIn ) -, nDistance( nDist ) +: m_nWidth( nWidth ) +, m_aWidthImpl( SvxBorderLine::getWidthImpl( nStyle ) ) +, m_nMult( 1 ) +, m_nDiv( 1 ) +, m_nStyle( nStyle ) , m_bUseLeftTop( bUseLeftTop ) , m_pColorOutFn( pColorOutFn ) , m_pColorInFn( pColorInFn ) @@ -1618,6 +1619,88 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn aColor = *pCol; } +BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle ) +{ + BorderWidthImpl aImpl; + + switch ( nStyle ) + { + case SOLID: + case DOTTED: + case DASHED: + aImpl = BorderWidthImpl( CHANGE_LINE1, 1.0 ); + break; + + // Double lines + + case DOUBLE: + aImpl = BorderWidthImpl( + CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, + 1.0, 1.0, 1.0 ); + break; + + case THINTHICK_SMALLGAP: + aImpl = BorderWidthImpl( CHANGE_LINE1, 1.0, 75.0, 75.0 ); + break; + + case THINTHICK_MEDIUMGAP: + aImpl = BorderWidthImpl( + CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, + 1.0, 0.5, 0.5 ); + break; + + case THINTHICK_LARGEGAP: + aImpl = BorderWidthImpl( CHANGE_DIST, 75.0, 150.0, 1.0 ); + break; + + case THICKTHIN_SMALLGAP: + aImpl = BorderWidthImpl( CHANGE_DIST, 75.0, 1.0, 75.0 ); + break; + + case THICKTHIN_MEDIUMGAP: + aImpl = BorderWidthImpl( + CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, + 0.5, 1.0, 0.5 ); + break; + + case THICKTHIN_LARGEGAP: + aImpl = BorderWidthImpl( CHANGE_DIST, 150.0, 75.0, 1.0 ); + break; + + // Engraved / Embossed + /* + * Word compat: the lines widths are exactly following this rule, shouldbe: + * 0.75pt up to 3pt and then 3pt + */ + + case EMBOSSED: + case ENGRAVED: + aImpl = BorderWidthImpl( + CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, + 0.5, 0.5, 1.0 ); + break; + + // Inset / Outset + /* + * Word compat: the gap width should be measured relatively to the biggest width for the + * row or column. + */ + case OUTSET: + aImpl = BorderWidthImpl( + CHANGE_LINE2 | CHANGE_DIST, + 75.0, 1.0, 1.0 ); + break; + + case INSET: + aImpl = BorderWidthImpl( + CHANGE_LINE1 | CHANGE_DIST, + 1.0, 75.0, 1.0 ); + break; + } + + return aImpl; +} + // ----------------------------------------------------------------------- SvxBorderLine::SvxBorderLine( const SvxBorderLine& r ) @@ -1630,9 +1713,7 @@ SvxBorderLine::SvxBorderLine( const SvxBorderLine& r ) SvxBorderLine& SvxBorderLine::operator=( const SvxBorderLine& r ) { aColor = r.aColor; - nOutWidth = r.nOutWidth; - nInWidth = r.nInWidth; - nDistance = r.nDistance; + m_aWidthImpl = r.m_aWidthImpl; m_nStyle = r.m_nStyle; m_bUseLeftTop = r.m_bUseLeftTop; m_pColorOutFn = r.m_pColorOutFn; @@ -1645,9 +1726,23 @@ SvxBorderLine& SvxBorderLine::operator=( const SvxBorderLine& r ) void SvxBorderLine::ScaleMetrics( long nMult, long nDiv ) { - nOutWidth = (sal_uInt16)Scale( nOutWidth, nMult, nDiv ); - nInWidth = (sal_uInt16)Scale( nInWidth, nMult, nDiv ); - nDistance = (sal_uInt16)Scale( nDistance, nMult, nDiv ); + m_nMult = nMult; + m_nDiv = nDiv; +} + +USHORT SvxBorderLine::GetOutWidth() const +{ + return (sal_uInt16)Scale( m_aWidthImpl.GetLine1( m_nWidth ), m_nMult, m_nDiv ); +} + +USHORT SvxBorderLine::GetInWidth() const +{ + return (sal_uInt16)Scale( m_aWidthImpl.GetLine2( m_nWidth ), m_nMult, m_nDiv ); +} + +USHORT SvxBorderLine::GetDistance() const +{ + return (sal_uInt16)Scale( m_aWidthImpl.GetGap( m_nWidth ), m_nMult, m_nDiv ); } // ----------------------------------------------------------------------- @@ -1655,9 +1750,7 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv ) sal_Bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const { return ( ( aColor == rCmp.aColor ) && - ( nInWidth == rCmp.GetInWidth() ) && - ( nOutWidth == rCmp.GetOutWidth() ) && - ( nDistance == rCmp.GetDistance() ) && + ( m_aWidthImpl == rCmp.m_aWidthImpl ) && ( m_nStyle == rCmp.GetStyle() ) && ( m_bUseLeftTop == rCmp.m_bUseLeftTop ) && ( m_pColorOutFn == rCmp.m_pColorOutFn ) && @@ -1707,7 +1800,7 @@ Color SvxBorderLine::GetColorOut( bool bLeftOrTop ) const { Color aResult = aColor; - if ( nInWidth > 0 && nOutWidth > 0 && m_pColorOutFn != NULL ) + if ( m_aWidthImpl.IsDouble() && m_pColorOutFn != NULL ) { if ( !bLeftOrTop && m_bUseLeftTop ) aResult = (*m_pColorInFn)( aColor ); @@ -1722,7 +1815,7 @@ Color SvxBorderLine::GetColorIn( bool bLeftOrTop ) const { Color aResult = aColor; - if ( nInWidth > 0 && nOutWidth > 0 && m_pColorInFn != NULL ) + if ( m_aWidthImpl.IsDouble() && m_pColorInFn != NULL ) { if ( !bLeftOrTop && m_bUseLeftTop ) aResult = (*m_pColorOutFn)( aColor ); @@ -1737,7 +1830,7 @@ Color SvxBorderLine::GetColorGap( ) const { Color aResult = aColor; - if ( nInWidth > 0 && nOutWidth > 0 && m_pColorGapFn != NULL ) + if ( m_aWidthImpl.IsDouble() && m_pColorGapFn != NULL ) { aResult = (*m_pColorGapFn)( aColor ); } @@ -1752,61 +1845,24 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, const IntlWrapper* pIntl, sal_Bool bMetricStr) const { - sal_uInt16 nResId = 0; - - if ( 0 == nDistance ) - { - // einfach Linie - if ( DEF_LINE_WIDTH_0 == nOutWidth ) - nResId = RID_SINGLE_LINE0; - else if ( DEF_LINE_WIDTH_1 == nOutWidth ) - nResId = RID_SINGLE_LINE1; - else if ( DEF_LINE_WIDTH_2 == nOutWidth ) - nResId = RID_SINGLE_LINE2; - else if ( DEF_LINE_WIDTH_3 == nOutWidth ) - nResId = RID_SINGLE_LINE3; - else if ( DEF_LINE_WIDTH_4 == nOutWidth ) - nResId = RID_SINGLE_LINE4; - } - else if ( DEF_LINE_WIDTH_1 == nDistance ) + static const sal_uInt16 aStyleIds[] = { - // double line, small gap - if ( DEF_LINE_WIDTH_0 == nOutWidth && DEF_LINE_WIDTH_0 == nInWidth ) - nResId = RID_DOUBLE_LINE0; - else if ( DEF_LINE_WIDTH_1 == nOutWidth && - DEF_LINE_WIDTH_1 == nInWidth ) - nResId = RID_DOUBLE_LINE2; - else if ( DEF_LINE_WIDTH_1 == nOutWidth && - DEF_LINE_WIDTH_2 == nInWidth ) - nResId = RID_DOUBLE_LINE8; - } - else if ( DEF_LINE_WIDTH_2 == nDistance ) - { - // double line, large gap - if ( DEF_LINE_WIDTH_0 == nOutWidth && DEF_LINE_WIDTH_0 == nInWidth ) - nResId = RID_DOUBLE_LINE1; - else if ( DEF_LINE_WIDTH_2 == nOutWidth && - DEF_LINE_WIDTH_2 == nInWidth ) - nResId = RID_DOUBLE_LINE3; - else if ( DEF_LINE_WIDTH_1 == nOutWidth && - DEF_LINE_WIDTH_0 == nInWidth ) - nResId = RID_DOUBLE_LINE4; - else if ( DEF_LINE_WIDTH_2 == nOutWidth && - DEF_LINE_WIDTH_0 == nInWidth ) - nResId = RID_DOUBLE_LINE5; - else if ( DEF_LINE_WIDTH_3 == nOutWidth && - DEF_LINE_WIDTH_0 == nInWidth ) - nResId = RID_DOUBLE_LINE6; - else if ( DEF_LINE_WIDTH_2 == nOutWidth && - DEF_LINE_WIDTH_1 == nInWidth ) - nResId = RID_DOUBLE_LINE7; - else if ( DEF_LINE_WIDTH_3 == nOutWidth && - DEF_LINE_WIDTH_2 == nInWidth ) - nResId = RID_DOUBLE_LINE9; - else if ( DEF_LINE_WIDTH_2 == nOutWidth && - DEF_LINE_WIDTH_3 == nInWidth ) - nResId = RID_DOUBLE_LINE10; - } + RID_SOLID, + RID_DOTTED, + RID_DASHED, + RID_DOUBLE, + RID_THINTHICK_SMALLGAP, + RID_THINTHICK_MEDIUMGAP, + RID_THINTHICK_LARGEGAP, + RID_THICKTHIN_SMALLGAP, + RID_THICKTHIN_MEDIUMGAP, + RID_THICKTHIN_LARGEGAP, + RID_EMBOSSED, + RID_ENGRAVED, + RID_OUTSET, + RID_INSET + }; + sal_uInt16 nResId = aStyleIds[m_nStyle]; String aStr; aStr += sal_Unicode('('); aStr += ::GetColorString( aColor ); @@ -1817,15 +1873,15 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, else { String sMetric = EE_RESSTR(GetMetricId( eDestUnit )); - aStr += GetMetricText( (long)nInWidth, eSrcUnit, eDestUnit, pIntl ); + aStr += GetMetricText( (long)GetInWidth(), eSrcUnit, eDestUnit, pIntl ); if ( bMetricStr ) aStr += sMetric; aStr += cpDelim; - aStr += GetMetricText( (long)nOutWidth, eSrcUnit, eDestUnit, pIntl ); + aStr += GetMetricText( (long)GetOutWidth(), eSrcUnit, eDestUnit, pIntl ); if ( bMetricStr ) aStr += sMetric; aStr += cpDelim; - aStr += GetMetricText( (long)nDistance, eSrcUnit, eDestUnit, pIntl ); + aStr += GetMetricText( (long)GetDistance(), eSrcUnit, eDestUnit, pIntl ); if ( bMetricStr ) aStr += sMetric; } diff --git a/editeng/source/items/svxitems.src b/editeng/source/items/svxitems.src index 5b9d01660286..5367db6b068b 100755 --- a/editeng/source/items/svxitems.src +++ b/editeng/source/items/svxitems.src @@ -541,69 +541,61 @@ String RID_SVXITEMS_TAB_ADJUST_DEFAULT { Text [ en-US ] = "Default" ; }; -String RID_SINGLE_LINE0 +String RID_SOLID { - Text [ en-US ] = "Single, fine lines" ; + Text [ en-US ] = "Single, solid" ; }; -String RID_SINGLE_LINE1 +String RID_DOTTED { - Text [ en-US ] = "Single, thin" ; + Text [ en-US ] = "Single, dotted" ; }; -String RID_SINGLE_LINE2 +String RID_DASHED { - Text [ en-US ] = "Single, thick" ; + Text [ en-US ] = "Single, dashed" ; }; -String RID_SINGLE_LINE3 +String RID_SINGLE_DOUBLE { - Text [ en-US ] = "Single, very thick" ; + Text [ en-US ] = "Double" ; }; -String RID_SINGLE_LINE4 +String RID_THINTHICK_SMALLGAP { - Text [ en-US ] = "Single, bold" ; + Text [ en-US ] = "Double, inside: fine, outside: thick, spacing: small"; }; -String RID_DOUBLE_LINE0 +String RID_THINTHICK_MEDIUMGAP { - Text [ en-US ] = "Double, fine lines, spacing: small" ; + Text [ en-US ] = "Double, inside: fine, outside: thick, spacing: medium"; }; -String RID_DOUBLE_LINE1 +String RID_THINTHICK_LARGEGAP { - Text [ en-US ] = "Double, fine line, spacing: large" ; + Text [ en-US ] = "Double, inside: fine, outside: thick, spacing: large"; }; -String RID_DOUBLE_LINE2 +String RID_THICKTHIN_SMALLGAP { - Text [ en-US ] = "Double, thin, spacing: small" ; + Text [ en-US ] = "Double, inside: thick, outside: fine, spacing: small"; }; -String RID_DOUBLE_LINE3 +String RID_THICKTHIN_MEDIUMGAP { - Text [ en-US ] = "Double, thick, spacing: large" ; + Text [ en-US ] = "Double, inside: thick, outside: fine, spacing: medium"; }; -String RID_DOUBLE_LINE4 +String RID_THICKTHIN_LARGEGAP { - Text [ en-US ] = "Double, inside: fine lines, outside: thin, spacing: large" ; + Text [ en-US ] = "Double, inside: thick, outside: fine, spacing: large"; }; -String RID_DOUBLE_LINE5 +String RID_EMBOSSED { - Text [ en-US ] = "Double, inside: fine lines, outside: thick, spacing: large" ; + Text [ en-US ] = "3D embossed" ; }; -String RID_DOUBLE_LINE6 +String RID_ENGRAVED { - Text [ en-US ] = "Double, inside: fine lines, outside: very thick, spacing: large" ; + Text [ en-US ] = "3D engraved" ; }; -String RID_DOUBLE_LINE7 +String RID_INSET { - Text [ en-US ] = "Double, inside: thin, outside: thick, spacing: large" ; + Text [ en-US ] = "Inset" ; }; -String RID_DOUBLE_LINE8 +String RID_OUTSET { - Text [ en-US ] = "Double, inside: thick, outside: thin, spacing: small" ; -}; -String RID_DOUBLE_LINE9 -{ - Text [ en-US ] = "Double, inside: thick, outside: very thick, spacing: large" ; -}; -String RID_DOUBLE_LINE10 -{ - Text [ en-US ] = "Double, inside: very thick, outside: thick, Spacing: large" ; + Text [ en-US ] = "Outset" ; }; String RID_SVXITEMS_METRIC_MM { diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 6798b0f8d6d2..5b4fcad5b923 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -1410,7 +1410,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet, if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, sal_False, &pItem ) ) aAttr = *(SvxBoxItem*)pItem; - SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0, 0, 0 ); // simple lines + SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0 ); // simple lines int bWeiter = sal_True, nBorderTyp = 0; do { @@ -1484,8 +1484,9 @@ SETBORDER: } break; -case RTF_BRDRBTW: -case RTF_BRDRBAR: break; + case RTF_BRDRBTW: + case RTF_BRDRBAR: + break; case RTF_BRDRCF: @@ -1499,13 +1500,13 @@ case RTF_BRDRBAR: break; aBrd.SetOutWidth( DEF_LINE_WIDTH_1 ); aBrd.SetInWidth( 0 ); aBrd.SetDistance( 0 ); - goto SETBORDERLINE; + SetBorderLine( nBorderTyp, aAttr, aBrd ); case RTF_BRDRDB: aBrd.SetOutWidth( DEF_DOUBLE_LINE0_OUT ); aBrd.SetInWidth( DEF_DOUBLE_LINE0_IN ); aBrd.SetDistance( DEF_DOUBLE_LINE0_DIST ); - goto SETBORDERLINE; + SetBorderLine( nBorderTyp, aAttr, aBrd ); case RTF_BRDRSH: // shaded box @@ -1564,18 +1565,19 @@ case RTF_BRDRBAR: break; aBrd.SetOutWidth( DEF_LINE_WIDTH_4 ); } } - goto SETBORDERLINE; + SetBorderLine( nBorderTyp, aAttr, aBrd ); case RTF_BRDRDOT: aBrd.SetStyle( DOTTED ); + SetBorderLine( nBorderTyp, aAttr, aBrd ); break; case RTF_BRDRDASH: aBrd.SetStyle( DASHED ); + SetBorderLine( nBorderTyp, aAttr, aBrd ); break; case RTF_BRDRS: case RTF_BRDRHAIR: aBrd.SetStyle( SOLID ); -SETBORDERLINE: SetBorderLine( nBorderTyp, aAttr, aBrd ); break; |