diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-29 17:43:42 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-31 04:31:13 +0000 |
commit | 3187193a6142b4b1c974ae1e1de572fa74a3c8ee (patch) | |
tree | 6d9350492186d06a38703821336ba79cb72a8583 | |
parent | 0bc3af3c1f719f9758ac01ff0b526abea7af0490 (diff) |
tools: rename FontUnderline to FontLineStyle
Change-Id: I4750ad8569a1003b2f8c29052f3e25003ee433ca
Reviewed-on: https://gerrit.libreoffice.org/21892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
143 files changed, 886 insertions, 897 deletions
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx index fae05e753885..1991ef6baa51 100644 --- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -141,7 +141,7 @@ void CharacterPropertyItemConverter::FillSpecialItem( case EE_CHAR_UNDERLINE: { - SvxUnderlineItem aItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE); + SvxUnderlineItem aItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE); bool bModified = false; uno::Any aValue( GetPropertySet()->getPropertyValue( "CharUnderline" )); @@ -173,7 +173,7 @@ void CharacterPropertyItemConverter::FillSpecialItem( case EE_CHAR_OVERLINE: { - SvxOverlineItem aItem( UNDERLINE_NONE, EE_CHAR_OVERLINE ); + SvxOverlineItem aItem( LINESTYLE_NONE, EE_CHAR_OVERLINE ); bool bModified = false; uno::Any aValue( GetPropertySet()->getPropertyValue( "CharOverline" ) ); diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index e2e54dfc80e2..955ea05c4e9e 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -771,7 +771,7 @@ struct FontAttribSetter } else if(rPropName == "CharUnderline") { - FontUnderline eUnderline = static_cast<FontUnderline>(rProp.second.get<sal_Int16>()); + FontLineStyle eUnderline = static_cast<FontLineStyle>(rProp.second.get<sal_Int16>()); mrFont.SetUnderline(eUnderline); } else if(rPropName == "CharWeight") diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx index 63aa7fb5c597..2613440b0951 100644 --- a/cppcanvas/source/inc/outdevstate.hxx +++ b/cppcanvas/source/inc/outdevstate.hxx @@ -63,8 +63,8 @@ namespace cppcanvas textAlignment(0), // TODO(Q2): Synchronize with implrenderer // and possibly new rendering::TextAlignment textReliefStyle(RELIEF_NONE), - textOverlineStyle(UNDERLINE_NONE), - textUnderlineStyle(UNDERLINE_NONE), + textOverlineStyle(LINESTYLE_NONE), + textUnderlineStyle(LINESTYLE_NONE), textStrikeoutStyle(STRIKEOUT_NONE), textReferencePoint(ALIGN_BASELINE), diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 69a5d66f51ac..31cd771ceb44 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1496,7 +1496,7 @@ namespace cppcanvas rState.textReliefStyle = (sal_Int8)rFont.GetRelief(); rState.textOverlineStyle = (sal_Int8)rFont.GetOverline(); rState.textUnderlineStyle = rParms.maFontUnderline.is_initialized() ? - (*rParms.maFontUnderline ? (sal_Int8)UNDERLINE_SINGLE : (sal_Int8)UNDERLINE_NONE) : + (*rParms.maFontUnderline ? (sal_Int8)LINESTYLE_SINGLE : (sal_Int8)LINESTYLE_NONE) : (sal_Int8)rFont.GetUnderline(); rState.textStrikeoutStyle = (sal_Int8)rFont.GetStrikeout(); rState.textEmphasisMarkStyle = (sal_Int8)rFont.GetEmphasisMark(); diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index b148e763e765..32c0af7c61ed 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -320,16 +320,16 @@ namespace cppcanvas switch( rTextLineInfo.mnOverlineStyle ) { - case UNDERLINE_NONE: // nothing to do + case LINESTYLE_NONE: // nothing to do // FALLTHROUGH intended - case UNDERLINE_DONTKNOW: + case LINESTYLE_DONTKNOW: break; - case UNDERLINE_SMALLWAVE: // TODO(F3): NYI + case LINESTYLE_SMALLWAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_WAVE: // TODO(F3): NYI + case LINESTYLE_WAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_SINGLE: + case LINESTYLE_SINGLE: appendRect( aTextLinesPolyPoly, rStartPos, @@ -339,19 +339,19 @@ namespace cppcanvas rTextLineInfo.mnOverlineOffset + rTextLineInfo.mnOverlineHeight ); break; - case UNDERLINE_BOLDDOTTED: // TODO(F3): NYI + case LINESTYLE_BOLDDOTTED: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDDASH: // TODO(F3): NYI + case LINESTYLE_BOLDDASH: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDLONGDASH: // TODO(F3): NYI + case LINESTYLE_BOLDLONGDASH: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDDASHDOT: // TODO(F3): NYI + case LINESTYLE_BOLDDASHDOT: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDDASHDOTDOT:// TODO(F3): NYI + case LINESTYLE_BOLDDASHDOTDOT:// TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDWAVE: // TODO(F3): NYI + case LINESTYLE_BOLDWAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLD: + case LINESTYLE_BOLD: appendRect( aTextLinesPolyPoly, rStartPos, @@ -361,9 +361,9 @@ namespace cppcanvas rTextLineInfo.mnOverlineOffset + rTextLineInfo.mnOverlineHeight ); break; - case UNDERLINE_DOUBLEWAVE: // TODO(F3): NYI + case LINESTYLE_DOUBLEWAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: appendRect( aTextLinesPolyPoly, rStartPos, @@ -381,9 +381,9 @@ namespace cppcanvas rTextLineInfo.mnOverlineOffset + rTextLineInfo.mnOverlineHeight * 2.0 ); break; - case UNDERLINE_DASHDOTDOT: // TODO(F3): NYI + case LINESTYLE_DASHDOTDOT: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_DOTTED: + case LINESTYLE_DOTTED: appendDashes( aTextLinesPolyPoly, rStartPos.getX(), @@ -394,9 +394,9 @@ namespace cppcanvas 2*rTextLineInfo.mnOverlineHeight ); break; - case UNDERLINE_DASHDOT: // TODO(F3): NYI + case LINESTYLE_DASHDOT: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_DASH: + case LINESTYLE_DASH: appendDashes( aTextLinesPolyPoly, rStartPos.getX(), @@ -407,7 +407,7 @@ namespace cppcanvas 6*rTextLineInfo.mnOverlineHeight ); break; - case UNDERLINE_LONGDASH: + case LINESTYLE_LONGDASH: appendDashes( aTextLinesPolyPoly, rStartPos.getX(), @@ -425,16 +425,16 @@ namespace cppcanvas switch( rTextLineInfo.mnUnderlineStyle ) { - case UNDERLINE_NONE: // nothing to do + case LINESTYLE_NONE: // nothing to do // FALLTHROUGH intended - case UNDERLINE_DONTKNOW: + case LINESTYLE_DONTKNOW: break; - case UNDERLINE_SMALLWAVE: // TODO(F3): NYI + case LINESTYLE_SMALLWAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_WAVE: // TODO(F3): NYI + case LINESTYLE_WAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_SINGLE: + case LINESTYLE_SINGLE: appendRect( aTextLinesPolyPoly, rStartPos, @@ -444,19 +444,19 @@ namespace cppcanvas rTextLineInfo.mnUnderlineOffset + rTextLineInfo.mnLineHeight ); break; - case UNDERLINE_BOLDDOTTED: // TODO(F3): NYI + case LINESTYLE_BOLDDOTTED: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDDASH: // TODO(F3): NYI + case LINESTYLE_BOLDDASH: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDLONGDASH: // TODO(F3): NYI + case LINESTYLE_BOLDLONGDASH: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDDASHDOT: // TODO(F3): NYI + case LINESTYLE_BOLDDASHDOT: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDDASHDOTDOT:// TODO(F3): NYI + case LINESTYLE_BOLDDASHDOTDOT:// TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLDWAVE: // TODO(F3): NYI + case LINESTYLE_BOLDWAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_BOLD: + case LINESTYLE_BOLD: appendRect( aTextLinesPolyPoly, rStartPos, @@ -466,9 +466,9 @@ namespace cppcanvas rTextLineInfo.mnUnderlineOffset + 2*rTextLineInfo.mnLineHeight ); break; - case UNDERLINE_DOUBLEWAVE: // TODO(F3): NYI + case LINESTYLE_DOUBLEWAVE: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: appendRect( aTextLinesPolyPoly, rStartPos, @@ -486,9 +486,9 @@ namespace cppcanvas rTextLineInfo.mnUnderlineOffset + 3*rTextLineInfo.mnLineHeight ); break; - case UNDERLINE_DASHDOTDOT: // TODO(F3): NYI + case LINESTYLE_DASHDOTDOT: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_DOTTED: + case LINESTYLE_DOTTED: appendDashes( aTextLinesPolyPoly, rStartPos.getX(), @@ -499,9 +499,9 @@ namespace cppcanvas 2*rTextLineInfo.mnLineHeight ); break; - case UNDERLINE_DASHDOT: // TODO(F3): NYI + case LINESTYLE_DASHDOT: // TODO(F3): NYI // FALLTHROUGH intended - case UNDERLINE_DASH: + case LINESTYLE_DASH: appendDashes( aTextLinesPolyPoly, rStartPos.getX(), @@ -512,7 +512,7 @@ namespace cppcanvas 6*rTextLineInfo.mnLineHeight ); break; - case UNDERLINE_LONGDASH: + case LINESTYLE_LONGDASH: appendDashes( aTextLinesPolyPoly, rStartPos.getX(), diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index e90b3003d440..ba3f6204cff1 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1539,9 +1539,9 @@ void SvxCharEffectsPage::UpdatePreview_Impl() SvxFont& rCTLFont = GetPreviewCTLFont(); sal_Int32 nPos = m_pUnderlineLB->GetSelectEntryPos(); - FontUnderline eUnderline = (FontUnderline)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )); + FontLineStyle eUnderline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )); nPos = m_pOverlineLB->GetSelectEntryPos(); - FontUnderline eOverline = (FontUnderline)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )); + FontLineStyle eOverline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )); nPos = m_pStrikeoutLB->GetSelectEntryPos(); FontStrikeout eStrikeout = (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos )); rFont.SetUnderline( eUnderline ); @@ -1823,9 +1823,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) // Underline sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); - rFont.SetUnderline( UNDERLINE_NONE ); - rCJKFont.SetUnderline( UNDERLINE_NONE ); - rCTLFont.SetUnderline( UNDERLINE_NONE ); + rFont.SetUnderline( LINESTYLE_NONE ); + rCJKFont.SetUnderline( LINESTYLE_NONE ); + rCTLFont.SetUnderline( LINESTYLE_NONE ); m_pUnderlineLB->SelectEntryPos( 0 ); SfxItemState eState = rSet->GetItemState( nWhich ); @@ -1837,16 +1837,16 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) else { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>(rSet->Get( nWhich )); - FontUnderline eUnderline = (FontUnderline)rItem.GetValue(); + FontLineStyle eUnderline = (FontLineStyle)rItem.GetValue(); rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); - if ( eUnderline != UNDERLINE_NONE ) + if ( eUnderline != LINESTYLE_NONE ) { for ( sal_Int32 i = 0; i < m_pUnderlineLB->GetEntryCount(); ++i ) { - if ( (FontUnderline)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData(i)) == eUnderline ) + if ( (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData(i)) == eUnderline ) { m_pUnderlineLB->SelectEntryPos(i); bEnable = true; @@ -1880,9 +1880,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) // Overline nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE ); - rFont.SetOverline( UNDERLINE_NONE ); - rCJKFont.SetOverline( UNDERLINE_NONE ); - rCTLFont.SetOverline( UNDERLINE_NONE ); + rFont.SetOverline( LINESTYLE_NONE ); + rCJKFont.SetOverline( LINESTYLE_NONE ); + rCTLFont.SetOverline( LINESTYLE_NONE ); m_pOverlineLB->SelectEntryPos( 0 ); eState = rSet->GetItemState( nWhich ); @@ -1894,16 +1894,16 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) else { const SvxOverlineItem& rItem = static_cast<const SvxOverlineItem&>(rSet->Get( nWhich )); - FontUnderline eOverline = (FontUnderline)rItem.GetValue(); + FontLineStyle eOverline = (FontLineStyle)rItem.GetValue(); rFont.SetOverline( eOverline ); rCJKFont.SetOverline( eOverline ); rCTLFont.SetOverline( eOverline ); - if ( eOverline != UNDERLINE_NONE ) + if ( eOverline != LINESTYLE_NONE ) { for ( sal_Int32 i = 0; i < m_pOverlineLB->GetEntryCount(); ++i ) { - if ( (FontUnderline)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData(i)) == eOverline ) + if ( (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData(i)) == eOverline ) { m_pOverlineLB->SelectEntryPos(i); bEnable = true; @@ -2274,7 +2274,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); pOld = GetOldItem( *rSet, SID_ATTR_CHAR_UNDERLINE ); sal_Int32 nPos = m_pUnderlineLB->GetSelectEntryPos(); - FontUnderline eUnder = (FontUnderline)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )); + FontLineStyle eUnder = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )); if ( pOld ) { @@ -2286,8 +2286,8 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich ); const SvxUnderlineItem& rItem = *static_cast<const SvxUnderlineItem*>(pOld); - if ( (FontUnderline)rItem.GetValue() == eUnder && - ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_pUnderlineColorLB->GetSelectEntryColor() ) && + if ( (FontLineStyle)rItem.GetValue() == eUnder && + ( LINESTYLE_NONE == eUnder || rItem.GetColor() == m_pUnderlineColorLB->GetSelectEntryColor() ) && ! bAllowChg ) bChanged = false; } @@ -2308,7 +2308,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE ); pOld = GetOldItem( *rSet, SID_ATTR_CHAR_OVERLINE ); nPos = m_pOverlineLB->GetSelectEntryPos(); - FontUnderline eOver = (FontUnderline)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )); + FontLineStyle eOver = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )); if ( pOld ) { @@ -2320,8 +2320,8 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) SfxItemState::DEFAULT > rOldSet.GetItemState( nWhich ); const SvxOverlineItem& rItem = *static_cast<const SvxOverlineItem*>(pOld); - if ( (FontUnderline)rItem.GetValue() == eOver && - ( UNDERLINE_NONE == eOver || rItem.GetColor() == m_pOverlineColorLB->GetSelectEntryColor() ) && + if ( (FontLineStyle)rItem.GetValue() == eOver && + ( LINESTYLE_NONE == eOver || rItem.GetColor() == m_pOverlineColorLB->GetSelectEntryColor() ) && ! bAllowChg ) bChanged = false; } diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 94d04c0d15a1..ac7b01fe4451 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1299,8 +1299,8 @@ namespace const bool bWordLineMode(rFont.IsWordLineMode()); const bool bDecoratedIsNeeded( - UNDERLINE_NONE != rFont.GetOverline() - || UNDERLINE_NONE != rFont.GetUnderline() + LINESTYLE_NONE != rFont.GetOverline() + || LINESTYLE_NONE != rFont.GetUnderline() || STRIKEOUT_NONE != rFont.GetStrikeout() || EMPHASISMARK_NONE != (rFont.GetEmphasisMark() & EMPHASISMARK_STYLE) || RELIEF_NONE != rFont.GetRelief() @@ -1310,12 +1310,12 @@ namespace if(bDecoratedIsNeeded) { // prepare overline, underline and strikeout data - const drawinglayer::primitive2d::TextLine eFontOverline(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rFont.GetOverline())); - const drawinglayer::primitive2d::TextLine eFontUnderline(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rFont.GetUnderline())); + const drawinglayer::primitive2d::TextLine eFontOverline(drawinglayer::primitive2d::mapFontLineStyleToTextLine(rFont.GetOverline())); + const drawinglayer::primitive2d::TextLine eFontLineStyle(drawinglayer::primitive2d::mapFontLineStyleToTextLine(rFont.GetUnderline())); const drawinglayer::primitive2d::TextStrikeout eTextStrikeout(drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(rFont.GetStrikeout())); // check UndelineAbove - const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && isUnderlineAbove(rFont)); + const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontLineStyle && isUnderlineAbove(rFont)); // prepare emphasis mark data drawinglayer::primitive2d::TextEmphasisMark eTextEmphasisMark(drawinglayer::primitive2d::TEXT_EMPHASISMARK_NONE); @@ -1362,7 +1362,7 @@ namespace rProperty.getOverlineColorActive() ? rProperty.getOverlineColor() : aFontColor, rProperty.getTextLineColorActive() ? rProperty.getTextLineColor() : aFontColor, eFontOverline, - eFontUnderline, + eFontLineStyle, bUnderlineAbove, eTextStrikeout, bWordLineMode, @@ -1472,8 +1472,8 @@ namespace if(fLineWidth > 0.0) { - const drawinglayer::primitive2d::TextLine aOverlineMode(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rAction.GetOverline())); - const drawinglayer::primitive2d::TextLine aUnderlineMode(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rAction.GetUnderline())); + const drawinglayer::primitive2d::TextLine aOverlineMode(drawinglayer::primitive2d::mapFontLineStyleToTextLine(rAction.GetOverline())); + const drawinglayer::primitive2d::TextLine aUnderlineMode(drawinglayer::primitive2d::mapFontLineStyleToTextLine(rAction.GetUnderline())); const drawinglayer::primitive2d::TextStrikeout aTextStrikeout(drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(rAction.GetStrikeout())); const bool bOverlineUsed(drawinglayer::primitive2d::TEXT_LINE_NONE != aOverlineMode); diff --git a/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx b/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx index f8cf72259ab0..8232e2b9f673 100644 --- a/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx @@ -25,54 +25,54 @@ namespace drawinglayer { namespace primitive2d { - TextLine mapFontUnderlineToTextLine(FontUnderline eLineStyle) + TextLine mapFontLineStyleToTextLine(FontLineStyle eLineStyle) { switch(eLineStyle) { - case UNDERLINE_SINGLE: return TEXT_LINE_SINGLE; - case UNDERLINE_DOUBLE: return TEXT_LINE_DOUBLE; - case UNDERLINE_DOTTED: return TEXT_LINE_DOTTED; - case UNDERLINE_DASH: return TEXT_LINE_DASH; - case UNDERLINE_LONGDASH: return TEXT_LINE_LONGDASH; - case UNDERLINE_DASHDOT: return TEXT_LINE_DASHDOT; - case UNDERLINE_DASHDOTDOT: return TEXT_LINE_DASHDOTDOT; - case UNDERLINE_SMALLWAVE: return TEXT_LINE_SMALLWAVE; - case UNDERLINE_WAVE: return TEXT_LINE_WAVE; - case UNDERLINE_DOUBLEWAVE: return TEXT_LINE_DOUBLEWAVE; - case UNDERLINE_BOLD: return TEXT_LINE_BOLD; - case UNDERLINE_BOLDDOTTED: return TEXT_LINE_BOLDDOTTED; - case UNDERLINE_BOLDDASH: return TEXT_LINE_BOLDDASH; - case UNDERLINE_BOLDLONGDASH: return TEXT_LINE_BOLDLONGDASH; - case UNDERLINE_BOLDDASHDOT: return TEXT_LINE_BOLDDASHDOT; - case UNDERLINE_BOLDDASHDOTDOT: return TEXT_LINE_BOLDDASHDOTDOT; - case UNDERLINE_BOLDWAVE: return TEXT_LINE_BOLDWAVE; - // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE + case LINESTYLE_SINGLE: return TEXT_LINE_SINGLE; + case LINESTYLE_DOUBLE: return TEXT_LINE_DOUBLE; + case LINESTYLE_DOTTED: return TEXT_LINE_DOTTED; + case LINESTYLE_DASH: return TEXT_LINE_DASH; + case LINESTYLE_LONGDASH: return TEXT_LINE_LONGDASH; + case LINESTYLE_DASHDOT: return TEXT_LINE_DASHDOT; + case LINESTYLE_DASHDOTDOT: return TEXT_LINE_DASHDOTDOT; + case LINESTYLE_SMALLWAVE: return TEXT_LINE_SMALLWAVE; + case LINESTYLE_WAVE: return TEXT_LINE_WAVE; + case LINESTYLE_DOUBLEWAVE: return TEXT_LINE_DOUBLEWAVE; + case LINESTYLE_BOLD: return TEXT_LINE_BOLD; + case LINESTYLE_BOLDDOTTED: return TEXT_LINE_BOLDDOTTED; + case LINESTYLE_BOLDDASH: return TEXT_LINE_BOLDDASH; + case LINESTYLE_BOLDLONGDASH: return TEXT_LINE_BOLDLONGDASH; + case LINESTYLE_BOLDDASHDOT: return TEXT_LINE_BOLDDASHDOT; + case LINESTYLE_BOLDDASHDOTDOT: return TEXT_LINE_BOLDDASHDOTDOT; + case LINESTYLE_BOLDWAVE: return TEXT_LINE_BOLDWAVE; + // FontLineStyle_FORCE_EQUAL_SIZE, LINESTYLE_DONTKNOW, LINESTYLE_NONE default: return TEXT_LINE_NONE; } } - FontUnderline mapTextLineToFontUnderline(TextLine eLineStyle) + FontLineStyle mapTextLineToFontLineStyle(TextLine eLineStyle) { switch(eLineStyle) { - default: /*TEXT_LINE_NONE*/ return UNDERLINE_NONE; - case TEXT_LINE_SINGLE: return UNDERLINE_SINGLE; - case TEXT_LINE_DOUBLE: return UNDERLINE_DOUBLE; - case TEXT_LINE_DOTTED: return UNDERLINE_DOTTED; - case TEXT_LINE_DASH: return UNDERLINE_DASH; - case TEXT_LINE_LONGDASH: return UNDERLINE_LONGDASH; - case TEXT_LINE_DASHDOT: return UNDERLINE_DASHDOT; - case TEXT_LINE_DASHDOTDOT: return UNDERLINE_DASHDOTDOT; - case TEXT_LINE_SMALLWAVE: return UNDERLINE_SMALLWAVE; - case TEXT_LINE_WAVE: return UNDERLINE_WAVE; - case TEXT_LINE_DOUBLEWAVE: return UNDERLINE_DOUBLEWAVE; - case TEXT_LINE_BOLD: return UNDERLINE_BOLD; - case TEXT_LINE_BOLDDOTTED: return UNDERLINE_BOLDDOTTED; - case TEXT_LINE_BOLDDASH: return UNDERLINE_BOLDDASH; - case TEXT_LINE_BOLDLONGDASH: return UNDERLINE_LONGDASH; - case TEXT_LINE_BOLDDASHDOT: return UNDERLINE_BOLDDASHDOT; - case TEXT_LINE_BOLDDASHDOTDOT:return UNDERLINE_BOLDDASHDOT; - case TEXT_LINE_BOLDWAVE: return UNDERLINE_BOLDWAVE; + default: /*TEXT_LINE_NONE*/ return LINESTYLE_NONE; + case TEXT_LINE_SINGLE: return LINESTYLE_SINGLE; + case TEXT_LINE_DOUBLE: return LINESTYLE_DOUBLE; + case TEXT_LINE_DOTTED: return LINESTYLE_DOTTED; + case TEXT_LINE_DASH: return LINESTYLE_DASH; + case TEXT_LINE_LONGDASH: return LINESTYLE_LONGDASH; + case TEXT_LINE_DASHDOT: return LINESTYLE_DASHDOT; + case TEXT_LINE_DASHDOTDOT: return LINESTYLE_DASHDOTDOT; + case TEXT_LINE_SMALLWAVE: return LINESTYLE_SMALLWAVE; + case TEXT_LINE_WAVE: return LINESTYLE_WAVE; + case TEXT_LINE_DOUBLEWAVE: return LINESTYLE_DOUBLEWAVE; + case TEXT_LINE_BOLD: return LINESTYLE_BOLD; + case TEXT_LINE_BOLDDOTTED: return LINESTYLE_BOLDDOTTED; + case TEXT_LINE_BOLDDASH: return LINESTYLE_BOLDDASH; + case TEXT_LINE_BOLDLONGDASH: return LINESTYLE_LONGDASH; + case TEXT_LINE_BOLDDASHDOT: return LINESTYLE_BOLDDASHDOT; + case TEXT_LINE_BOLDDASHDOTDOT:return LINESTYLE_BOLDDASHDOT; + case TEXT_LINE_BOLDWAVE: return LINESTYLE_BOLDWAVE; } } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index c76560267be9..c8e7257eff78 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -152,8 +152,8 @@ namespace drawinglayer mpOutputDevice->SetTextLineColor( Color(aTextlineColor) ); // set Overline attribute - const FontUnderline eFontOverline(primitive2d::mapTextLineToFontUnderline( pTCPP->getFontOverline() )); - if( eFontOverline != UNDERLINE_NONE ) + const FontLineStyle eFontOverline(primitive2d::mapTextLineToFontLineStyle( pTCPP->getFontOverline() )); + if( eFontOverline != LINESTYLE_NONE ) { aFont.SetOverline( eFontOverline ); const basegfx::BColor aOverlineColor = maBColorModifierStack.getModifiedColor(pTCPP->getOverlineColor()); @@ -163,10 +163,10 @@ namespace drawinglayer } // set Underline attribute - const FontUnderline eFontUnderline(primitive2d::mapTextLineToFontUnderline( pTCPP->getFontUnderline() )); - if( eFontUnderline != UNDERLINE_NONE ) + const FontLineStyle eFontLineStyle(primitive2d::mapTextLineToFontLineStyle( pTCPP->getFontUnderline() )); + if( eFontLineStyle != LINESTYLE_NONE ) { - aFont.SetUnderline( eFontUnderline ); + aFont.SetUnderline( eFontLineStyle ); if( pTCPP->getWordLineMode() ) aFont.SetWordLineMode( true ); } diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index fdc9d6a65e02..ff71dbf40d99 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -128,7 +128,7 @@ EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev ) { - rFont.SetUnderline( (FontUnderline)static_cast<const SvxUnderlineItem*>(GetItem())->GetValue() ); + rFont.SetUnderline( (FontLineStyle)static_cast<const SvxUnderlineItem*>(GetItem())->GetValue() ); if ( pOutDev ) pOutDev->SetTextLineColor( static_cast<const SvxUnderlineItem*>(GetItem())->GetColor() ); @@ -146,7 +146,7 @@ EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sa void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev ) { - rFont.SetOverline( (FontUnderline)static_cast<const SvxOverlineItem*>(GetItem())->GetValue() ); + rFont.SetOverline( (FontLineStyle)static_cast<const SvxOverlineItem*>(GetItem())->GetValue() ); if ( pOutDev ) pOutDev->SetOverlineColor( static_cast<const SvxOverlineItem*>(GetItem())->GetColor() ); } diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index fad7bb14689e..1be1ce37516c 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -130,7 +130,7 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems[20] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ); ppDefItems[21] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ); ppDefItems[22] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ); - ppDefItems[23] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ); + ppDefItems[23] = new SvxUnderlineItem( LINESTYLE_NONE, EE_CHAR_UNDERLINE ); ppDefItems[24] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); ppDefItems[25] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); ppDefItems[26] = new SvxContourItem( false, EE_CHAR_OUTLINE ); @@ -154,7 +154,7 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems[44] = new SvxCharReliefItem( RELIEF_NONE, EE_CHAR_RELIEF ); ppDefItems[45] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY ); ppDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS ); - ppDefItems[47] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE ); + ppDefItems[47] = new SvxOverlineItem( LINESTYLE_NONE, EE_CHAR_OVERLINE ); ppDefItems[48] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP ); ppDefItems[49] = new SfxGrabBagItem( EE_CHAR_GRABBAG ); ppDefItems[50] = new SvxBackgroundColorItem( Color( COL_AUTO ), EE_CHAR_BKGCOLOR ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 1cc860aa9a76..d6b668c3b266 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2784,13 +2784,13 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo { sal_uInt16 nAttr = mpIMEInfos->pAttribs[ nPos - mpIMEInfos->aPos.GetIndex() - 1 ]; if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE ) - rFont.SetUnderline( UNDERLINE_SINGLE ); + rFont.SetUnderline( LINESTYLE_SINGLE ); else if ( nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE ) - rFont.SetUnderline( UNDERLINE_BOLD ); + rFont.SetUnderline( LINESTYLE_BOLD ); else if ( nAttr & EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ) - rFont.SetUnderline( UNDERLINE_DOTTED ); + rFont.SetUnderline( LINESTYLE_DOTTED ); else if ( nAttr & EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ) - rFont.SetUnderline( UNDERLINE_DOTTED ); + rFont.SetUnderline( LINESTYLE_DOTTED ); else if ( nAttr & EXTTEXTINPUT_ATTR_REDTEXT ) rFont.SetColor( Color( COL_RED ) ); else if ( nAttr & EXTTEXTINPUT_ATTR_HALFTONETEXT ) @@ -2804,7 +2804,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo } else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) { - rFont.SetUnderline( UNDERLINE_WAVE ); + rFont.SetUnderline( LINESTYLE_WAVE ); if( pOut ) pOut->SetTextLineColor( Color( COL_LIGHTGRAY ) ); } @@ -3394,7 +3394,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt if ( nOrientation || ( !IsVertical() && ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) ) || ( IsVertical() && ( ( aTmpPos.Y() + nTxtWidth ) >= nFirstVisYPos ) ) ) { - if ( nEsc && ( ( aTmpFont.GetUnderline() != UNDERLINE_NONE ) ) ) + if ( nEsc && ( ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) ) ) { // Paint the high/low without underline, // Display the Underline on the @@ -3409,13 +3409,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt if ( pPrev->GetStart() ) { SeekCursor( pPortion->GetNode(), pPrev->GetStart(), aDummy ); - if ( aDummy.GetUnderline() != UNDERLINE_NONE ) + if ( aDummy.GetUnderline() != LINESTYLE_NONE ) bSpecialUnderline = true; } if ( !bSpecialUnderline && ( pPrev->GetEnd() < pPortion->GetNode()->Len() ) ) { SeekCursor( pPortion->GetNode(), pPrev->GetEnd()+1, aDummy ); - if ( aDummy.GetUnderline() != UNDERLINE_NONE ) + if ( aDummy.GetUnderline() != LINESTYLE_NONE ) bSpecialUnderline = true; } } @@ -3433,7 +3433,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt aUnderlinePos = lcl_ImplCalcRotatedPos( aTmpPos, aOrigin, nSin, nCos ); pOutDev->DrawStretchText( aUnderlinePos, aSz.Width(), aBlanks.makeStringAndClear(), 0, nTextLen ); - aTmpFont.SetUnderline( UNDERLINE_NONE ); + aTmpFont.SetUnderline( LINESTYLE_NONE ); if ( !nOrientation ) aTmpFont.SetEscapement( nEsc ); aTmpFont.SetPropr( nProp ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 36eaa05b4d8e..0ca6114b1093 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -849,13 +849,13 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, { // Must underlined if in WordLineMode, but the information is // missing here - FontUnderline e = static_cast<const SvxUnderlineItem&>(rItem).GetLineStyle(); + FontLineStyle e = static_cast<const SvxUnderlineItem&>(rItem).GetLineStyle(); switch ( e ) { - case UNDERLINE_NONE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ULNONE ); break; - case UNDERLINE_SINGLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); break; - case UNDERLINE_DOUBLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ULDB ); break; - case UNDERLINE_DOTTED: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ULD ); break; + case LINESTYLE_NONE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ULNONE ); break; + case LINESTYLE_SINGLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); break; + case LINESTYLE_DOUBLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ULDB ); break; + case LINESTYLE_DOTTED: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ULD ); break; default: break; } @@ -863,13 +863,13 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, break; case EE_CHAR_OVERLINE: { - FontUnderline e = static_cast<const SvxOverlineItem&>(rItem).GetLineStyle(); + FontLineStyle e = static_cast<const SvxOverlineItem&>(rItem).GetLineStyle(); switch ( e ) { - case UNDERLINE_NONE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OLNONE ); break; - case UNDERLINE_SINGLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OL ); break; - case UNDERLINE_DOUBLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OLDB ); break; - case UNDERLINE_DOTTED: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OLD ); break; + case LINESTYLE_NONE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OLNONE ); break; + case LINESTYLE_SINGLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OL ); break; + case LINESTYLE_DOUBLE: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OLDB ); break; + case LINESTYLE_DOTTED: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_OLD ); break; default: break; } diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 2f258620279c..8b41023f79f2 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -75,7 +75,7 @@ vcl::Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) rStream.ReadUInt16( nTemp ); aFont.SetPitch((FontPitch)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetAlignment((FontAlign)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetWeight((FontWeight)nTemp); - rStream.ReadUInt16( nTemp ); aFont.SetUnderline((FontUnderline)nTemp); + rStream.ReadUInt16( nTemp ); aFont.SetUnderline((FontLineStyle)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetStrikeout((FontStrikeout)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetItalic((FontItalic)nTemp); diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 1cacdbedc89b..83b21f675859 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -693,9 +693,9 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 _nIdx, Size aPartSize; // Set the desired font - FontUnderline eUnder = pFont->GetUnderline(); + FontLineStyle eUnder = pFont->GetUnderline(); FontStrikeout eStrike = pFont->GetStrikeout(); - pFont->SetUnderline( UNDERLINE_NONE ); + pFont->SetUnderline( LINESTYLE_NONE ); pFont->SetStrikeout( STRIKEOUT_NONE ); if ( !bUpper ) { diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 4806948d0615..218cb2b6def9 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -107,9 +107,9 @@ SfxPoolItem* SvxPostureItem::CreateDefault() { return new SvxPostureItem(ITALIC_ SfxPoolItem* SvxWeightItem::CreateDefault() {return new SvxWeightItem(WEIGHT_NORMAL, 0);} SfxPoolItem* SvxFontHeightItem::CreateDefault() {return new SvxFontHeightItem(240, 100, 0);} SfxPoolItem* SvxFontWidthItem::CreateDefault() {return new SvxFontWidthItem(0, 100, 0);} -SfxPoolItem* SvxTextLineItem::CreateDefault() {return new SvxTextLineItem(UNDERLINE_NONE, 0);} -SfxPoolItem* SvxUnderlineItem::CreateDefault() {return new SvxUnderlineItem(UNDERLINE_NONE, 0);} -SfxPoolItem* SvxOverlineItem::CreateDefault() {return new SvxOverlineItem(UNDERLINE_NONE, 0);} +SfxPoolItem* SvxTextLineItem::CreateDefault() {return new SvxTextLineItem(LINESTYLE_NONE, 0);} +SfxPoolItem* SvxUnderlineItem::CreateDefault() {return new SvxUnderlineItem(LINESTYLE_NONE, 0);} +SfxPoolItem* SvxOverlineItem::CreateDefault() {return new SvxOverlineItem(LINESTYLE_NONE, 0);} SfxPoolItem* SvxCrossedOutItem::CreateDefault() {return new SvxCrossedOutItem(STRIKEOUT_NONE, 0);} SfxPoolItem* SvxShadowedItem::CreateDefault() {return new SvxShadowedItem(false, 0);} SfxPoolItem* SvxAutoKernItem::CreateDefault() {return new SvxAutoKernItem(false, 0);} @@ -1250,7 +1250,7 @@ bool SvxFontWidthItem::GetPresentation // class SvxTextLineItem ------------------------------------------------ -SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const sal_uInt16 nId ) +SvxTextLineItem::SvxTextLineItem( const FontLineStyle eSt, const sal_uInt16 nId ) : SfxEnumItem( nId, (sal_uInt16)eSt ), mColor( COL_TRANSPARENT ) { } @@ -1266,14 +1266,14 @@ bool SvxTextLineItem::HasBoolValue() const bool SvxTextLineItem::GetBoolValue() const { - return (FontUnderline)GetValue() != UNDERLINE_NONE; + return (FontLineStyle)GetValue() != LINESTYLE_NONE; } void SvxTextLineItem::SetBoolValue( bool bVal ) { - SetValue( (sal_uInt16)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) ); + SetValue( (sal_uInt16)(bVal ? LINESTYLE_SINGLE : LINESTYLE_NONE) ); } @@ -1289,7 +1289,7 @@ SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const sal_uInt16 SvxTextLineItem::GetValueCount() const { - return UNDERLINE_DOTTED + 1; // UNDERLINE_NONE also belongs here + return LINESTYLE_DOTTED + 1; // LINESTYLE_NONE also belongs here } @@ -1306,7 +1306,7 @@ SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const { sal_uInt8 nState; rStrm.ReadUChar( nState ); - return new SvxTextLineItem( (FontUnderline)nState, Which() ); + return new SvxTextLineItem( (FontLineStyle)nState, Which() ); } @@ -1404,7 +1404,7 @@ bool SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const // class SvxUnderlineItem ------------------------------------------------ -SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const sal_uInt16 nId ) +SvxUnderlineItem::SvxUnderlineItem( const FontLineStyle eSt, const sal_uInt16 nId ) : SvxTextLineItem( eSt, nId ) { } @@ -1424,20 +1424,20 @@ SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const { sal_uInt8 nState; rStrm.ReadUChar( nState ); - return new SvxUnderlineItem( (FontUnderline)nState, Which() ); + return new SvxUnderlineItem( (FontLineStyle)nState, Which() ); } OUString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)LINESTYLE_BOLDWAVE, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_UL_BEGIN + nPos); } // class SvxOverlineItem ------------------------------------------------ -SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const sal_uInt16 nId ) +SvxOverlineItem::SvxOverlineItem( const FontLineStyle eSt, const sal_uInt16 nId ) : SvxTextLineItem( eSt, nId ) { } @@ -1457,14 +1457,14 @@ SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const { sal_uInt8 nState; rStrm.ReadUChar( nState ); - return new SvxOverlineItem( (FontUnderline)nState, Which() ); + return new SvxOverlineItem( (FontLineStyle)nState, Which() ); } OUString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)LINESTYLE_BOLDWAVE, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_OL_BEGIN + nPos); } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 5f46cf4616ed..bbc861bc5d9c 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -777,7 +777,7 @@ bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rT } else // underline { - SvxUnderlineItem aSvxUnderlineItem( UNDERLINE_SINGLE, SID_ATTR_CHAR_UNDERLINE ); + SvxUnderlineItem aSvxUnderlineItem( LINESTYLE_SINGLE, SID_ATTR_CHAR_UNDERLINE ); rDoc.SetAttr( nFndPos, nEndPos - 1, SID_ATTR_CHAR_UNDERLINE, aSvxUnderlineItem); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index d19e62ba11ea..f741f1371d2f 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -877,8 +877,8 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const else { aBulletFont = aStdFont; - aBulletFont.SetUnderline( UNDERLINE_NONE ); - aBulletFont.SetOverline( UNDERLINE_NONE ); + aBulletFont.SetUnderline( LINESTYLE_NONE ); + aBulletFont.SetOverline( LINESTYLE_NONE ); aBulletFont.SetStrikeout( STRIKEOUT_NONE ); aBulletFont.SetEmphasisMark( EMPHASISMARK_NONE ); aBulletFont.SetRelief( RELIEF_NONE ); diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index ee0282ad823c..54ba22c91cc4 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -206,8 +206,8 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) DBG_ASSERT( pSet, "A SfxItemSet has to be provided as argument!" ); bool bFirstToken = true; bool bContinue = true; - FontUnderline eUnderline; - FontUnderline eOverline; + FontLineStyle eUnderline; + FontLineStyle eOverline; FontEmphasisMark eEmphasis; bPardTokenRead = false; RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE; @@ -725,60 +725,60 @@ SET_FONTALIGNMENT: case RTF_UL: if( !IsAttrSttPos() ) break; - eUnderline = nTokenValue ? UNDERLINE_SINGLE : UNDERLINE_NONE; + eUnderline = nTokenValue ? LINESTYLE_SINGLE : LINESTYLE_NONE; goto ATTR_SETUNDERLINE; case RTF_ULD: - eUnderline = UNDERLINE_DOTTED; + eUnderline = LINESTYLE_DOTTED; goto ATTR_SETUNDERLINE; case RTF_ULDASH: - eUnderline = UNDERLINE_DASH; + eUnderline = LINESTYLE_DASH; goto ATTR_SETUNDERLINE; case RTF_ULDASHD: - eUnderline = UNDERLINE_DASHDOT; + eUnderline = LINESTYLE_DASHDOT; goto ATTR_SETUNDERLINE; case RTF_ULDASHDD: - eUnderline = UNDERLINE_DASHDOTDOT; + eUnderline = LINESTYLE_DASHDOTDOT; goto ATTR_SETUNDERLINE; case RTF_ULDB: - eUnderline = UNDERLINE_DOUBLE; + eUnderline = LINESTYLE_DOUBLE; goto ATTR_SETUNDERLINE; case RTF_ULNONE: - eUnderline = UNDERLINE_NONE; + eUnderline = LINESTYLE_NONE; goto ATTR_SETUNDERLINE; case RTF_ULTH: - eUnderline = UNDERLINE_BOLD; + eUnderline = LINESTYLE_BOLD; goto ATTR_SETUNDERLINE; case RTF_ULWAVE: - eUnderline = UNDERLINE_WAVE; + eUnderline = LINESTYLE_WAVE; goto ATTR_SETUNDERLINE; case RTF_ULTHD: - eUnderline = UNDERLINE_BOLDDOTTED; + eUnderline = LINESTYLE_BOLDDOTTED; goto ATTR_SETUNDERLINE; case RTF_ULTHDASH: - eUnderline = UNDERLINE_BOLDDASH; + eUnderline = LINESTYLE_BOLDDASH; goto ATTR_SETUNDERLINE; case RTF_ULLDASH: - eUnderline = UNDERLINE_LONGDASH; + eUnderline = LINESTYLE_LONGDASH; goto ATTR_SETUNDERLINE; case RTF_ULTHLDASH: - eUnderline = UNDERLINE_BOLDLONGDASH; + eUnderline = LINESTYLE_BOLDLONGDASH; goto ATTR_SETUNDERLINE; case RTF_ULTHDASHD: - eUnderline = UNDERLINE_BOLDDASHDOT; + eUnderline = LINESTYLE_BOLDDASHDOT; goto ATTR_SETUNDERLINE; case RTF_ULTHDASHDD: - eUnderline = UNDERLINE_BOLDDASHDOTDOT; + eUnderline = LINESTYLE_BOLDDASHDOTDOT; goto ATTR_SETUNDERLINE; case RTF_ULHWAVE: - eUnderline = UNDERLINE_BOLDWAVE; + eUnderline = LINESTYLE_BOLDWAVE; goto ATTR_SETUNDERLINE; case RTF_ULULDBWAVE: - eUnderline = UNDERLINE_DOUBLEWAVE; + eUnderline = LINESTYLE_DOUBLEWAVE; goto ATTR_SETUNDERLINE; case RTF_ULW: - eUnderline = UNDERLINE_SINGLE; + eUnderline = LINESTYLE_SINGLE; if( aPlainMap.nWordlineMode ) { @@ -796,13 +796,13 @@ ATTR_SETUNDERLINE: case RTF_ULC: if( aPlainMap.nUnderline ) { - SvxUnderlineItem aUL( UNDERLINE_SINGLE, aPlainMap.nUnderline ); + SvxUnderlineItem aUL( LINESTYLE_SINGLE, aPlainMap.nUnderline ); const SfxPoolItem* pItem; if( SfxItemState::SET == pSet->GetItemState( aPlainMap.nUnderline, false, &pItem ) ) { // is switched off ? - if( UNDERLINE_NONE == + if( LINESTYLE_NONE == static_cast<const SvxUnderlineItem*>(pItem)->GetLineStyle() ) break; aUL = *static_cast<const SvxUnderlineItem*>(pItem); @@ -810,8 +810,8 @@ ATTR_SETUNDERLINE: else aUL = static_cast<const SvxUnderlineItem&>(pSet->Get( aPlainMap.nUnderline, false )); - if( UNDERLINE_NONE == aUL.GetLineStyle() ) - aUL.SetLineStyle( UNDERLINE_SINGLE ); + if( LINESTYLE_NONE == aUL.GetLineStyle() ) + aUL.SetLineStyle( LINESTYLE_SINGLE ); aUL.SetColor( GetColor( sal_uInt16(nTokenValue) )); pSet->Put( aUL ); } @@ -820,60 +820,60 @@ ATTR_SETUNDERLINE: case RTF_OL: if( !IsAttrSttPos() ) break; - eOverline = nTokenValue ? UNDERLINE_SINGLE : UNDERLINE_NONE; + eOverline = nTokenValue ? LINESTYLE_SINGLE : LINESTYLE_NONE; goto ATTR_SETOVERLINE; case RTF_OLD: - eOverline = UNDERLINE_DOTTED; + eOverline = LINESTYLE_DOTTED; goto ATTR_SETOVERLINE; case RTF_OLDASH: - eOverline = UNDERLINE_DASH; + eOverline = LINESTYLE_DASH; goto ATTR_SETOVERLINE; case RTF_OLDASHD: - eOverline = UNDERLINE_DASHDOT; + eOverline = LINESTYLE_DASHDOT; goto ATTR_SETOVERLINE; case RTF_OLDASHDD: - eOverline = UNDERLINE_DASHDOTDOT; + eOverline = LINESTYLE_DASHDOTDOT; goto ATTR_SETOVERLINE; case RTF_OLDB: - eOverline = UNDERLINE_DOUBLE; + eOverline = LINESTYLE_DOUBLE; goto ATTR_SETOVERLINE; case RTF_OLNONE: - eOverline = UNDERLINE_NONE; + eOverline = LINESTYLE_NONE; goto ATTR_SETOVERLINE; case RTF_OLTH: - eOverline = UNDERLINE_BOLD; + eOverline = LINESTYLE_BOLD; goto ATTR_SETOVERLINE; case RTF_OLWAVE: - eOverline = UNDERLINE_WAVE; + eOverline = LINESTYLE_WAVE; goto ATTR_SETOVERLINE; case RTF_OLTHD: - eOverline = UNDERLINE_BOLDDOTTED; + eOverline = LINESTYLE_BOLDDOTTED; goto ATTR_SETOVERLINE; case RTF_OLTHDASH: - eOverline = UNDERLINE_BOLDDASH; + eOverline = LINESTYLE_BOLDDASH; goto ATTR_SETOVERLINE; case RTF_OLLDASH: - eOverline = UNDERLINE_LONGDASH; + eOverline = LINESTYLE_LONGDASH; goto ATTR_SETOVERLINE; case RTF_OLTHLDASH: - eOverline = UNDERLINE_BOLDLONGDASH; + eOverline = LINESTYLE_BOLDLONGDASH; goto ATTR_SETOVERLINE; case RTF_OLTHDASHD: - eOverline = UNDERLINE_BOLDDASHDOT; + eOverline = LINESTYLE_BOLDDASHDOT; goto ATTR_SETOVERLINE; case RTF_OLTHDASHDD: - eOverline = UNDERLINE_BOLDDASHDOTDOT; + eOverline = LINESTYLE_BOLDDASHDOTDOT; goto ATTR_SETOVERLINE; case RTF_OLHWAVE: - eOverline = UNDERLINE_BOLDWAVE; + eOverline = LINESTYLE_BOLDWAVE; goto ATTR_SETOVERLINE; case RTF_OLOLDBWAVE: - eOverline = UNDERLINE_DOUBLEWAVE; + eOverline = LINESTYLE_DOUBLEWAVE; goto ATTR_SETOVERLINE; case RTF_OLW: - eOverline = UNDERLINE_SINGLE; + eOverline = LINESTYLE_SINGLE; if( aPlainMap.nWordlineMode ) { @@ -891,13 +891,13 @@ ATTR_SETOVERLINE: case RTF_OLC: if( aPlainMap.nOverline ) { - SvxOverlineItem aOL( UNDERLINE_SINGLE, aPlainMap.nOverline ); + SvxOverlineItem aOL( LINESTYLE_SINGLE, aPlainMap.nOverline ); const SfxPoolItem* pItem; if( SfxItemState::SET == pSet->GetItemState( aPlainMap.nOverline, false, &pItem ) ) { // is switched off ? - if( UNDERLINE_NONE == + if( LINESTYLE_NONE == static_cast<const SvxOverlineItem*>(pItem)->GetLineStyle() ) break; aOL = *static_cast<const SvxOverlineItem*>(pItem); @@ -905,8 +905,8 @@ ATTR_SETOVERLINE: else aOL = static_cast<const SvxOverlineItem&>(pSet->Get( aPlainMap.nOverline, false )); - if( UNDERLINE_NONE == aOL.GetLineStyle() ) - aOL.SetLineStyle( UNDERLINE_SINGLE ); + if( LINESTYLE_NONE == aOL.GetLineStyle() ) + aOL.SetLineStyle( LINESTYLE_SINGLE ); aOL.SetColor( GetColor( sal_uInt16(nTokenValue) )); pSet->Put( aOL ); } diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 996b43f9eb1f..59390d2034b6 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -50,7 +50,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl: rFont.SetKerning( rDesc.Kerning ? FontKerning::FontSpecific : FontKerning::NONE ); rFont.SetWeight( VCLUnoHelper::ConvertFontWeight(rDesc.Weight) ); rFont.SetItalic( (FontItalic)rDesc.Slant ); - rFont.SetUnderline( (FontUnderline)rDesc.Underline ); + rFont.SetUnderline( (FontLineStyle)rDesc.Underline ); rFont.SetStrikeout( (FontStrikeout)rDesc.Strikeout ); rFont.SetWordLineMode( rDesc.WordLineMode ); } @@ -102,7 +102,7 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte } { - SvxUnderlineItem aUnderlineItem( (FontUnderline)0, EE_CHAR_UNDERLINE ); + SvxUnderlineItem aUnderlineItem( (FontLineStyle)0, EE_CHAR_UNDERLINE ); aTemp <<= (sal_Int16)rDesc.Underline; static_cast<SfxPoolItem*>(&aUnderlineItem)->PutValue( aTemp, MID_TL_STYLE ); rSet.Put( aUnderlineItem ); diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index cf932da3422c..f06206948d7b 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -210,7 +210,7 @@ namespace pcr float nFontHeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_HEIGHT, (float)aDefaultFont.Height); float nFontWeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_WEIGHT, aDefaultFont.Weight); css::awt::FontSlant nFontSlant = static_cast<css::awt::FontSlant>(aPropExtractor.getInt16FontProperty(PROPERTY_FONT_SLANT, (sal_Int16)aDefaultFont.Slant)); - sal_Int16 nFontUnderline = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_UNDERLINE, aDefaultFont.Underline); + sal_Int16 nFontLineStyle = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_UNDERLINE, aDefaultFont.Underline); sal_Int16 nFontStrikeout = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_STRIKEOUT, aDefaultFont.Strikeout); sal_Int32 nTextLineColor = aPropExtractor.getInt32FontProperty(PROPERTY_TEXTLINECOLOR, COL_AUTO); @@ -229,7 +229,7 @@ namespace pcr FontWeight eWeight=VCLUnoHelper::ConvertFontWeight(nFontWeight); FontItalic eItalic=VCLUnoHelper::ConvertFontSlant(nFontSlant); - FontUnderline eUnderline=(FontUnderline)nFontUnderline; + FontLineStyle eUnderline=(FontLineStyle)nFontLineStyle; FontStrikeout eStrikeout=(FontStrikeout)nFontStrikeout; SvxWeightItem aWeightItem(eWeight,CFID_WEIGHT); @@ -264,7 +264,7 @@ namespace pcr aPropExtractor.invalidateItem(PROPERTY_FONT_HEIGHT, CFID_HEIGHT, *_pSet); aPropExtractor.invalidateItem(PROPERTY_FONT_WEIGHT, CFID_WEIGHT, *_pSet, css::awt::FontWeight::DONTKNOW == nFontWeight); aPropExtractor.invalidateItem(PROPERTY_FONT_SLANT, CFID_POSTURE, *_pSet, css::awt::FontSlant_DONTKNOW == nFontSlant); - aPropExtractor.invalidateItem(PROPERTY_FONT_UNDERLINE, CFID_UNDERLINE, *_pSet, css::awt::FontUnderline::DONTKNOW == nFontUnderline); + aPropExtractor.invalidateItem(PROPERTY_FONT_UNDERLINE, CFID_UNDERLINE, *_pSet, css::awt::FontUnderline::DONTKNOW == nFontLineStyle); aPropExtractor.invalidateItem(PROPERTY_FONT_STRIKEOUT, CFID_STRIKEOUT, *_pSet, css::awt::FontStrikeout::DONTKNOW == nFontStrikeout); aPropExtractor.invalidateItem(PROPERTY_WORDLINEMODE, CFID_WORDLINEMODE, *_pSet); aPropExtractor.invalidateItem(PROPERTY_TEXTCOLOR, CFID_CHARCOLOR, *_pSet); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 38b136cf407f..f01e8f365cdc 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -334,7 +334,7 @@ namespace pcr StyleSettings aStyleSettings( aAllSettings.GetStyleSettings() ); vcl::Font aFieldFont( aStyleSettings.GetFieldFont() ); - aFieldFont.SetUnderline( UNDERLINE_SINGLE ); + aFieldFont.SetUnderline( LINESTYLE_SINGLE ); aFieldFont.SetColor( aLinkColor.nColor ); aStyleSettings.SetFieldFont( aFieldFont ); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 44b1c495884d..4c724285203b 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -558,7 +558,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon vcl::Font aFont(aOldFont); short nOrientation = aFont.GetOrientation(); aFont.SetOrientation( 0 ); - aFont.SetUnderline(UNDERLINE_NONE); + aFont.SetUnderline(LINESTYLE_NONE); aFont.SetStrikeout(STRIKEOUT_NONE); mpVDev->SetFont( aFont ); @@ -677,7 +677,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon // numbers, but the flash lines up very well with the original OOo document. All of this should // probably be converted to polygons as part of the meta file, though, as we don't handle any // fancy lines (like dashes). - if( ( aOldFont.GetStrikeout() != STRIKEOUT_NONE ) || ( aOldFont.GetUnderline() != UNDERLINE_NONE ) ) + if( ( aOldFont.GetStrikeout() != STRIKEOUT_NONE ) || ( aOldFont.GetUnderline() != LINESTYLE_NONE ) ) { tools::Polygon aPoly( 4 ); const long nLineHeight = std::max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 ); @@ -698,7 +698,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon // AS: The factor of 1.5 on the nLineHeight is a magic number. I'm not sure why it works, // but it looks good to me. - if( aOldFont.GetUnderline() != UNDERLINE_NONE ) + if( aOldFont.GetUnderline() != LINESTYLE_NONE ) { aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = static_cast<long>(aBaseLinePos.Y() + 1.5*nLineHeight); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index c76c989fb37b..63ddfdbc2623 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -1337,8 +1337,8 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) else aActFont.SetWeight(WEIGHT_NORMAL); if ( (nFace & 0x02)!=0 ) aActFont.SetItalic(ITALIC_NORMAL); else aActFont.SetItalic(ITALIC_NONE); - if ( (nFace & 0x04)!=0 ) aActFont.SetUnderline(UNDERLINE_SINGLE); - else aActFont.SetUnderline(UNDERLINE_NONE); + if ( (nFace & 0x04)!=0 ) aActFont.SetUnderline(LINESTYLE_SINGLE); + else aActFont.SetUnderline(LINESTYLE_NONE); if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(true); else aActFont.SetOutline(false); if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(true); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index e88d9e85d411..6cb3b25e83a6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2562,7 +2562,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj if ( nFontAttributes & 0x10 ) rSet.Put( SvxPostureItem( nFontAttributes & 0x10 ? ITALIC_NORMAL : ITALIC_NONE, EE_CHAR_ITALIC ) ); if ( nFontAttributes & 0x08 ) - rSet.Put( SvxUnderlineItem( nFontAttributes & 0x08 ? UNDERLINE_SINGLE : UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); + rSet.Put( SvxUnderlineItem( nFontAttributes & 0x08 ? LINESTYLE_SINGLE : LINESTYLE_NONE, EE_CHAR_UNDERLINE ) ); if ( nFontAttributes & 0x40 ) rSet.Put( SvxShadowedItem( (nFontAttributes & 0x40) != 0, EE_CHAR_SHADOW ) ); // if ( nFontAttributes & 0x02 ) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 971b5717b52e..a7a6b45b8b53 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5612,7 +5612,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s rSet.Put( SvxPostureItem( nVal != 0 ? ITALIC_NORMAL : ITALIC_NONE, EE_CHAR_ITALIC_CTL ) ); } if ( GetAttrib( PPT_CharAttr_Underline, nVal, nDestinationInstance ) ) - rSet.Put( SvxUnderlineItem( nVal != 0 ? UNDERLINE_SINGLE : UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); + rSet.Put( SvxUnderlineItem( nVal != 0 ? LINESTYLE_SINGLE : LINESTYLE_NONE, EE_CHAR_UNDERLINE ) ); if ( GetAttrib( PPT_CharAttr_Shadow, nVal, nDestinationInstance ) ) rSet.Put( SvxShadowedItem( nVal != 0, EE_CHAR_SHADOW ) ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index ee07784fab6d..3baee145fcbc 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -333,9 +333,9 @@ void SVGAttributeWriter::SetFontAttr( const vcl::Font& rFont ) if( mrExport.IsUseNativeTextDecoration() ) { - if( rFont.GetUnderline() != UNDERLINE_NONE || rFont.GetStrikeout() != STRIKEOUT_NONE ) + if( rFont.GetUnderline() != LINESTYLE_NONE || rFont.GetStrikeout() != STRIKEOUT_NONE ) { - if( rFont.GetUnderline() != UNDERLINE_NONE ) + if( rFont.GetUnderline() != LINESTYLE_NONE ) aTextDecoration = "underline "; if( rFont.GetStrikeout() != STRIKEOUT_NONE ) @@ -795,17 +795,17 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer ) if( mrExport.IsUseNativeTextDecoration() ) { - FontUnderline eCurFontUnderline = maCurrentFont.GetUnderline(); + FontLineStyle eCurFontLineStyle = maCurrentFont.GetUnderline(); FontStrikeout eCurFontStrikeout = maCurrentFont.GetStrikeout(); - FontUnderline eParFontUnderline = maParentFont.GetUnderline(); + FontLineStyle eParFontLineStyle = maParentFont.GetUnderline(); FontStrikeout eParFontStrikeout = maParentFont.GetStrikeout(); OUString sTextDecoration; bool bIsDecorationChanged = false; - if( eCurFontUnderline != eParFontUnderline ) + if( eCurFontLineStyle != eParFontLineStyle ) { - if( eCurFontUnderline != UNDERLINE_NONE ) + if( eCurFontLineStyle != LINESTYLE_NONE ) sTextDecoration = "underline"; bIsDecorationChanged = true; } @@ -2576,7 +2576,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, if( !mrExport.IsUseNativeTextDecoration() ) { - if( rFont.GetStrikeout() != STRIKEOUT_NONE || rFont.GetUnderline() != UNDERLINE_NONE ) + if( rFont.GetStrikeout() != STRIKEOUT_NONE || rFont.GetUnderline() != LINESTYLE_NONE ) { tools::Polygon aPoly( 4 ); const long nLineHeight = std::max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 ); diff --git a/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx b/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx index 78a48c678284..61a0ecf377fc 100644 --- a/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx @@ -58,8 +58,8 @@ namespace drawinglayer }; /** helper to convert LineStyle */ - TextLine DRAWINGLAYER_DLLPUBLIC mapFontUnderlineToTextLine(FontUnderline eLineStyle); - FontUnderline DRAWINGLAYER_DLLPUBLIC mapTextLineToFontUnderline(TextLine eLineStyle); + TextLine DRAWINGLAYER_DLLPUBLIC mapFontLineStyleToTextLine(FontLineStyle eLineStyle); + FontLineStyle DRAWINGLAYER_DLLPUBLIC mapTextLineToFontLineStyle(TextLine eLineStyle); /** FontStrikeout definition */ enum TextStrikeout diff --git a/include/editeng/udlnitem.hxx b/include/editeng/udlnitem.hxx index 9306aba7635c..baf8e8accfff 100644 --- a/include/editeng/udlnitem.hxx +++ b/include/editeng/udlnitem.hxx @@ -36,7 +36,7 @@ class EDITENG_DLLPUBLIC SvxTextLineItem : public SfxEnumItem public: static SfxPoolItem* CreateDefault(); - SvxTextLineItem( const FontUnderline eSt, + SvxTextLineItem( const FontLineStyle eSt, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem @@ -71,9 +71,9 @@ public: } // enum cast - FontUnderline GetLineStyle() const - { return (FontUnderline)GetValue(); } - void SetLineStyle( FontUnderline eNew ) + FontLineStyle GetLineStyle() const + { return (FontLineStyle)GetValue(); } + void SetLineStyle( FontLineStyle eNew ) { SetValue((sal_uInt16) eNew); } const Color& GetColor() const { return mColor; } @@ -89,7 +89,7 @@ class EDITENG_DLLPUBLIC SvxUnderlineItem : public SvxTextLineItem public: static SfxPoolItem* CreateDefault(); - SvxUnderlineItem( const FontUnderline eSt, + SvxUnderlineItem( const FontLineStyle eSt, const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; @@ -106,7 +106,7 @@ class EDITENG_DLLPUBLIC SvxOverlineItem : public SvxTextLineItem public: static SfxPoolItem* CreateDefault(); - SvxOverlineItem( const FontUnderline eSt, + SvxOverlineItem( const FontLineStyle eSt, const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/include/tools/fontenum.hxx b/include/tools/fontenum.hxx index ffdc26a40406..3ab14d4697c0 100644 --- a/include/tools/fontenum.hxx +++ b/include/tools/fontenum.hxx @@ -41,17 +41,17 @@ enum FontWidth { WIDTH_DONTKNOW, WIDTH_ULTRA_CONDENSED, WIDTH_EXTRA_CONDENSED, enum FontItalic { ITALIC_NONE, ITALIC_OBLIQUE, ITALIC_NORMAL, ITALIC_DONTKNOW, FontItalic_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; -enum FontUnderline { UNDERLINE_NONE, UNDERLINE_SINGLE, UNDERLINE_DOUBLE, - UNDERLINE_DOTTED, UNDERLINE_DONTKNOW, - UNDERLINE_DASH, UNDERLINE_LONGDASH, - UNDERLINE_DASHDOT, UNDERLINE_DASHDOTDOT, - UNDERLINE_SMALLWAVE, - UNDERLINE_WAVE, UNDERLINE_DOUBLEWAVE, - UNDERLINE_BOLD, UNDERLINE_BOLDDOTTED, - UNDERLINE_BOLDDASH, UNDERLINE_BOLDLONGDASH, - UNDERLINE_BOLDDASHDOT, UNDERLINE_BOLDDASHDOTDOT, - UNDERLINE_BOLDWAVE, - FontUnderline_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; +enum FontLineStyle { LINESTYLE_NONE, LINESTYLE_SINGLE, LINESTYLE_DOUBLE, + LINESTYLE_DOTTED, LINESTYLE_DONTKNOW, + LINESTYLE_DASH, LINESTYLE_LONGDASH, + LINESTYLE_DASHDOT, LINESTYLE_DASHDOTDOT, + LINESTYLE_SMALLWAVE, + LINESTYLE_WAVE, LINESTYLE_DOUBLEWAVE, + LINESTYLE_BOLD, LINESTYLE_BOLDDOTTED, + LINESTYLE_BOLDDASH, LINESTYLE_BOLDLONGDASH, + LINESTYLE_BOLDDASHDOT, LINESTYLE_BOLDDASHDOTDOT, + LINESTYLE_BOLDWAVE, + FontLineStyle_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE, STRIKEOUT_DONTKNOW, STRIKEOUT_BOLD, diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index 7f9d2722005f..8742451b0891 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -144,10 +144,10 @@ public: bool IsShadow() const; void SetRelief( FontRelief ); FontRelief GetRelief() const; - void SetUnderline( FontUnderline ); - FontUnderline GetUnderline() const; - void SetOverline( FontUnderline ); - FontUnderline GetOverline() const; + void SetUnderline( FontLineStyle ); + FontLineStyle GetUnderline() const; + void SetOverline( FontLineStyle ); + FontLineStyle GetOverline() const; void SetStrikeout( FontStrikeout ); FontStrikeout GetStrikeout() const; void SetEmphasisMark( FontEmphasisMark ); diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 476711af78ef..044cb5072ede 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -546,8 +546,8 @@ private: Point maPos; long mnWidth; FontStrikeout meStrikeout; - FontUnderline meUnderline; - FontUnderline meOverline; + FontLineStyle meUnderline; + FontLineStyle meOverline; public: MetaTextLineAction(); @@ -561,16 +561,16 @@ public: MetaTextLineAction( const Point& rPos, long nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline ); + FontLineStyle eUnderline, + FontLineStyle eOverline ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; const Point& GetStartPoint() const { return maPos; } long GetWidth() const { return mnWidth; } FontStrikeout GetStrikeout() const { return meStrikeout; } - FontUnderline GetUnderline() const { return meUnderline; } - FontUnderline GetOverline() const { return meOverline; } + FontLineStyle GetUnderline() const { return meUnderline; } + FontLineStyle GetOverline() const { return meOverline; } }; class VCL_DLLPUBLIC MetaBmpAction : public MetaAction diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 6b28dec2e7e5..b0527b071be5 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1036,16 +1036,16 @@ public: void DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline, + FontLineStyle eUnderline, + FontLineStyle eOverline, bool bUnderlineAbove = false ); void ImplDrawTextLine( long nBaseX, long nX, long nY, DeviceCoordinate nWidth, - FontStrikeout eStrikeout, FontUnderline eUnderline, - FontUnderline eOverline, bool bUnderlineAbove ); + FontStrikeout eStrikeout, FontLineStyle eUnderline, + FontLineStyle eOverline, bool bUnderlineAbove ); - void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, - FontUnderline eOverline, bool bWordLine, bool bUnderlineAbove ); + void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline, + FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove ); void DrawWaveLine( const Point& rStartPos, const Point& rEndPos ); @@ -1228,8 +1228,8 @@ private: SAL_DLLPRIVATE void ImplDrawWavePixel( long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice* pOutDev, bool bDrawPixAsRect, long nPixWidth, long nPixHeight ); SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor ); - SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ); - SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ); + SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); + SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 697ae91a4c3c..6b8e43f0eb2f 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -764,8 +764,8 @@ The following structure describes the permissions used in PDF security void DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline, + FontLineStyle eUnderline, + FontLineStyle eOverline, bool bUnderlineAbove = false ); void DrawTextArray( const Point& rStartPt, const OUString& rStr, const long* pDXAry, diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 873d6bf93a0a..46a56bc480c5 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -659,7 +659,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep new SvxWordLineModeItem(false,ITEMID_WORDLINEMODE), new SvxContourItem(false,ITEMID_CONTOUR), new SvxCrossedOutItem(STRIKEOUT_NONE,ITEMID_CROSSEDOUT), - new SvxUnderlineItem(UNDERLINE_NONE,ITEMID_UNDERLINE), + new SvxUnderlineItem(LINESTYLE_NONE,ITEMID_UNDERLINE), new SvxColorItem(ITEMID_COLOR), new SvxKerningItem(0,ITEMID_KERNING), diff --git a/sc/inc/fonthelper.hxx b/sc/inc/fonthelper.hxx index c06930fd3cbc..36d589554e77 100644 --- a/sc/inc/fonthelper.hxx +++ b/sc/inc/fonthelper.hxx @@ -25,8 +25,8 @@ struct SC_DLLPUBLIC ScDxfFont boost::optional<sal_uInt32> nFontHeight; boost::optional<FontWeight> eWeight; boost::optional<FontItalic> eItalic; - boost::optional<FontUnderline> eUnder; - boost::optional<FontUnderline> eOver; + boost::optional<FontLineStyle> eUnder; + boost::optional<FontLineStyle> eOver; boost::optional<bool> bWordLine; boost::optional<FontStrikeout> eStrike; boost::optional<bool> bOutline; diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 46e71fc87269..1e348908399d 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -213,7 +213,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be striked out with a double line", STRIKEOUT_DOUBLE, aFont.GetStrikeout()); pPattern = pDoc->GetPattern(1,3,1); pPattern->GetFont(aFont, SC_AUTOCOL_RAW); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be underlined with a dotted line", UNDERLINE_DOTTED, aFont.GetUnderline()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be underlined with a dotted line", LINESTYLE_DOTTED, aFont.GetUnderline()); //check row height import //disable for now until we figure out cause of win tinderboxes test failures //CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(256), pDoc->GetRowHeight(0,1) ); //0.178in diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index e1f89b4c231f..aab6d3430357 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -546,14 +546,14 @@ void setAttribute( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, sa break; case EE_CHAR_OVERLINE: { - SvxOverlineItem aItem(UNDERLINE_DOUBLE, nType); + SvxOverlineItem aItem(LINESTYLE_DOUBLE, nType); aItemSet.Put(aItem); rEE.QuickSetAttribs(aItemSet, aSel); } break; case EE_CHAR_UNDERLINE: { - SvxUnderlineItem aItem(UNDERLINE_DOUBLE, nType); + SvxUnderlineItem aItem(LINESTYLE_DOUBLE, nType); aItemSet.Put(aItem); rEE.QuickSetAttribs(aItemSet, aSel); } @@ -671,7 +671,7 @@ void ScExportTest::testRichTextExportODS() return false; } - static bool isOverline(const editeng::Section& rAttr, FontUnderline eStyle) + static bool isOverline(const editeng::Section& rAttr, FontLineStyle eStyle) { if (rAttr.maAttributes.empty()) return false; @@ -688,7 +688,7 @@ void ScExportTest::testRichTextExportODS() return false; } - static bool isUnderline(const editeng::Section& rAttr, FontUnderline eStyle) + static bool isUnderline(const editeng::Section& rAttr, FontLineStyle eStyle) { if (rAttr.maAttributes.empty()) return false; @@ -920,7 +920,7 @@ void ScExportTest::testRichTextExportODS() if (pAttr->mnParagraph != 0 ||pAttr->mnStart != 0 || pAttr->mnEnd != 4) return false; - if (pAttr->maAttributes.size() != 1 || !isOverline(*pAttr, UNDERLINE_DOUBLE)) + if (pAttr->maAttributes.size() != 1 || !isOverline(*pAttr, LINESTYLE_DOUBLE)) return false; // Last section should have underline applied. @@ -928,7 +928,7 @@ void ScExportTest::testRichTextExportODS() if (pAttr->mnParagraph != 0 ||pAttr->mnStart != 9 || pAttr->mnEnd != 14) return false; - if (pAttr->maAttributes.size() != 1 || !isUnderline(*pAttr, UNDERLINE_DOUBLE)) + if (pAttr->maAttributes.size() != 1 || !isUnderline(*pAttr, LINESTYLE_DOUBLE)) return false; return true; diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 917dd25e05ff..91812b2f9dc0 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -2243,7 +2243,7 @@ void ScFiltersTest::testRichTextContentODS() if (it->pAttr->Which() == EE_CHAR_UNDERLINE) { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>(*it->pAttr); - bHasUnderline = (rItem.GetLineStyle() == UNDERLINE_SINGLE); + bHasUnderline = (rItem.GetLineStyle() == LINESTYLE_SINGLE); if (bHasUnderline) break; } diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 8dccc32d59d4..be888001a8f8 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -228,8 +228,8 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool) ppPoolDefaults[ ATTR_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt; ppPoolDefaults[ ATTR_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_FONT_WEIGHT ); ppPoolDefaults[ ATTR_FONT_POSTURE - ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_FONT_POSTURE ); - ppPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( UNDERLINE_NONE, ATTR_FONT_UNDERLINE ); - ppPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( UNDERLINE_NONE, ATTR_FONT_OVERLINE ); + ppPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( LINESTYLE_NONE, ATTR_FONT_UNDERLINE ); + ppPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( LINESTYLE_NONE, ATTR_FONT_OVERLINE ); ppPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ); ppPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR ); ppPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED ); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 01039b195d50..c5a886aa3406 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -258,8 +258,8 @@ void ScPatternAttr::GetFont( sal_uInt32 nFontHeight; FontWeight eWeight; FontItalic eItalic; - FontUnderline eUnder; - FontUnderline eOver; + FontLineStyle eUnder; + FontLineStyle eOver; bool bWordLine; FontStrikeout eStrike; bool bOutline; @@ -294,11 +294,11 @@ void ScPatternAttr::GetFont( if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE ); - eUnder = (FontUnderline)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); + eUnder = (FontLineStyle)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_OVERLINE ); - eOver = (FontUnderline)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); + eOver = (FontLineStyle)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_WORDLINE ); @@ -341,9 +341,9 @@ void ScPatternAttr::GetFont( rItemSet.Get( nWeightId )).GetValue(); eItalic = (FontItalic)static_cast<const SvxPostureItem&>( rItemSet.Get( nPostureId )).GetValue(); - eUnder = (FontUnderline)static_cast<const SvxUnderlineItem&>( + eUnder = (FontLineStyle)static_cast<const SvxUnderlineItem&>( rItemSet.Get( ATTR_FONT_UNDERLINE )).GetValue(); - eOver = (FontUnderline)static_cast<const SvxOverlineItem&>( + eOver = (FontLineStyle)static_cast<const SvxOverlineItem&>( rItemSet.Get( ATTR_FONT_OVERLINE )).GetValue(); bWordLine = static_cast<const SvxWordLineModeItem&>( rItemSet.Get( ATTR_FONT_WORDLINE )).GetValue(); @@ -532,13 +532,13 @@ ScDxfFont ScPatternAttr::GetDxfFont(const SfxItemSet& rItemSet, SvtScriptType nS if ( rItemSet.GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) == SfxItemState::SET ) { pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE ); - aReturn.eUnder = (FontUnderline)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); + aReturn.eUnder = (FontLineStyle)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); } if ( rItemSet.GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) == SfxItemState::SET ) { pItem = &rItemSet.Get( ATTR_FONT_OVERLINE ); - aReturn.eOver = (FontUnderline)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); + aReturn.eOver = (FontLineStyle)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); } if ( rItemSet.GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) == SfxItemState::SET ) @@ -602,8 +602,8 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r SvxFontItem aCtlFontItem(EE_CHAR_FONTINFO_CTL); long nTHeight, nCjkTHeight, nCtlTHeight; // Twips FontWeight eWeight, eCjkWeight, eCtlWeight; - SvxUnderlineItem aUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE); - SvxOverlineItem aOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE); + SvxUnderlineItem aUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE); + SvxOverlineItem aOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE); bool bWordLine; FontStrikeout eStrike; FontItalic eItalic, eCjkItalic, eCtlItalic; @@ -867,9 +867,9 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet& // SvxTextLineItem contains enum and color if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,true,&pItem) == SfxItemState::SET) - rDestSet.Put( SvxUnderlineItem(UNDERLINE_NONE,ATTR_FONT_UNDERLINE) = *static_cast<const SvxUnderlineItem*>(pItem) ); + rDestSet.Put( SvxUnderlineItem(LINESTYLE_NONE,ATTR_FONT_UNDERLINE) = *static_cast<const SvxUnderlineItem*>(pItem) ); if (rEditSet.GetItemState(EE_CHAR_OVERLINE,true,&pItem) == SfxItemState::SET) - rDestSet.Put( SvxOverlineItem(UNDERLINE_NONE,ATTR_FONT_OVERLINE) = *static_cast<const SvxOverlineItem*>(pItem) ); + rDestSet.Put( SvxOverlineItem(LINESTYLE_NONE,ATTR_FONT_OVERLINE) = *static_cast<const SvxOverlineItem*>(pItem) ); if (rEditSet.GetItemState(EE_CHAR_WLM,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxWordLineModeItem( static_cast<const SvxWordLineModeItem*>(pItem)->GetValue(), ATTR_FONT_WORDLINE) ); diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 2dd104819346..68638e9cb41f 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -280,7 +280,7 @@ void ScStyleSheetPool::CreateStandardStyles() pSet = &pSheet->GetItemSet(); pSet->Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) ); pSet->Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); - pSet->Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + pSet->Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); // 3. Result1 diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 9aae4556e251..0c52378aae0b 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -180,8 +180,8 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion) rStream.WriteUInt16( SvxFontHeightItem(240, 100, ATTR_FONT_HEIGHT).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxWeightItem(WEIGHT_NORMAL, ATTR_FONT_WEIGHT).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxPostureItem(ITALIC_NONE, ATTR_FONT_POSTURE).GetVersion(fileVersion) ); - rStream.WriteUInt16( SvxUnderlineItem(UNDERLINE_NONE, ATTR_FONT_UNDERLINE).GetVersion(fileVersion) ); - rStream.WriteUInt16( SvxOverlineItem(UNDERLINE_NONE, ATTR_FONT_OVERLINE).GetVersion(fileVersion) ); + rStream.WriteUInt16( SvxUnderlineItem(LINESTYLE_NONE, ATTR_FONT_UNDERLINE).GetVersion(fileVersion) ); + rStream.WriteUInt16( SvxOverlineItem(LINESTYLE_NONE, ATTR_FONT_OVERLINE).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxCrossedOutItem(STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxContourItem(false, ATTR_FONT_CONTOUR).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxShadowedItem(false, ATTR_FONT_SHADOWED).GetVersion(fileVersion) ); @@ -221,8 +221,8 @@ ScAutoFormatDataField::ScAutoFormatDataField() : aCTLWeight( WEIGHT_NORMAL, ATTR_CTL_FONT_WEIGHT ), aCTLPosture( ITALIC_NONE, ATTR_CTL_FONT_POSTURE ), - aUnderline( UNDERLINE_NONE,ATTR_FONT_UNDERLINE ), - aOverline( UNDERLINE_NONE,ATTR_FONT_OVERLINE ), + aUnderline( LINESTYLE_NONE,ATTR_FONT_UNDERLINE ), + aOverline( LINESTYLE_NONE,ATTR_FONT_OVERLINE ), aCrossedOut( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ), aContour( false, ATTR_FONT_CONTOUR ), aShadowed( false, ATTR_FONT_SHADOWED ), diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 7e2d0477314b..3d85c2509f52 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -64,15 +64,15 @@ void LotusFontBuffer::Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet ) rItemSet.Put( aAttr ); } - FontUnderline eUnderline; + FontLineStyle eUnderline; switch( nIndex & 0x60 ) // Bit 5+6 { case 0x60: - case 0x20: eUnderline = UNDERLINE_SINGLE; break; - case 0x40: eUnderline = UNDERLINE_DOUBLE; break; - default: eUnderline = UNDERLINE_NONE; + case 0x20: eUnderline = LINESTYLE_SINGLE; break; + case 0x40: eUnderline = LINESTYLE_DOUBLE; break; + default: eUnderline = LINESTYLE_NONE; } - if( eUnderline != UNDERLINE_NONE ) + if( eUnderline != LINESTYLE_NONE ) { SvxUnderlineItem aUndItem( eUnderline, ATTR_FONT_UNDERLINE ); rItemSet.Put( aUndItem ); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 18edb9072e2d..1961c7ded5f8 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -766,9 +766,9 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aNewData.mnUnderline = EXC_FONTUNDERL_NONE; switch( aFont.GetUnderline() ) { - case UNDERLINE_NONE: aNewData.mnUnderline = EXC_FONTUNDERL_NONE; break; - case UNDERLINE_SINGLE: aNewData.mnUnderline = EXC_FONTUNDERL_SINGLE; break; - case UNDERLINE_DOUBLE: aNewData.mnUnderline = EXC_FONTUNDERL_DOUBLE; break; + case LINESTYLE_NONE: aNewData.mnUnderline = EXC_FONTUNDERL_NONE; break; + case LINESTYLE_SINGLE: aNewData.mnUnderline = EXC_FONTUNDERL_SINGLE; break; + case LINESTYLE_DOUBLE: aNewData.mnUnderline = EXC_FONTUNDERL_DOUBLE; break; default: aNewData.mnUnderline = EXC_FONTUNDERL_SINGLE; } if( aFontData.mnUnderline != aNewData.mnUnderline ) diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 90c351a10dc5..474ba6c80f6f 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -876,16 +876,16 @@ static void lcl_WriteValue( sax_fastparser::FSHelperPtr& rStream, sal_Int32 nEle FSEND ); } -static const char* lcl_GetUnderlineStyle( FontUnderline eUnderline, bool& bHaveUnderline ) +static const char* lcl_GetUnderlineStyle( FontLineStyle eUnderline, bool& bHaveUnderline ) { bHaveUnderline = true; switch( eUnderline ) { // OOXTODO: doubleAccounting, singleAccounting - // OOXTODO: what should be done with the other FontUnderline values? - case UNDERLINE_SINGLE: return "single"; - case UNDERLINE_DOUBLE: return "double"; - case UNDERLINE_NONE: + // OOXTODO: what should be done with the other FontLineStyle values? + case LINESTYLE_SINGLE: return "single"; + case LINESTYLE_DOUBLE: return "double"; + case LINESTYLE_NONE: default: bHaveUnderline = false; return "none"; } } diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 50ff07893407..758c0124b2fe 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1024,15 +1024,15 @@ XclExpDxfFont::XclExpDxfFont(const XclExpRoot& rRoot, namespace { -const char* getUnderlineOOXValue(FontUnderline eUnderline) +const char* getUnderlineOOXValue(FontLineStyle eUnderline) { switch (eUnderline) { - case UNDERLINE_NONE: - case UNDERLINE_DONTKNOW: + case LINESTYLE_NONE: + case LINESTYLE_DONTKNOW: return "none"; - case UNDERLINE_DOUBLE: - case UNDERLINE_DOUBLEWAVE: + case LINESTYLE_DOUBLE: + case LINESTYLE_DOUBLEWAVE: return "double"; default: return "single"; diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 776eac550bf1..ebabba382ed0 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -163,7 +163,7 @@ ColorData XclDefaultPalette::GetDefColorData( sal_uInt16 nXclIndex ) const namespace Awt = ::com::sun::star::awt; namespace AwtFontFamily = Awt::FontFamily; -namespace AwtFontUnderline = Awt::FontUnderline; +namespace AwtFontLineStyle = Awt::FontUnderline; namespace AwtFontStrikeout = Awt::FontStrikeout; XclFontData::XclFontData() @@ -271,15 +271,15 @@ FontWeight XclFontData::GetScWeight() const return eScWeight; } -FontUnderline XclFontData::GetScUnderline() const +FontLineStyle XclFontData::GetScUnderline() const { - FontUnderline eScUnderl = UNDERLINE_NONE; + FontLineStyle eScUnderl = LINESTYLE_NONE; switch( mnUnderline ) { case EXC_FONTUNDERL_SINGLE: - case EXC_FONTUNDERL_SINGLE_ACC: eScUnderl = UNDERLINE_SINGLE; break; + case EXC_FONTUNDERL_SINGLE_ACC: eScUnderl = LINESTYLE_SINGLE; break; case EXC_FONTUNDERL_DOUBLE: - case EXC_FONTUNDERL_DOUBLE_ACC: eScUnderl = UNDERLINE_DOUBLE; break; + case EXC_FONTUNDERL_DOUBLE_ACC: eScUnderl = LINESTYLE_DOUBLE; break; } return eScUnderl; } @@ -352,14 +352,14 @@ void XclFontData::SetScWeight( FontWeight eScWeight ) } } -void XclFontData::SetScUnderline( FontUnderline eScUnderl ) +void XclFontData::SetScUnderline( FontLineStyle eScUnderl ) { switch( eScUnderl ) { - case UNDERLINE_NONE: - case UNDERLINE_DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; - case UNDERLINE_DOUBLE: - case UNDERLINE_DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; + case LINESTYLE_NONE: + case LINESTYLE_DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; + case LINESTYLE_DOUBLE: + case LINESTYLE_DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; default: mnUnderline = EXC_FONTUNDERL_SINGLE; } } @@ -422,13 +422,13 @@ float XclFontData::GetApiWeight() const sal_Int16 XclFontData::GetApiUnderline() const { - sal_Int16 nApiUnderl = AwtFontUnderline::NONE; + sal_Int16 nApiUnderl = AwtFontLineStyle::NONE; switch( mnUnderline ) { case EXC_FONTUNDERL_SINGLE: - case EXC_FONTUNDERL_SINGLE_ACC: nApiUnderl = AwtFontUnderline::SINGLE; break; + case EXC_FONTUNDERL_SINGLE_ACC: nApiUnderl = AwtFontLineStyle::SINGLE; break; case EXC_FONTUNDERL_DOUBLE: - case EXC_FONTUNDERL_DOUBLE_ACC: nApiUnderl = AwtFontUnderline::DOUBLE; break; + case EXC_FONTUNDERL_DOUBLE_ACC: nApiUnderl = AwtFontLineStyle::DOUBLE; break; } return nApiUnderl; } @@ -486,10 +486,10 @@ void XclFontData::SetApiUnderline( sal_Int16 nApiUnderl ) { switch( nApiUnderl ) { - case AwtFontUnderline::NONE: - case AwtFontUnderline::DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; - case AwtFontUnderline::DOUBLE: - case AwtFontUnderline::DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; + case AwtFontLineStyle::NONE: + case AwtFontLineStyle::DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; + case AwtFontLineStyle::DOUBLE: + case AwtFontLineStyle::DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; default: mnUnderline = EXC_FONTUNDERL_SINGLE; } } @@ -568,7 +568,7 @@ const sal_Char *const *const sppcPropNamesChCmplxNoName = sppcPropNamesChCmplx + const sal_Char *const sppcPropNamesControl[] = { "FontName", "FontFamily", "FontCharset", "FontHeight", "FontSlant", - "FontWeight", "FontUnderline", "FontStrikeout", "TextColor", nullptr + "FontWeight", "FontLineStyle", "FontStrikeout", "TextColor", nullptr }; /** Inserts all passed API font settings into the font data object. */ diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index d6f22629391f..47f81fba6bcf 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1016,7 +1016,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); - bool bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() ); + bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() ); bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); sal_uInt16 nSetFontSizeNumber = 0; diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 8e4867690173..c1e124de6cf4 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1692,7 +1692,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) case HTML_UNDERLINE_ON : { if ( IsAtBeginningOfText( pInfo ) ) - pActEntry->aItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, + pActEntry->aItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); } break; @@ -2971,7 +2971,7 @@ void ScHTMLQueryParser::ProcessToken( const ImportInfo& rInfo ) break; case HTML_UNDERLINE_ON: // <u> - mpCurrTable->PutItem( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + mpCurrTable->PutItem( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); break; } } diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index 233e32015a37..1f34a720d76c 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -257,7 +257,7 @@ private: OUString maName; double mnSize; Color maColor; - FontUnderline meUnderline; + FontLineStyle meUnderline; font(); diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 73e332837b98..187b0356a598 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -329,7 +329,7 @@ struct XclFontData /** Returns the Calc font weight. */ FontWeight GetScWeight() const; /** Returns the Calc font underline style. */ - FontUnderline GetScUnderline() const; + FontLineStyle GetScUnderline() const; /** Returns the Calc escapement style. */ SvxEscapement GetScEscapement() const; /** Returns the Calc strike-out style. */ @@ -346,7 +346,7 @@ struct XclFontData /** Sets the Calc font weight. */ void SetScWeight( FontWeight eScWeight ); /** Sets the Calc underline style. */ - void SetScUnderline( FontUnderline eScUnderl ); + void SetScUnderline( FontLineStyle eScUnderl ); /** Sets the Calc escapement style. */ void SetScEscapement( short nScEscapem ); /** Sets the Calc strike-out style. */ diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index 4cd5df25f558..56895530b5c4 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -541,7 +541,7 @@ void OP_CreatePattern123(LotusContext& rContext, SvStream& r, sal_uInt16 n) if ( bIsItalics ) rItemSet.Put( SvxPostureItem(ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); if ( bIsUnderLine ) - rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + rItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); r.SeekRel(3); diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index ce909ad4367e..ffc7898f3f16 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -769,20 +769,18 @@ void Font::importDxfFlag( sal_Int32 nElement, SequenceInputStream& rStrm ) void Font::finalizeImport() { - namespace cssawt = ::com::sun::star::awt; - // font name maApiData.maDesc.Name = maModel.maName; // font family switch( maModel.mnFamily ) { - case OOX_FONTFAMILY_NONE: maApiData.maDesc.Family = cssawt::FontFamily::DONTKNOW; break; - case OOX_FONTFAMILY_ROMAN: maApiData.maDesc.Family = cssawt::FontFamily::ROMAN; break; - case OOX_FONTFAMILY_SWISS: maApiData.maDesc.Family = cssawt::FontFamily::SWISS; break; - case OOX_FONTFAMILY_MODERN: maApiData.maDesc.Family = cssawt::FontFamily::MODERN; break; - case OOX_FONTFAMILY_SCRIPT: maApiData.maDesc.Family = cssawt::FontFamily::SCRIPT; break; - case OOX_FONTFAMILY_DECORATIVE: maApiData.maDesc.Family = cssawt::FontFamily::DECORATIVE; break; + case OOX_FONTFAMILY_NONE: maApiData.maDesc.Family = css::awt::FontFamily::DONTKNOW; break; + case OOX_FONTFAMILY_ROMAN: maApiData.maDesc.Family = css::awt::FontFamily::ROMAN; break; + case OOX_FONTFAMILY_SWISS: maApiData.maDesc.Family = css::awt::FontFamily::SWISS; break; + case OOX_FONTFAMILY_MODERN: maApiData.maDesc.Family = css::awt::FontFamily::MODERN; break; + case OOX_FONTFAMILY_SCRIPT: maApiData.maDesc.Family = css::awt::FontFamily::SCRIPT; break; + case OOX_FONTFAMILY_DECORATIVE: maApiData.maDesc.Family = css::awt::FontFamily::DECORATIVE; break; } // character set (API font descriptor uses rtl_TextEncoding in member CharSet!) @@ -793,20 +791,20 @@ void Font::finalizeImport() // color, height, weight, slant, strikeout, outline, shadow maApiData.mnColor = maModel.maColor.getColor( getBaseFilter().getGraphicHelper() ); maApiData.maDesc.Height = static_cast< sal_Int16 >( maModel.mfHeight * 20.0 ); - maApiData.maDesc.Weight = maModel.mbBold ? cssawt::FontWeight::BOLD : cssawt::FontWeight::NORMAL; - maApiData.maDesc.Slant = maModel.mbItalic ? cssawt::FontSlant_ITALIC : cssawt::FontSlant_NONE; - maApiData.maDesc.Strikeout = maModel.mbStrikeout ? cssawt::FontStrikeout::SINGLE : cssawt::FontStrikeout::NONE; + maApiData.maDesc.Weight = maModel.mbBold ? css::awt::FontWeight::BOLD : css::awt::FontWeight::NORMAL; + maApiData.maDesc.Slant = maModel.mbItalic ? css::awt::FontSlant_ITALIC : css::awt::FontSlant_NONE; + maApiData.maDesc.Strikeout = maModel.mbStrikeout ? css::awt::FontStrikeout::SINGLE : css::awt::FontStrikeout::NONE; maApiData.mbOutline = maModel.mbOutline; maApiData.mbShadow = maModel.mbShadow; // underline switch( maModel.mnUnderline ) { - case XML_double: maApiData.maDesc.Underline = cssawt::FontUnderline::DOUBLE; break; - case XML_doubleAccounting: maApiData.maDesc.Underline = cssawt::FontUnderline::DOUBLE; break; - case XML_none: maApiData.maDesc.Underline = cssawt::FontUnderline::NONE; break; - case XML_single: maApiData.maDesc.Underline = cssawt::FontUnderline::SINGLE; break; - case XML_singleAccounting: maApiData.maDesc.Underline = cssawt::FontUnderline::SINGLE; break; + case XML_double: maApiData.maDesc.Underline = css::awt::FontUnderline::DOUBLE; break; + case XML_doubleAccounting: maApiData.maDesc.Underline = css::awt::FontUnderline::DOUBLE; break; + case XML_none: maApiData.maDesc.Underline = css::awt::FontUnderline::NONE; break; + case XML_single: maApiData.maDesc.Underline = css::awt::FontUnderline::SINGLE; break; + case XML_singleAccounting: maApiData.maDesc.Underline = css::awt::FontUnderline::SINGLE; break; } // escapement @@ -878,29 +876,28 @@ bool Font::needsRichTextFormat() const { return maApiData.mnEscapement != API_ESCAPE_NONE; } + ::FontFamily lcl_getFontFamily( sal_Int32 nFamily ) { - namespace cssawt = ::com::sun::star::awt; - ::FontFamily eScFamily = FAMILY_DONTKNOW; switch( nFamily ) { - case cssawt::FontFamily::DONTKNOW: + case css::awt::FontFamily::DONTKNOW: eScFamily = FAMILY_DONTKNOW; break; - case cssawt::FontFamily::ROMAN: + case css::awt::FontFamily::ROMAN: eScFamily = FAMILY_ROMAN; break; - case cssawt::FontFamily::SWISS: + case css::awt::FontFamily::SWISS: eScFamily = FAMILY_SWISS; break; - case cssawt::FontFamily::MODERN: + case css::awt::FontFamily::MODERN: eScFamily = FAMILY_MODERN; break; - case cssawt::FontFamily::SCRIPT: + case css::awt::FontFamily::SCRIPT: eScFamily = FAMILY_SCRIPT; break; - case cssawt::FontFamily::DECORATIVE: + case css::awt::FontFamily::DECORATIVE: eScFamily = FAMILY_DECORATIVE; break; } @@ -909,7 +906,6 @@ bool Font::needsRichTextFormat() const void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkipPoolDefs ) const { - namespace cssawt = ::com::sun::star::awt; if ( maUsedFlags.mbNameUsed ) { if( !maApiData.maLatinFont.maName.isEmpty() ) @@ -968,7 +964,7 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip // font posture if( maUsedFlags.mbPostureUsed ) { - SvxPostureItem aPostItem( ( maApiData.maDesc.Slant == cssawt::FontSlant_ITALIC ) ? ITALIC_NORMAL : ITALIC_NONE, ATTR_FONT_POSTURE); + SvxPostureItem aPostItem( ( maApiData.maDesc.Slant == css::awt::FontSlant_ITALIC ) ? ITALIC_NORMAL : ITALIC_NONE, ATTR_FONT_POSTURE); ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC : ATTR_FONT_POSTURE, bSkipPoolDefs ); ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC_CJK : ATTR_CJK_FONT_POSTURE, bSkipPoolDefs ); ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC_CTL : ATTR_CTL_FONT_POSTURE, bSkipPoolDefs ); @@ -981,13 +977,13 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip // underline style if( maUsedFlags.mbUnderlineUsed ) { - ::FontUnderline eScUnderl; - if ( maApiData.maDesc.Underline == cssawt::FontUnderline::DOUBLE ) - eScUnderl = UNDERLINE_DOUBLE; - else if ( maApiData.maDesc.Underline == cssawt::FontUnderline::SINGLE ) - eScUnderl = UNDERLINE_SINGLE; + FontLineStyle eScUnderl; + if ( maApiData.maDesc.Underline == css::awt::FontUnderline::DOUBLE ) + eScUnderl = LINESTYLE_DOUBLE; + else if ( maApiData.maDesc.Underline == css::awt::FontUnderline::SINGLE ) + eScUnderl = LINESTYLE_SINGLE; else - eScUnderl = UNDERLINE_NONE; + eScUnderl = LINESTYLE_NONE; SvxUnderlineItem aUnderlItem( eScUnderl, ATTR_FONT_UNDERLINE ); ScfTools::PutItem( rItemSet, aUnderlItem, bEditEngineText ? EE_CHAR_UNDERLINE : ATTR_FONT_UNDERLINE, bSkipPoolDefs ); } @@ -1188,37 +1184,34 @@ void Alignment::setBiff12Data( sal_uInt32 nFlags ) void Alignment::finalizeImport() { - namespace csstab = ::com::sun::star::table; - namespace csstxt = ::com::sun::star::text; - // horizontal alignment switch( maModel.mnHorAlign ) { - case XML_center: maApiData.meHorJustify = csstab::CellHoriJustify_CENTER; break; - case XML_centerContinuous: maApiData.meHorJustify = csstab::CellHoriJustify_CENTER; break; - case XML_distributed: maApiData.meHorJustify = csstab::CellHoriJustify_BLOCK; break; - case XML_fill: maApiData.meHorJustify = csstab::CellHoriJustify_REPEAT; break; - case XML_general: maApiData.meHorJustify = csstab::CellHoriJustify_STANDARD; break; - case XML_justify: maApiData.meHorJustify = csstab::CellHoriJustify_BLOCK; break; - case XML_left: maApiData.meHorJustify = csstab::CellHoriJustify_LEFT; break; - case XML_right: maApiData.meHorJustify = csstab::CellHoriJustify_RIGHT; break; + case XML_center: maApiData.meHorJustify = css::table::CellHoriJustify_CENTER; break; + case XML_centerContinuous: maApiData.meHorJustify = css::table::CellHoriJustify_CENTER; break; + case XML_distributed: maApiData.meHorJustify = css::table::CellHoriJustify_BLOCK; break; + case XML_fill: maApiData.meHorJustify = css::table::CellHoriJustify_REPEAT; break; + case XML_general: maApiData.meHorJustify = css::table::CellHoriJustify_STANDARD; break; + case XML_justify: maApiData.meHorJustify = css::table::CellHoriJustify_BLOCK; break; + case XML_left: maApiData.meHorJustify = css::table::CellHoriJustify_LEFT; break; + case XML_right: maApiData.meHorJustify = css::table::CellHoriJustify_RIGHT; break; } if (maModel.mnHorAlign == XML_distributed) - maApiData.mnHorJustifyMethod = csstab::CellJustifyMethod::DISTRIBUTE; + maApiData.mnHorJustifyMethod = css::table::CellJustifyMethod::DISTRIBUTE; // vertical alignment switch( maModel.mnVerAlign ) { - case XML_bottom: maApiData.mnVerJustify = csstab::CellVertJustify2::BOTTOM; break; - case XML_center: maApiData.mnVerJustify = csstab::CellVertJustify2::CENTER; break; - case XML_distributed: maApiData.mnVerJustify = csstab::CellVertJustify2::BLOCK; break; - case XML_justify: maApiData.mnVerJustify = csstab::CellVertJustify2::BLOCK; break; - case XML_top: maApiData.mnVerJustify = csstab::CellVertJustify2::TOP; break; + case XML_bottom: maApiData.mnVerJustify = css::table::CellVertJustify2::BOTTOM; break; + case XML_center: maApiData.mnVerJustify = css::table::CellVertJustify2::CENTER; break; + case XML_distributed: maApiData.mnVerJustify = css::table::CellVertJustify2::BLOCK; break; + case XML_justify: maApiData.mnVerJustify = css::table::CellVertJustify2::BLOCK; break; + case XML_top: maApiData.mnVerJustify = css::table::CellVertJustify2::TOP; break; } if (maModel.mnVerAlign == XML_distributed) - maApiData.mnVerJustifyMethod = csstab::CellJustifyMethod::DISTRIBUTE; + maApiData.mnVerJustifyMethod = css::table::CellJustifyMethod::DISTRIBUTE; /* indentation: expressed as number of blocks of 3 space characters in OOXML/BIFF12, and as multiple of 10 points in BIFF8. */ @@ -1235,9 +1228,9 @@ void Alignment::finalizeImport() // complex text direction switch( maModel.mnTextDir ) { - case OOX_XF_TEXTDIR_CONTEXT: maApiData.mnWritingMode = csstxt::WritingMode2::PAGE; break; - case OOX_XF_TEXTDIR_LTR: maApiData.mnWritingMode = csstxt::WritingMode2::LR_TB; break; - case OOX_XF_TEXTDIR_RTL: maApiData.mnWritingMode = csstxt::WritingMode2::RL_TB; break; + case OOX_XF_TEXTDIR_CONTEXT: maApiData.mnWritingMode = css::text::WritingMode2::PAGE; break; + case OOX_XF_TEXTDIR_LTR: maApiData.mnWritingMode = css::text::WritingMode2::LR_TB; break; + case OOX_XF_TEXTDIR_RTL: maApiData.mnWritingMode = css::text::WritingMode2::RL_TB; break; } // rotation: 0-90 means 0 to 90 degrees ccw, 91-180 means 1 to 90 degrees cw, 255 means stacked @@ -1248,7 +1241,7 @@ void Alignment::finalizeImport() // "Orientation" property used for character stacking maApiData.meOrientation = (nOoxRot == OOX_XF_ROTATION_STACKED) ? - csstab::CellOrientation_STACKED : csstab::CellOrientation_STANDARD; + css::table::CellOrientation_STACKED : css::table::CellOrientation_STANDARD; // alignment flags (#i84960 automatic line break, if vertically justified/distributed) maApiData.mbWrapText = maModel.mbWrapText || (maModel.mnVerAlign == XML_distributed) || (maModel.mnVerAlign == XML_justify); @@ -1258,23 +1251,22 @@ void Alignment::finalizeImport() ::SvxCellVerJustify Alignment::GetScVerAlign() const { - namespace csstab = ::com::sun::star::table; ::SvxCellVerJustify nVert = ::SVX_VER_JUSTIFY_STANDARD; switch ( maApiData.mnVerJustify ) { - case csstab::CellVertJustify2::BOTTOM: + case css::table::CellVertJustify2::BOTTOM: nVert = ::SVX_VER_JUSTIFY_BOTTOM; break; - case csstab::CellVertJustify2::CENTER: + case css::table::CellVertJustify2::CENTER: nVert = ::SVX_VER_JUSTIFY_CENTER; break; - case csstab::CellVertJustify2::TOP: + case css::table::CellVertJustify2::TOP: nVert = ::SVX_VER_JUSTIFY_TOP; break; - case csstab::CellVertJustify2::BLOCK: + case css::table::CellVertJustify2::BLOCK: nVert = ::SVX_VER_JUSTIFY_BLOCK; break; - case csstab::CellVertJustify2::STANDARD: + case css::table::CellVertJustify2::STANDARD: default: nVert = ::SVX_VER_JUSTIFY_STANDARD; break; @@ -1284,26 +1276,25 @@ void Alignment::finalizeImport() ::SvxCellHorJustify Alignment::GetScHorAlign() const { - namespace csstab = ::com::sun::star::table; ::SvxCellHorJustify nHori = ::SVX_HOR_JUSTIFY_STANDARD; switch( maApiData.meHorJustify ) { - case csstab::CellHoriJustify_LEFT: + case css::table::CellHoriJustify_LEFT: nHori = ::SVX_HOR_JUSTIFY_LEFT; break; - case csstab::CellHoriJustify_CENTER: + case css::table::CellHoriJustify_CENTER: nHori = ::SVX_HOR_JUSTIFY_CENTER; break; - case csstab::CellHoriJustify_RIGHT: + case css::table::CellHoriJustify_RIGHT: nHori = ::SVX_HOR_JUSTIFY_RIGHT; break; - case csstab::CellHoriJustify_BLOCK: + case css::table::CellHoriJustify_BLOCK: nHori = ::SVX_HOR_JUSTIFY_BLOCK; break; - case csstab::CellHoriJustify_REPEAT: + case css::table::CellHoriJustify_REPEAT: nHori = ::SVX_HOR_JUSTIFY_REPEAT; break; - case csstab::CellHoriJustify_STANDARD: + case css::table::CellHoriJustify_STANDARD: default: nHori = ::SVX_HOR_JUSTIFY_STANDARD; break; @@ -1313,17 +1304,16 @@ void Alignment::finalizeImport() ::SvxFrameDirection Alignment::GetScFrameDir() const { - namespace csstxt = css::text; ::SvxFrameDirection eFrameDir = ::FRMDIR_ENVIRONMENT; switch( maApiData.mnWritingMode ) { - case csstxt::WritingMode2::PAGE: + case css::text::WritingMode2::PAGE: eFrameDir = ::FRMDIR_ENVIRONMENT; break; - case csstxt::WritingMode2::LR_TB: + case css::text::WritingMode2::LR_TB: eFrameDir = ::FRMDIR_HORI_LEFT_TOP; break; - case csstxt::WritingMode2::RL_TB: + case css::text::WritingMode2::RL_TB: eFrameDir = ::FRMDIR_HORI_RIGHT_TOP; break; default: @@ -1334,20 +1324,19 @@ void Alignment::finalizeImport() void Alignment::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const { - namespace csstab = ::com::sun::star::table; // horizontal alignment ScfTools::PutItem( rItemSet, SvxHorJustifyItem( GetScHorAlign(), ATTR_HOR_JUSTIFY ), bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnHorJustifyMethod == csstab::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_HOR_JUSTIFY_METHOD ), bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnHorJustifyMethod == css::table::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_HOR_JUSTIFY_METHOD ), bSkipPoolDefs ); ScfTools::PutItem( rItemSet, SvxVerJustifyItem( GetScVerAlign(), ATTR_VER_JUSTIFY ), bSkipPoolDefs ); // vertical alignment - ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnVerJustifyMethod == csstab::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_VER_JUSTIFY_METHOD ), bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnVerJustifyMethod == css::table::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_VER_JUSTIFY_METHOD ), bSkipPoolDefs ); // CTL text direction ScfTools::PutItem( rItemSet, SvxFrameDirectionItem( GetScFrameDir(), ATTR_WRITINGDIR ), bSkipPoolDefs ); // set an angle in the range from -90 to 90 degrees ScfTools::PutItem( rItemSet, SfxInt32Item( ATTR_ROTATE_VALUE, maApiData.mnRotation ), bSkipPoolDefs ); // Orientation - ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, maApiData.meOrientation == csstab::CellOrientation_STACKED ), bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, maApiData.meOrientation == css::table::CellOrientation_STACKED ), bSkipPoolDefs ); // indent ScfTools::PutItem( rItemSet, SfxUInt16Item( ATTR_INDENT, maApiData.mnIndent ), bSkipPoolDefs ); // line wrap diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index cc24444865f0..dbe1f5abf269 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -739,7 +739,7 @@ ScOrcusStyles::font::font(): mbBold(false), mbItalic(false), mnSize(10), - meUnderline(UNDERLINE_NONE) + meUnderline(LINESTYLE_NONE) { } @@ -949,14 +949,14 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e) { case orcus::spreadsheet::underline_single: case orcus::spreadsheet::underline_single_accounting: - maCurrentFont.meUnderline = UNDERLINE_SINGLE; + maCurrentFont.meUnderline = LINESTYLE_SINGLE; break; case orcus::spreadsheet::underline_double: case orcus::spreadsheet::underline_double_accounting: - maCurrentFont.meUnderline = UNDERLINE_DOUBLE; + maCurrentFont.meUnderline = LINESTYLE_DOUBLE; break; case orcus::spreadsheet::underline_none: - maCurrentFont.meUnderline = UNDERLINE_NONE; + maCurrentFont.meUnderline = LINESTYLE_NONE; break; } } diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 64ad41012a98..9b88d71b00bc 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -142,7 +142,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, if( bIsItalic ) rItemSet.Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); if( bIsUnderLine ) - rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + rItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); if (maFontHeight[ maFont [ nStyle ] ]) rItemSet.Put( SvxFontHeightItem( (sal_uLong) (20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) ); diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index b6ed3a4480ff..4c16276380e8 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -224,7 +224,7 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_I ); } - if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE ) + if ( rUnderlineItem.GetLineStyle() != LINESTYLE_NONE ) { // underline bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index edf6bf72ca74..e6439c06d313 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -729,7 +729,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) if (pHeadFootLine->LogFont.lfItalic != 0) aEditAttribs.Put(SvxPostureItem(ITALIC_NORMAL, EE_CHAR_ITALIC), EE_CHAR_ITALIC); if (pHeadFootLine->LogFont.lfUnderline != 0) - aEditAttribs.Put(SvxUnderlineItem(UNDERLINE_SINGLE, EE_CHAR_UNDERLINE), EE_CHAR_UNDERLINE); + aEditAttribs.Put(SvxUnderlineItem(LINESTYLE_SINGLE, EE_CHAR_UNDERLINE), EE_CHAR_UNDERLINE); if (pHeadFootLine->LogFont.lfStrikeOut != 0) aEditAttribs.Put(SvxCrossedOutItem(STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT), EE_CHAR_STRIKEOUT); OUString aText( pHeadFootLine->Title, strlen(pHeadFootLine->Title), DEFCHARSET ); @@ -1147,7 +1147,7 @@ void Sc10Import::LoadPatternCollection() if( pPattern->LogFont.lfItalic != 0 ) rItemSet.Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); if( pPattern->LogFont.lfUnderline != 0 ) - rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + rItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); if( pPattern->LogFont.lfStrikeOut != 0 ) rItemSet.Put( SvxCrossedOutItem( STRIKEOUT_SINGLE, ATTR_FONT_CROSSEDOUT ) ); } @@ -1776,7 +1776,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) if ((nValue1 & atItalic) == atItalic) aScPattern.GetItemSet().Put(SvxPostureItem(ITALIC_NORMAL, ATTR_FONT_POSTURE)); if ((nValue1 & atUnderline) == atUnderline) - aScPattern.GetItemSet().Put(SvxUnderlineItem(UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE)); + aScPattern.GetItemSet().Put(SvxUnderlineItem(LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE)); if ((nValue1 & atStrikeOut) == atStrikeOut) aScPattern.GetItemSet().Put(SvxCrossedOutItem(STRIKEOUT_SINGLE, ATTR_FONT_CROSSEDOUT)); pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 1af0794e956d..d64d2045ceaf 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -482,7 +482,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons case EE_CHAR_UNDERLINE: { if (!pPoolItem) - pPoolItem.reset(new SvxUnderlineItem(UNDERLINE_NONE, pEntry->mnItemID)); + pPoolItem.reset(new SvxUnderlineItem(LINESTYLE_NONE, pEntry->mnItemID)); pPoolItem->PutValue(it->maValue, pEntry->mnFlag); } @@ -490,7 +490,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons case EE_CHAR_OVERLINE: { if (!pPoolItem) - pPoolItem.reset(new SvxOverlineItem(UNDERLINE_NONE, pEntry->mnItemID)); + pPoolItem.reset(new SvxOverlineItem(LINESTYLE_NONE, pEntry->mnItemID)); pPoolItem->PutValue(it->maValue, pEntry->mnFlag); } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 520e2f29bc79..ee4d1ec01480 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -554,22 +554,22 @@ void ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq ) pView->GetAttributes(aViewAttr); // Unterstreichung - FontUnderline eOld = static_cast<const SvxUnderlineItem&>( aViewAttr. + FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( aViewAttr. Get(EE_CHAR_UNDERLINE)).GetLineStyle(); - FontUnderline eNew = eOld; + FontLineStyle eNew = eOld; switch (nSlot) { case SID_ULINE_VAL_NONE: - eNew = UNDERLINE_NONE; + eNew = LINESTYLE_NONE; break; case SID_ULINE_VAL_SINGLE: - eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld == LINESTYLE_SINGLE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; break; case SID_ULINE_VAL_DOUBLE: - eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE; + eNew = ( eOld == LINESTYLE_DOUBLE ) ? LINESTYLE_NONE : LINESTYLE_DOUBLE; break; case SID_ULINE_VAL_DOTTED: - eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED; + eNew = ( eOld == LINESTYLE_DOTTED ) ? LINESTYLE_NONE : LINESTYLE_DOTTED; break; default: break; @@ -1114,14 +1114,14 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } else { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( aAttrSet.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { - case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; - case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; - case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; + case LINESTYLE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; + case LINESTYLE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; + case LINESTYLE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; default: break; } diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 647c2d5023ad..302a48cc184d 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -145,8 +145,8 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font #define SETONALLFONTS( MethodName, Value ) \ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Value ); - SETONALLFONTS( SetUnderline, (FontUnderline)pUnderlineItem->GetValue() ) - SETONALLFONTS( SetOverline, (FontUnderline)pOverlineItem->GetValue() ) + SETONALLFONTS( SetUnderline, (FontLineStyle)pUnderlineItem->GetValue() ) + SETONALLFONTS( SetOverline, (FontLineStyle)pOverlineItem->GetValue() ) SETONALLFONTS( SetStrikeout, (FontStrikeout)pCrossedOutItem->GetValue() ) SETONALLFONTS( SetOutline, pContourItem->GetValue() ) SETONALLFONTS( SetShadow, pShadowedItem->GetValue() ) diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 311b283e13ee..eb8082f101a0 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -956,7 +956,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) break; case SID_ULINE_VAL_NONE: - aSet.Put( SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); + aSet.Put( SvxUnderlineItem( LINESTYLE_NONE, EE_CHAR_UNDERLINE ) ); lcl_InvalidateUnder( rBindings ); break; @@ -965,9 +965,9 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ULINE_VAL_DOUBLE: case SID_ULINE_VAL_DOTTED: { - FontUnderline eOld = static_cast<const SvxUnderlineItem&>( pEditView-> + FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( pEditView-> GetAttribs().Get(EE_CHAR_UNDERLINE)).GetLineStyle(); - FontUnderline eNew = eOld; + FontLineStyle eNew = eOld; switch (nSlot) { case SID_ATTR_CHAR_UNDERLINE: @@ -978,17 +978,17 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) } else { - eNew = ( eOld != UNDERLINE_NONE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld != LINESTYLE_NONE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; } break; case SID_ULINE_VAL_SINGLE: - eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld == LINESTYLE_SINGLE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; break; case SID_ULINE_VAL_DOUBLE: - eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE; + eNew = ( eOld == LINESTYLE_DOUBLE ) ? LINESTYLE_NONE : LINESTYLE_DOUBLE; break; case SID_ULINE_VAL_DOTTED: - eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED; + eNew = ( eOld == LINESTYLE_DOTTED ) ? LINESTYLE_NONE : LINESTYLE_DOTTED; break; } aSet.Put( SvxUnderlineItem( eNew, EE_CHAR_UNDERLINE ) ); @@ -998,9 +998,9 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_OVERLINE: { - FontUnderline eOld = static_cast<const SvxOverlineItem&>( pEditView-> + FontLineStyle eOld = static_cast<const SvxOverlineItem&>( pEditView-> GetAttribs().Get(EE_CHAR_OVERLINE)).GetLineStyle(); - FontUnderline eNew = ( eOld != UNDERLINE_NONE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + FontLineStyle eNew = ( eOld != LINESTYLE_NONE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; aSet.Put( SvxOverlineItem( eNew, EE_CHAR_OVERLINE ) ); rBindings.Invalidate( nSlot ); } @@ -1139,14 +1139,14 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) } else { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( aAttribs.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { - case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; - case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; - case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; + case LINESTYLE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; + case LINESTYLE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; + case LINESTYLE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; default: break; } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index abd34e4ac04f..fffe810fb340 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1410,7 +1410,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_UNDERLINE: { - FontUnderline eUnderline; + FontLineStyle eUnderline; if( pSet ) { @@ -1436,9 +1436,9 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SvxUnderlineItem aUnderline( static_cast<const SvxUnderlineItem&>( pAttrs->GetItem( ATTR_FONT_UNDERLINE ) ) ); - eUnderline = (UNDERLINE_NONE != aUnderline.GetLineStyle()) - ? UNDERLINE_NONE - : UNDERLINE_SINGLE; + eUnderline = (LINESTYLE_NONE != aUnderline.GetLineStyle()) + ? LINESTYLE_NONE + : LINESTYLE_SINGLE; aUnderline.SetLineStyle( eUnderline ); pTabViewShell->ApplyAttr( aUnderline ); pNewSet->Put( aUnderline,aUnderline.Which() ); @@ -1447,25 +1447,25 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) break; case SID_ULINE_VAL_NONE: - pTabViewShell->ApplyAttr( SvxUnderlineItem( UNDERLINE_NONE, ATTR_FONT_UNDERLINE ) ); + pTabViewShell->ApplyAttr( SvxUnderlineItem( LINESTYLE_NONE, ATTR_FONT_UNDERLINE ) ); break; case SID_ULINE_VAL_SINGLE: // Toggles case SID_ULINE_VAL_DOUBLE: case SID_ULINE_VAL_DOTTED: { - FontUnderline eOld = static_cast<const SvxUnderlineItem&>( + FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( pAttrs->GetItem(ATTR_FONT_UNDERLINE)).GetLineStyle(); - FontUnderline eNew = eOld; + FontLineStyle eNew = eOld; switch (nSlot) { case SID_ULINE_VAL_SINGLE: - eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld == LINESTYLE_SINGLE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; break; case SID_ULINE_VAL_DOUBLE: - eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE; + eNew = ( eOld == LINESTYLE_DOUBLE ) ? LINESTYLE_NONE : LINESTYLE_DOUBLE; break; case SID_ULINE_VAL_DOTTED: - eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED; + eNew = ( eOld == LINESTYLE_DOTTED ) ? LINESTYLE_NONE : LINESTYLE_DOTTED; break; } pTabViewShell->ApplyAttr( SvxUnderlineItem( eNew, ATTR_FONT_UNDERLINE ) ); @@ -2182,14 +2182,14 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } else { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( rAttrSet.Get(ATTR_FONT_UNDERLINE)).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { - case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; - case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; - case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; + case LINESTYLE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; + case LINESTYLE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; + case LINESTYLE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; default: break; } diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 8bdb102b67bc..153bf96642b1 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -212,8 +212,8 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(SvxContourItem(false, EE_CHAR_OUTLINE )); rISet.Put(SvxShadowedItem(false, EE_CHAR_SHADOW )); - rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE)); - rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE)); + rISet.Put(SvxUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE)); + rISet.Put(SvxOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE)); rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); rISet.Put(SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP )); rISet.Put(SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK)); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index d6d7c2a22828..359d99ccc976 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -238,8 +238,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool rSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) ); rSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) ); rSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) ); - rSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); - rSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) ); + rSet.Put( SvxUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE ) ); + rSet.Put( SvxOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE ) ); rSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) ); rSet.Put( SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP ) ); rSet.Put( SvxShadowedItem(false, EE_CHAR_SHADOW ) ); @@ -356,8 +356,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool rTitleSet.Put(SvxFontHeightItem( 1552, 100, EE_CHAR_FONTHEIGHT ) ); // 44 pt rTitleSet.Put(SvxFontHeightItem( 1552, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 44 pt rTitleSet.Put(SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( 1552 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 44 pt - rTitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE )); - rTitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE )); + rTitleSet.Put(SvxUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE )); + rTitleSet.Put(SvxOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE )); rTitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); rTitleSet.Put(SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP )); rTitleSet.Put(SvxShadowedItem(false, EE_CHAR_SHADOW )); @@ -402,8 +402,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool rSubtitleSet.Put( SvxFontHeightItem( 1129, 100, EE_CHAR_FONTHEIGHT ) ); // 32 pt rSubtitleSet.Put( SvxFontHeightItem( 1129, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 32 pt rSubtitleSet.Put( SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( 1129 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 32 pt - rSubtitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE )); - rSubtitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE )); + rSubtitleSet.Put(SvxUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE )); + rSubtitleSet.Put(SvxOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE )); rSubtitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); rSubtitleSet.Put(SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP )); rSubtitleSet.Put(SvxShadowedItem(false, EE_CHAR_SHADOW )); @@ -451,8 +451,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool rNotesSet.Put( SvxFontHeightItem( 705, 100, EE_CHAR_FONTHEIGHT ) ); // 20 pt rNotesSet.Put( SvxFontHeightItem( 705, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 20 pt rNotesSet.Put( SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( 705 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 20 pt - rNotesSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); - rNotesSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) ); + rNotesSet.Put( SvxUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE ) ); + rNotesSet.Put( SvxOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE ) ); rNotesSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) ); rNotesSet.Put( SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP ) ); rNotesSet.Put( SvxShadowedItem(false, EE_CHAR_SHADOW ) ); @@ -1222,8 +1222,8 @@ vcl::Font SdStyleSheetPool::GetBulletFont() vcl::Font aBulletFont( OUString( "StarSymbol" ), Size(0, 1000) ); aBulletFont.SetCharSet(RTL_TEXTENCODING_UNICODE); aBulletFont.SetWeight(WEIGHT_NORMAL); - aBulletFont.SetUnderline(UNDERLINE_NONE); - aBulletFont.SetOverline(UNDERLINE_NONE); + aBulletFont.SetUnderline(LINESTYLE_NONE); + aBulletFont.SetOverline(LINESTYLE_NONE); aBulletFont.SetStrikeout(STRIKEOUT_NONE); aBulletFont.SetItalic(ITALIC_NONE); aBulletFont.SetOutline(false); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index aee3bdf1a7e3..85d962ca1a96 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1488,7 +1488,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState if ( pSet->GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) { - bTemp = static_cast<const SvxUnderlineItem&>(pSet->Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE; + bTemp = static_cast<const SvxUnderlineItem&>(pSet->Get( EE_CHAR_UNDERLINE )).GetLineStyle() != LINESTYLE_NONE; aTemp = pState->SetUnderline( bTemp ); if( bTemp ) aStr.insert(0, aTemp); diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 7e90868080c4..49e0720571a2 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -940,7 +940,7 @@ void FontStylePropertyBox::update() vcl::Font aFont( mpEdit->GetFont() ); aFont.SetWeight( mfFontWeight == awt::FontWeight::BOLD ? WEIGHT_BOLD : WEIGHT_NORMAL ); aFont.SetItalic( meFontSlant == awt::FontSlant_ITALIC ? ITALIC_NORMAL : ITALIC_NONE ); - aFont.SetUnderline( mnFontUnderline == awt::FontUnderline::NONE ? UNDERLINE_NONE : UNDERLINE_SINGLE ); + aFont.SetUnderline( mnFontUnderline == awt::FontUnderline::NONE ? LINESTYLE_NONE : LINESTYLE_SINGLE ); mpEdit->SetFont( aFont ); mpEdit->Invalidate(); } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 8377c06ab7ab..02f3ca3af02a 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -957,7 +957,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation } if ( aSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) { - if( static_cast<const SvxUnderlineItem&>(aSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE ) + if( static_cast<const SvxUnderlineItem&>(aSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() != LINESTYLE_NONE ) pMenu->CheckItem( SID_ATTR_CHAR_UNDERLINE ); } diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index dcbeb2262a75..e0c42c49225a 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -780,8 +780,8 @@ void AnnotationWindow::ExecuteSlot( sal_uInt16 nSID ) break; case SID_ATTR_CHAR_UNDERLINE: { - FontUnderline eFU = static_cast<const SvxUnderlineItem&>( aEditAttr. Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); - aNewAttr.Put( SvxUnderlineItem( eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ) ); + FontLineStyle eFU = static_cast<const SvxUnderlineItem&>( aEditAttr. Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); + aNewAttr.Put( SvxUnderlineItem( eFU == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE ) ); } break; case SID_ATTR_CHAR_STRIKEOUT: diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index d18703f7cd07..3cf7623ca2d6 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -446,19 +446,19 @@ void TextObjectBar::Execute( SfxRequest &rReq ) break; case SID_ATTR_CHAR_UNDERLINE: { - FontUnderline eFU = static_cast<const SvxUnderlineItem&>( aEditAttr. + FontLineStyle eFU = static_cast<const SvxUnderlineItem&>( aEditAttr. Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); - aNewAttr.Put( SvxUnderlineItem( eFU == UNDERLINE_SINGLE ? - UNDERLINE_NONE : UNDERLINE_SINGLE, + aNewAttr.Put( SvxUnderlineItem( eFU == LINESTYLE_SINGLE ? + LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE ) ); } break; case SID_ATTR_CHAR_OVERLINE: { - FontUnderline eFO = static_cast<const SvxOverlineItem&>( aEditAttr. + FontLineStyle eFO = static_cast<const SvxOverlineItem&>( aEditAttr. Get( EE_CHAR_OVERLINE ) ).GetLineStyle(); - aNewAttr.Put( SvxOverlineItem( eFO == UNDERLINE_SINGLE ? - UNDERLINE_NONE : UNDERLINE_SINGLE, + aNewAttr.Put( SvxOverlineItem( eFO == LINESTYLE_SINGLE ? + LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_OVERLINE ) ); } break; diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 72cbb03e5d54..3ee00b3bf899 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2972,8 +2972,8 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) } else { - FontUnderline eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); - aNewAttr.Put( SvxUnderlineItem( eFU != UNDERLINE_NONE ?UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ) ); + FontLineStyle eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); + aNewAttr.Put( SvxUnderlineItem( eFU != LINESTYLE_NONE ?LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE ) ); }//aNewAttr.Put( (const SvxUnderlineItem&)aEditAttr.Get( EE_CHAR_UNDERLINE ) ); } break; diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 66bdc03540b5..d3c04c2a77de 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -136,7 +136,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie maBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard maBulletFont.SetFamilyName( "StarSymbol" ); maBulletFont.SetWeight(WEIGHT_NORMAL); - maBulletFont.SetUnderline(UNDERLINE_NONE); + maBulletFont.SetUnderline(LINESTYLE_NONE); maBulletFont.SetStrikeout(STRIKEOUT_NONE); maBulletFont.SetItalic(ITALIC_NONE); maBulletFont.SetOutline(false); diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx index adac26df0724..5ad6bf30af4d 100644 --- a/svtools/source/control/breadcrumb.cxx +++ b/svtools/source/control/breadcrumb.cxx @@ -16,7 +16,7 @@ public: : FixedHyperlink( pParent, nWinStyle ) { vcl::Font aFont = GetControlFont( ); - aFont.SetUnderline( UNDERLINE_NONE ); + aFont.SetUnderline( LINESTYLE_NONE ); SetControlFont( aFont ); } @@ -27,13 +27,13 @@ protected: if ( !rMEvt.IsLeaveWindow() && IsEnabled() ) { vcl::Font aFont = GetControlFont( ); - aFont.SetUnderline( UNDERLINE_SINGLE ); + aFont.SetUnderline( LINESTYLE_SINGLE ); SetControlFont( aFont ); } else { vcl::Font aFont = GetControlFont( ); - aFont.SetUnderline( UNDERLINE_NONE ); + aFont.SetUnderline( LINESTYLE_NONE ); SetControlFont( aFont ); } diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index 1814bc03da64..73077943d7b6 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -113,7 +113,7 @@ namespace svt void HyperLabel::ActivateHyperMode(vcl::Font aFont, const Color aColor) { - aFont.SetUnderline(UNDERLINE_SINGLE); + aFont.SetUnderline(LINESTYLE_SINGLE); m_pImpl->m_bHyperMode = true; SetPointer( PointerStyle::RefHand ); SetControlFont( aFont); @@ -124,7 +124,7 @@ namespace svt void HyperLabel::DeactivateHyperMode(vcl::Font aFont, const Color aColor) { m_pImpl->m_bHyperMode = false; - aFont.SetUnderline(UNDERLINE_NONE); + aFont.SetUnderline(LINESTYLE_NONE); SetPointer( PointerStyle::Arrow ); SetControlFont( aFont); SetTextColor( aColor); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 216d3db6bd43..de94b791eadf 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -209,7 +209,7 @@ void ORoadmap::implInit(vcl::RenderContext& rRenderContext) vcl::Font aFont = rRenderContext.GetFont(); aFont.SetColor(aTextColor); aFont.SetWeight(WEIGHT_BOLD); - aFont.SetUnderline(UNDERLINE_SINGLE); + aFont.SetUnderline(LINESTYLE_SINGLE); rRenderContext.SetFont(aFont); rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetFieldColor())); m_pImpl->InCompleteHyperLabel = nullptr; @@ -589,7 +589,7 @@ void ORoadmap::DrawHeadline(vcl::RenderContext& rRenderContext) // draw it rRenderContext.DrawText(Rectangle(aTextPos, aOutputSize), GetText(), DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); - rRenderContext.DrawTextLine(aTextPos, aOutputSize.Width(), STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE); + rRenderContext.DrawTextLine(aTextPos, aOutputSize.Width(), STRIKEOUT_NONE, LINESTYLE_SINGLE, LINESTYLE_NONE); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetLineColor(rStyleSettings.GetFieldTextColor()); rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor()); diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 34bde58e7d54..23fcff86a175 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -954,30 +954,30 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack } // Underline - FontUnderline eUnderline; + FontLineStyle eUnderline; if( GetWhich( rSet, SID_ATTR_CHAR_UNDERLINE, nWhich ) ) { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>( rSet.Get( nWhich ) ); - eUnderline = ( FontUnderline ) rItem.GetValue(); + eUnderline = ( FontLineStyle ) rItem.GetValue(); SetTextLineColor( rItem.GetColor() ); } else - eUnderline = UNDERLINE_NONE; + eUnderline = LINESTYLE_NONE; rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); // Overline - FontUnderline eOverline; + FontLineStyle eOverline; if( GetWhich( rSet, SID_ATTR_CHAR_OVERLINE, nWhich ) ) { const SvxOverlineItem& rItem = static_cast<const SvxOverlineItem&>( rSet.Get( nWhich ) ); - eOverline = ( FontUnderline ) rItem.GetValue(); + eOverline = ( FontLineStyle ) rItem.GetValue(); SetOverlineColor( rItem.GetColor() ); } else - eOverline = UNDERLINE_NONE; + eOverline = LINESTYLE_NONE; rFont.SetOverline( eOverline ); rCJKFont.SetOverline( eOverline ); @@ -1189,32 +1189,32 @@ void SvxFontPrevWindow::Init(const SfxItemSet& rSet) } // Underline - FontUnderline eUnderline; + FontLineStyle eUnderline; nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_UNDERLINE ); if( ISITEMSET ) { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>( rSet.Get( nWhich ) ); - eUnderline = ( FontUnderline ) rItem.GetValue(); + eUnderline = ( FontLineStyle ) rItem.GetValue(); SetTextLineColor( rItem.GetColor() ); } else - eUnderline = UNDERLINE_NONE; + eUnderline = LINESTYLE_NONE; rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); // Overline - FontUnderline eOverline; + FontLineStyle eOverline; nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_OVERLINE ); if( ISITEMSET ) { const SvxOverlineItem& rItem = static_cast<const SvxOverlineItem&>( rSet.Get( nWhich ) ); - eOverline = ( FontUnderline ) rItem.GetValue(); + eOverline = ( FontLineStyle ) rItem.GetValue(); SetOverlineColor( rItem.GetColor() ); } else - eOverline = UNDERLINE_NONE; + eOverline = LINESTYLE_NONE; rFont.SetOverline( eOverline ); rCJKFont.SetOverline( eOverline ); diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 6e589fe441f6..5e63d62a3334 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -114,7 +114,7 @@ vcl::Font ImplCreateFont( const css::awt::FontDescriptor& rDescr ) aFont.SetWidthType( VCLUnoHelper::ConvertFontWidth( rDescr.CharacterWidth ) ); aFont.SetWeight( VCLUnoHelper::ConvertFontWeight( rDescr.Weight ) ); aFont.SetItalic( (FontItalic)rDescr.Slant ); - aFont.SetUnderline( (::FontUnderline)rDescr.Underline ); + aFont.SetUnderline( (::FontLineStyle)rDescr.Underline ); aFont.SetStrikeout( (::FontStrikeout)rDescr.Strikeout ); aFont.SetOrientation( (sal_Int16)rDescr.Orientation ); aFont.SetKerning( static_cast<FontKerning>(rDescr.Kerning) ); diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index c3dbf76259c9..ed77e61673eb 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -861,11 +861,11 @@ namespace svx DBG_ASSERT( pTextLine, "FmTextControlShell::ExecuteTextAttribute: ooops - no underline/overline item!" ); if ( pTextLine ) { - FontUnderline eTL = pTextLine->GetLineStyle(); + FontLineStyle eTL = pTextLine->GetLineStyle(); if ( SID_ATTR_CHAR_UNDERLINE == nSlot ) { - aToggled.Put( SvxUnderlineItem( eTL == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) ); + aToggled.Put( SvxUnderlineItem( eTL == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, nWhich ) ); } else { - aToggled.Put( SvxOverlineItem( eTL == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) ); + aToggled.Put( SvxOverlineItem( eTL == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, nWhich ) ); } } } diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 38484e7c3988..110031252405 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -107,7 +107,7 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref //init state mpHeightItem = nullptr; - meUnderline = UNDERLINE_NONE; + meUnderline = LINESTYLE_NONE; meUnderlineColor = COL_AUTO; mbKernAvailable = true; mbKernLBAvailable = true; @@ -272,11 +272,11 @@ void TextPropertyPanel::NotifyItemUpdate ( if( eState >= SfxItemState::DEFAULT && dynamic_cast<const SvxUnderlineItem*>( pState) != nullptr ) { const SvxUnderlineItem* pItem = static_cast<const SvxUnderlineItem*>(pState); - meUnderline = (FontUnderline)pItem->GetValue(); + meUnderline = (FontLineStyle)pItem->GetValue(); meUnderlineColor = pItem->GetColor(); } else - meUnderline = UNDERLINE_NONE; + meUnderline = LINESTYLE_NONE; } break; case SID_ATTR_CHAR_KERNING: diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx index 414b2b52c750..16e62cefaa01 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hxx +++ b/svx/source/sidebar/text/TextPropertyPanel.hxx @@ -94,7 +94,7 @@ private: ::sfx2::sidebar::ControllerItem maUnderlineControl; ::sfx2::sidebar::ControllerItem maSpacingControl; - FontUnderline meUnderline; + FontLineStyle meUnderline; Color meUnderlineColor; bool mbKernAvailable; bool mbKernLBAvailable; diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx index 99bfab2e3342..f9eb44651164 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.cxx +++ b/svx/source/sidebar/text/TextUnderlineControl.cxx @@ -96,34 +96,34 @@ void TextUnderlineControl::initial() maVSUnderline->SetText( SVX_RESSTR(STR_WITHOUT) ); maVSUnderline->InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE)); - maVSUnderline->SetItemData(1, reinterpret_cast<void*>(UNDERLINE_SINGLE)); + maVSUnderline->SetItemData(1, reinterpret_cast<void*>(LINESTYLE_SINGLE)); maVSUnderline->InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE)); - maVSUnderline->SetItemData(2, reinterpret_cast<void*>(UNDERLINE_DOUBLE)); + maVSUnderline->SetItemData(2, reinterpret_cast<void*>(LINESTYLE_DOUBLE)); maVSUnderline->InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD)); - maVSUnderline->SetItemData(3, reinterpret_cast<void*>(UNDERLINE_BOLD)); + maVSUnderline->SetItemData(3, reinterpret_cast<void*>(LINESTYLE_BOLD)); maVSUnderline->InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT)); - maVSUnderline->SetItemData(4, reinterpret_cast<void*>(UNDERLINE_DOTTED)); + maVSUnderline->SetItemData(4, reinterpret_cast<void*>(LINESTYLE_DOTTED)); maVSUnderline->InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD)); - maVSUnderline->SetItemData(5, reinterpret_cast<void*>(UNDERLINE_BOLDDOTTED)); + maVSUnderline->SetItemData(5, reinterpret_cast<void*>(LINESTYLE_BOLDDOTTED)); maVSUnderline->InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH)); - maVSUnderline->SetItemData(6, reinterpret_cast<void*>(UNDERLINE_DASH)); + maVSUnderline->SetItemData(6, reinterpret_cast<void*>(LINESTYLE_DASH)); maVSUnderline->InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG)); - maVSUnderline->SetItemData(7, reinterpret_cast<void*>(UNDERLINE_LONGDASH)); + maVSUnderline->SetItemData(7, reinterpret_cast<void*>(LINESTYLE_LONGDASH)); maVSUnderline->InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT)); - maVSUnderline->SetItemData(8, reinterpret_cast<void*>(UNDERLINE_DASHDOT)); + maVSUnderline->SetItemData(8, reinterpret_cast<void*>(LINESTYLE_DASHDOT)); maVSUnderline->InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT)); - maVSUnderline->SetItemData(9, reinterpret_cast<void*>(UNDERLINE_DASHDOTDOT)); + maVSUnderline->SetItemData(9, reinterpret_cast<void*>(LINESTYLE_DASHDOTDOT)); maVSUnderline->InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE)); - maVSUnderline->SetItemData(10, reinterpret_cast<void*>(UNDERLINE_WAVE)); + maVSUnderline->SetItemData(10, reinterpret_cast<void*>(LINESTYLE_WAVE)); maVSUnderline->SetColCount(); maVSUnderline->SetSelectHdl(LINK( this, TextUnderlineControl, VSSelectHdl )); @@ -132,7 +132,7 @@ void TextUnderlineControl::initial() maVSUnderline->Show(); } -void TextUnderlineControl::Rearrange(FontUnderline eLine) +void TextUnderlineControl::Rearrange(FontLineStyle eLine) { maVSUnderline->SetItemImage(1, maIMGSingle); maVSUnderline->SetItemImage(2, maIMGDouble ); @@ -147,57 +147,57 @@ void TextUnderlineControl::Rearrange(FontUnderline eLine) switch(eLine) { - case UNDERLINE_SINGLE: + case LINESTYLE_SINGLE: maVSUnderline->SetItemImage(1, maIMGSingleSel); maVSUnderline->SelectItem(1); maVSUnderline->GrabFocus(); break; - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: maVSUnderline->SetItemImage(2, maIMGDoubleSel); maVSUnderline->SelectItem(2); maVSUnderline->GrabFocus(); break; - case UNDERLINE_BOLD: + case LINESTYLE_BOLD: maVSUnderline->SetItemImage(3, maIMGBoldSel); maVSUnderline->SelectItem(3); maVSUnderline->GrabFocus(); break; - case UNDERLINE_DOTTED: + case LINESTYLE_DOTTED: maVSUnderline->SetItemImage(4, maIMGDotSel); maVSUnderline->SelectItem(4); maVSUnderline->GrabFocus(); break; - case UNDERLINE_BOLDDOTTED: + case LINESTYLE_BOLDDOTTED: maVSUnderline->SetItemImage(5, maIMGDotBoldSel); maVSUnderline->SelectItem(5); maVSUnderline->GrabFocus(); break; - case UNDERLINE_DASH: + case LINESTYLE_DASH: maVSUnderline->SetItemImage(6, maIMGDashSel); maVSUnderline->SelectItem(6); maVSUnderline->GrabFocus(); break; - case UNDERLINE_LONGDASH: + case LINESTYLE_LONGDASH: maVSUnderline->SetItemImage(7, maIMGDashLongSel); maVSUnderline->SelectItem(7); maVSUnderline->GrabFocus(); break; - case UNDERLINE_DASHDOT: + case LINESTYLE_DASHDOT: maVSUnderline->SetItemImage(8, maIMGDashDotSel); maVSUnderline->SelectItem(8); maVSUnderline->GrabFocus(); break; - case UNDERLINE_DASHDOTDOT: + case LINESTYLE_DASHDOTDOT: maVSUnderline->SetItemImage(9, maIMGDashDotDotSel); maVSUnderline->SelectItem(9); maVSUnderline->GrabFocus(); break; - case UNDERLINE_WAVE: + case LINESTYLE_WAVE: maVSUnderline->SetItemImage(10, maIMGWaveSel); maVSUnderline->SelectItem(10); maVSUnderline->GrabFocus(); break; - case UNDERLINE_NONE: + case LINESTYLE_NONE: maVSUnderline->SelectItem(0); maVSUnderline->GrabFocus(); break; @@ -214,9 +214,9 @@ IMPL_LINK_TYPED(TextUnderlineControl, VSSelectHdl, ValueSet*, pControl, void) if ( pControl == maVSUnderline.get() ) { const sal_uInt16 iPos = maVSUnderline->GetSelectItemId(); - const FontUnderline eUnderline = ( iPos == 0 ) - ? UNDERLINE_NONE - : static_cast<FontUnderline>(reinterpret_cast<sal_uInt64>(maVSUnderline->GetItemData( iPos ))); + const FontLineStyle eUnderline = ( iPos == 0 ) + ? LINESTYLE_NONE + : static_cast<FontLineStyle>(reinterpret_cast<sal_uInt64>(maVSUnderline->GetItemData( iPos ))); SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE); diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx index 8acd252358b6..2e8b85e4463c 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.hxx +++ b/svx/source/sidebar/text/TextUnderlineControl.hxx @@ -38,7 +38,7 @@ public: SfxBindings* pBindings); virtual ~TextUnderlineControl(); virtual void dispose() override; - void Rearrange(FontUnderline eLine); + void Rearrange(FontLineStyle eLine); private: svx::sidebar::TextPropertyPanel& mrTextPropertyPanel; diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx index f4c342ee9cd9..b776346f47b4 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.cxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx @@ -35,7 +35,7 @@ TextUnderlinePopup::~TextUnderlinePopup() { } -void TextUnderlinePopup::Rearrange (FontUnderline eLine) +void TextUnderlinePopup::Rearrange (FontLineStyle eLine) { ProvideContainerAndControl(); diff --git a/svx/source/sidebar/text/TextUnderlinePopup.hxx b/svx/source/sidebar/text/TextUnderlinePopup.hxx index b9da6418693d..10fdc5fedbd8 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.hxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.hxx @@ -36,7 +36,7 @@ public: const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator); virtual ~TextUnderlinePopup(); - void Rearrange (FontUnderline eLine); + void Rearrange (FontLineStyle eLine); }; } } // end of namespace svx::sidebar diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index a3b6c015e72d..b67864354468 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -96,7 +96,7 @@ bool CommonStylePreviewRenderer::recalculate() } if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_OVERLINE)) != nullptr) { - pFont->SetOverline(static_cast<FontUnderline>(static_cast<const SvxOverlineItem*>(pItem)->GetValue())); + pFont->SetOverline(static_cast<FontLineStyle>(static_cast<const SvxOverlineItem*>(pItem)->GetValue())); } if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_STRIKEOUT)) != nullptr) { diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 0218d04cec2a..e1ecafd576a6 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -275,8 +275,8 @@ namespace // prepare new primitive drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = nullptr; const bool bDecoratedIsNeeded( - UNDERLINE_NONE != rInfo.mrFont.GetOverline() - || UNDERLINE_NONE != rInfo.mrFont.GetUnderline() + LINESTYLE_NONE != rInfo.mrFont.GetOverline() + || LINESTYLE_NONE != rInfo.mrFont.GetUnderline() || STRIKEOUT_NONE != rInfo.mrFont.GetStrikeout() || EMPHASISMARK_NONE != (rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE) || RELIEF_NONE != rInfo.mrFont.GetRelief() @@ -294,13 +294,13 @@ namespace // prepare overline and underline data const drawinglayer::primitive2d::TextLine eFontOverline( - drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetOverline())); - const drawinglayer::primitive2d::TextLine eFontUnderline( - drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetUnderline())); + drawinglayer::primitive2d::mapFontLineStyleToTextLine(rInfo.mrFont.GetOverline())); + const drawinglayer::primitive2d::TextLine eFontLineStyle( + drawinglayer::primitive2d::mapFontLineStyleToTextLine(rInfo.mrFont.GetUnderline())); // check UnderlineAbove const bool bUnderlineAbove( - drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); + drawinglayer::primitive2d::TEXT_LINE_NONE != eFontLineStyle && impIsUnderlineAbove(rInfo.mrFont)); // prepare strikeout data const drawinglayer::primitive2d::TextStrikeout eTextStrikeout( @@ -351,7 +351,7 @@ namespace aBOverlineColor, aBUnderlineColor, eFontOverline, - eFontUnderline, + eFontLineStyle, bUnderlineAbove, eTextStrikeout, bWordLineMode, diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx index 854d0bf630ed..fdbc15e5043b 100644 --- a/svx/source/table/tablertfexporter.cxx +++ b/svx/source/table/tablertfexporter.cxx @@ -228,7 +228,7 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow ) bResetAttr = true; mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_I ); } - if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE ) + if ( rUnderlineItem.GetLineStyle() != LINESTYLE_NONE ) { // underline bResetAttr = true; mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b5e84b939114..591a811af21f 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -687,7 +687,7 @@ void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Windo pItem = pItemSet->GetItem( SID_ATTR_CHAR_OVERLINE ); if ( pItem ) - aFont.SetOverline( static_cast< FontUnderline >( static_cast< const SvxOverlineItem* >( pItem )->GetValue() ) ); + aFont.SetOverline( static_cast< FontLineStyle >( static_cast< const SvxOverlineItem* >( pItem )->GetValue() ) ); pItem = pItemSet->GetItem( SID_ATTR_CHAR_STRIKEOUT ); if ( pItem ) diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 7fdd058a9d63..0f71a4f861a1 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2279,7 +2279,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, sal_Int32 nLen = 1; if( pWrongList->InWrongWord(nBegin,nLen) && !pTextNode->IsSymbol(nBegin) ) { - rValue.Value <<= (sal_uInt16)UNDERLINE_WAVE; + rValue.Value <<= (sal_uInt16)LINESTYLE_WAVE; } } } diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 274fd3a9d9a2..20c4f3bc81d3 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -479,7 +479,7 @@ void _InitCore() aAttrTab[ RES_CHRATR_POSTURE- POOLATTR_BEGIN ] = new SvxPostureItem( ITALIC_NONE, RES_CHRATR_POSTURE ); aAttrTab[ RES_CHRATR_PROPORTIONALFONTSIZE- POOLATTR_BEGIN ] = new SvxPropSizeItem( 100, RES_CHRATR_PROPORTIONALFONTSIZE ); aAttrTab[ RES_CHRATR_SHADOWED- POOLATTR_BEGIN ] = new SvxShadowedItem( false, RES_CHRATR_SHADOWED ); - aAttrTab[ RES_CHRATR_UNDERLINE- POOLATTR_BEGIN ] = new SvxUnderlineItem( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ); + aAttrTab[ RES_CHRATR_UNDERLINE- POOLATTR_BEGIN ] = new SvxUnderlineItem( LINESTYLE_NONE, RES_CHRATR_UNDERLINE ); aAttrTab[ RES_CHRATR_WEIGHT- POOLATTR_BEGIN ] = new SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT ); aAttrTab[ RES_CHRATR_RSID - POOLATTR_BEGIN ] = new SvxRsidItem( 0, RES_CHRATR_RSID ); aAttrTab[ RES_CHRATR_WORDLINEMODE- POOLATTR_BEGIN ] = new SvxWordLineModeItem( false, RES_CHRATR_WORDLINEMODE ); @@ -509,7 +509,7 @@ void _InitCore() aAttrTab[ RES_CHRATR_SCALEW - POOLATTR_BEGIN ] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW ); aAttrTab[ RES_CHRATR_RELIEF - POOLATTR_BEGIN ] = new SvxCharReliefItem( RELIEF_NONE, RES_CHRATR_RELIEF ); aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( false, RES_CHRATR_HIDDEN ); - aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE ); + aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( LINESTYLE_NONE, RES_CHRATR_OVERLINE ); aAttrTab[ RES_CHRATR_BOX - POOLATTR_BEGIN ] = new SvxBoxItem( RES_CHRATR_BOX ); aAttrTab[ RES_CHRATR_SHADOW - POOLATTR_BEGIN ] = new SvxShadowItem( RES_CHRATR_SHADOW ); aAttrTab[ RES_CHRATR_HIGHLIGHT - POOLATTR_BEGIN ] = new SvxBrushItem( RES_CHRATR_HIGHLIGHT ); diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 86a4cef87cc1..d52f9a680e33 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -1211,7 +1211,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) { Color aCol( COL_BLUE ); aSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) ); - aSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE ) ); + aSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, RES_CHRATR_UNDERLINE ) ); // i40133: patch submitted by rail: set language to 'none' to prevent spell checking: aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_LANGUAGE ) ); aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_CJK_LANGUAGE ) ); @@ -1222,7 +1222,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) { Color aCol( COL_RED ); aSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) ); - aSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE ) ); + aSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, RES_CHRATR_UNDERLINE ) ); aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_LANGUAGE ) ); aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_CJK_LANGUAGE ) ); aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_CTL_LANGUAGE ) ); @@ -1232,7 +1232,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) { Color aCol( COL_CYAN ); aSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) ); - aSet.Put( SvxUnderlineItem( UNDERLINE_DOTTED, RES_CHRATR_UNDERLINE ) ); + aSet.Put( SvxUnderlineItem( LINESTYLE_DOTTED, RES_CHRATR_UNDERLINE ) ); aSet.Put( SvxCaseMapItem( SVX_CASEMAP_KAPITAELCHEN, RES_CHRATR_CASEMAP ) ); } break; @@ -1242,7 +1242,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) long nH = static_cast<const SvxFontHeightItem*>(GetDfltAttr( RES_CHRATR_CJK_FONTSIZE ))->GetHeight() / 2; SetAllScriptItem( aSet, SvxFontHeightItem( nH, 100, RES_CHRATR_FONTSIZE)); - aSet.Put(SvxUnderlineItem( UNDERLINE_NONE, RES_CHRATR_UNDERLINE )); + aSet.Put(SvxUnderlineItem( LINESTYLE_NONE, RES_CHRATR_UNDERLINE )); aSet.Put(SvxEmphasisMarkItem( EMPHASISMARK_NONE, RES_CHRATR_EMPHASIS_MARK) ); } break; diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index e1e86963fd02..f5135921031d 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -109,7 +109,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, } Color aCol( COL_RED ); - FontUnderline eUnderline = UNDERLINE_NONE; + FontLineStyle eUnderline = LINESTYLE_NONE; const SwFormatURL &rURL = pFrame->FindFlyFrame()->GetFormat()->GetURL(); if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 59ee44244fc1..9edc798f7301 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -277,8 +277,8 @@ SwBoxAutoFormat::SwBoxAutoFormat() m_aCTLWeight( WEIGHT_NORMAL, RES_CHRATR_CTL_WEIGHT ), m_aCTLPosture( ITALIC_NONE, RES_CHRATR_CTL_POSTURE ), - m_aUnderline( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ), - m_aOverline( UNDERLINE_NONE, RES_CHRATR_OVERLINE ), + m_aUnderline( LINESTYLE_NONE, RES_CHRATR_UNDERLINE ), + m_aOverline( LINESTYLE_NONE, RES_CHRATR_OVERLINE ), m_aCrossedOut( STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT ), m_aContour( false, RES_CHRATR_CONTOUR ), m_aShadowed( false, RES_CHRATR_SHADOWED ), diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 06f90312ee24..5df3acf3b48f 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -87,8 +87,8 @@ class SwSubFont : public SvxFont inline void SetCharSet( const rtl_TextEncoding eCharSet ); inline void SetPitch( const FontPitch ePitch ); inline void SetAlign( const FontAlign eAlign ); - inline void SetUnderline( const FontUnderline eUnderline ); - inline void SetOverline( const FontUnderline eOverline ); + inline void SetUnderline( const FontLineStyle eUnderline ); + inline void SetOverline( const FontLineStyle eOverline ); inline void SetStrikeout( const FontStrikeout eStrikeout ); inline void SetItalic( const FontItalic eItalic ); inline void SetOutline( const bool bOutline ); @@ -209,9 +209,9 @@ public: inline void SetColor( const Color& rColor ); inline void SetFillColor( const Color& rColor ); inline void SetAlign( const FontAlign eAlign ); - inline void SetUnderline( const FontUnderline eUnderline ); + inline void SetUnderline( const FontLineStyle eUnderline ); inline void SetUnderColor( const Color &rColor ) { m_aUnderColor = rColor; } - inline void SetOverline( const FontUnderline eOverline ); + inline void SetOverline( const FontLineStyle eOverline ); inline void SetOverColor( const Color &rColor ) { m_aOverColor = rColor; } inline void SetStrikeout( const FontStrikeout eStrikeout ); inline void SetOutline( const bool bOutline ); @@ -268,9 +268,9 @@ public: bool IsSymbol( SwViewShell *pSh ) { return m_aSub[m_nActual].IsSymbol( pSh ); } - FontUnderline GetUnderline() const { return m_aSub[m_nActual].GetUnderline(); } + FontLineStyle GetUnderline() const { return m_aSub[m_nActual].GetUnderline(); } const Color& GetUnderColor() const { return m_aUnderColor; } - FontUnderline GetOverline() const { return m_aSub[m_nActual].GetOverline(); } + FontLineStyle GetOverline() const { return m_aSub[m_nActual].GetOverline(); } const Color& GetOverColor() const { return m_aOverColor; } FontStrikeout GetStrikeout() const { return m_aSub[m_nActual].GetStrikeout(); } const Color& GetColor() const { return m_aSub[m_nActual].GetColor(); } @@ -527,13 +527,13 @@ inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich } // encapsulated SV-Font-method -inline void SwSubFont::SetUnderline( const FontUnderline eUnderline ) +inline void SwSubFont::SetUnderline( const FontLineStyle eUnderline ) { m_pMagic = nullptr; Font::SetUnderline( eUnderline ); } -inline void SwFont::SetUnderline( const FontUnderline eUnderline ) +inline void SwFont::SetUnderline( const FontLineStyle eUnderline ) { m_bFontChg = true; m_aSub[0].SetUnderline( eUnderline ); @@ -542,13 +542,13 @@ inline void SwFont::SetUnderline( const FontUnderline eUnderline ) } // encapsulated SV-Font-method -inline void SwSubFont::SetOverline( const FontUnderline eOverline ) +inline void SwSubFont::SetOverline( const FontLineStyle eOverline ) { m_pMagic = nullptr; Font::SetOverline( eOverline ); } -inline void SwFont::SetOverline( const FontUnderline eOverline ) +inline void SwFont::SetOverline( const FontLineStyle eOverline ) { m_bFontChg = true; m_aSub[0].SetOverline( eOverline ); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 5ae9240532ad..e6fc6c466f05 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -785,9 +785,9 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) if ( bTextDecorationType ) { - if ( UNDERLINE_NONE != rInf.GetFont()->GetUnderline() ) + if ( LINESTYLE_NONE != rInf.GetFont()->GetUnderline() ) mpPDFExtOutDevData->SetStructureAttribute( vcl::PDFWriter::TextDecorationType, vcl::PDFWriter::Underline ); - if ( UNDERLINE_NONE != rInf.GetFont()->GetOverline() ) + if ( LINESTYLE_NONE != rInf.GetFont()->GetOverline() ) mpPDFExtOutDevData->SetStructureAttribute( vcl::PDFWriter::TextDecorationType, vcl::PDFWriter::Overline ); if ( STRIKEOUT_NONE != rInf.GetFont()->GetStrikeout() ) mpPDFExtOutDevData->SetStructureAttribute( vcl::PDFWriter::TextDecorationType, vcl::PDFWriter::LineThrough ); @@ -1378,8 +1378,8 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() const sal_uInt8 nFont = rInf.GetFont()->GetActual(); const LanguageType nDefaultLang = SwEnhancedPDFExportHelper::GetDefaultLanguage(); - if ( UNDERLINE_NONE != rInf.GetFont()->GetUnderline() || - UNDERLINE_NONE != rInf.GetFont()->GetOverline() || + if ( LINESTYLE_NONE != rInf.GetFont()->GetUnderline() || + LINESTYLE_NONE != rInf.GetFont()->GetOverline() || STRIKEOUT_NONE != rInf.GetFont()->GetStrikeout() || EMPHASISMARK_NONE != rInf.GetFont()->GetEmphasisMark() || 0 != rInf.GetFont()->GetEscapement() || diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index c4933f0dd58a..103f32d6be62 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -795,7 +795,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush ) if( mpShell && mpShell->GetWin()) { if ( static_cast<const SvxCharHiddenItem&>(rItem).GetValue() ) - rFnt.SetUnderline( UNDERLINE_DOTTED ); + rFnt.SetUnderline( LINESTYLE_DOTTED ); else ActivateTop( rFnt, RES_CHRATR_UNDERLINE ); } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 9e6df3550d4d..2b1abbc13989 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -538,7 +538,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) // if we are underlined, we store the beginning of this underlined // segment for repaint optimization - if ( UNDERLINE_NONE != pFnt->GetUnderline() && ! nUnderLineStart ) + if ( LINESTYLE_NONE != pFnt->GetUnderline() && ! nUnderLineStart ) nUnderLineStart = GetLeftMargin() + rInf.X(); if ( pPor->IsFlyPortion() ) @@ -557,12 +557,12 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) // reformat is at end of an underlined portion and next portion // is not underlined ( ( rInf.GetReformatStart() == rInf.GetIdx() && - UNDERLINE_NONE == pFnt->GetUnderline() + LINESTYLE_NONE == pFnt->GetUnderline() ) || // reformat is inside portion and portion is underlined ( rInf.GetReformatStart() >= rInf.GetIdx() && rInf.GetReformatStart() <= rInf.GetIdx() + pPor->GetLen() && - UNDERLINE_NONE != pFnt->GetUnderline() ) ) ) + LINESTYLE_NONE != pFnt->GetUnderline() ) ) ) rInf.SetPaintOfst( nUnderLineStart ); else if ( ! rInf.GetPaintOfst() && // 2. Right Tab diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index c5eba017cb04..91f9eea1b77f 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -61,7 +61,7 @@ // in SwTextPainter::CheckSpecialUnderline bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt ) { - return UNDERLINE_NONE == rFnt.GetUnderline() || + return LINESTYLE_NONE == rFnt.GetUnderline() || rPor.IsFlyPortion() || rPor.IsFlyCntPortion() || rPor.IsBreakPortion() || rPor.IsMarginPortion() || rPor.IsHolePortion() || @@ -502,7 +502,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor, return; //Bug 120769(End) - OSL_ENSURE( GetFnt() && UNDERLINE_NONE != GetFnt()->GetUnderline(), + OSL_ENSURE( GetFnt() && LINESTYLE_NONE != GetFnt()->GetUnderline(), "CheckSpecialUnderline without underlined font" ); MultiSelection aUnderMulti( Range( 0, GetInfo().GetText().getLength() ) ); const SwFont* pParaFnt = GetAttrHandler().GetFont(); @@ -652,7 +652,7 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor, pUnderlineFnt->SetProportion( 100 ); pUnderlineFnt->SetEscapement( 0 ); pUnderlineFnt->SetStrikeout( STRIKEOUT_NONE ); - pUnderlineFnt->SetOverline( UNDERLINE_NONE ); + pUnderlineFnt->SetOverline( LINESTYLE_NONE ); const Color aFillColor( COL_TRANSPARENT ); pUnderlineFnt->SetFillColor( aFillColor ); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index f72820b50544..792638dac411 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -665,13 +665,13 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const if( !aExpand.isEmpty() ) { const SwFont *pTmpFnt = rInf.GetFont(); - bool bPaintSpace = ( UNDERLINE_NONE != pTmpFnt->GetUnderline() || - UNDERLINE_NONE != pTmpFnt->GetOverline() || + bool bPaintSpace = ( LINESTYLE_NONE != pTmpFnt->GetUnderline() || + LINESTYLE_NONE != pTmpFnt->GetOverline() || STRIKEOUT_NONE != pTmpFnt->GetStrikeout() ) && !pTmpFnt->IsWordLineMode(); if( bPaintSpace && pFnt ) - bPaintSpace = ( UNDERLINE_NONE != pFnt->GetUnderline() || - UNDERLINE_NONE != pFnt->GetOverline() || + bPaintSpace = ( LINESTYLE_NONE != pFnt->GetUnderline() || + LINESTYLE_NONE != pFnt->GetOverline() || STRIKEOUT_NONE != pFnt->GetStrikeout() ) && !pFnt->IsWordLineMode(); diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 5057cc88b609..bd6ee06067f1 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -745,13 +745,13 @@ void SwHolePortion::Paint( const SwTextPaintInfo &rInf ) const const SwFont* pOrigFont = rInf.GetFont(); SwFont* pHoleFont = nullptr; SwFontSave* pFontSave = nullptr; - if( pOrigFont->GetUnderline() != UNDERLINE_NONE - || pOrigFont->GetOverline() != UNDERLINE_NONE + if( pOrigFont->GetUnderline() != LINESTYLE_NONE + || pOrigFont->GetOverline() != LINESTYLE_NONE || pOrigFont->GetStrikeout() != STRIKEOUT_NONE ) { pHoleFont = new SwFont( *pOrigFont ); - pHoleFont->SetUnderline( UNDERLINE_NONE ); - pHoleFont->SetOverline( UNDERLINE_NONE ); + pHoleFont->SetUnderline( LINESTYLE_NONE ); + pHoleFont->SetOverline( LINESTYLE_NONE ); pHoleFont->SetStrikeout( STRIKEOUT_NONE ); pFontSave = new SwFontSave( rInf, pHoleFont ); } diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index bc174dad6420..cc46a3e49851 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -405,13 +405,13 @@ bool SwRedlineItr::CheckLine( sal_Int32 nChkStart, sal_Int32 nChkEnd ) void SwExtend::ActualizeFont( SwFont &rFnt, sal_uInt16 nAttr ) { if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE ) - rFnt.SetUnderline( UNDERLINE_SINGLE ); + rFnt.SetUnderline( LINESTYLE_SINGLE ); else if ( nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE ) - rFnt.SetUnderline( UNDERLINE_BOLD ); + rFnt.SetUnderline( LINESTYLE_BOLD ); else if ( nAttr & EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ) - rFnt.SetUnderline( UNDERLINE_DOTTED ); + rFnt.SetUnderline( LINESTYLE_DOTTED ); else if ( nAttr & EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ) - rFnt.SetUnderline( UNDERLINE_DOTTED ); + rFnt.SetUnderline( LINESTYLE_DOTTED ); if ( nAttr & EXTTEXTINPUT_ATTR_REDTEXT ) rFnt.SetColor( Color( COL_RED ) ); diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index ac97a06aed51..fdf673523538 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -516,8 +516,8 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con // Overline style of paragraph font should not be considered // Weight style of paragraph font should not be considered // Posture style of paragraph font should not be considered - pNumFnt->SetUnderline( UNDERLINE_NONE ); - pNumFnt->SetOverline( UNDERLINE_NONE ); + pNumFnt->SetUnderline( LINESTYLE_NONE ); + pNumFnt->SetOverline( LINESTYLE_NONE ); pNumFnt->SetItalic( ITALIC_NONE, SW_LATIN ); pNumFnt->SetItalic( ITALIC_NONE, SW_CJK ); pNumFnt->SetItalic( ITALIC_NONE, SW_CTL ); @@ -577,9 +577,9 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con { // i18463: // Underline style of paragraph font should not be considered - pNumFnt->SetUnderline( UNDERLINE_NONE ); + pNumFnt->SetUnderline( LINESTYLE_NONE ); // Overline style of paragraph font should not be considered - pNumFnt->SetOverline( UNDERLINE_NONE ); + pNumFnt->SetOverline( LINESTYLE_NONE ); } // Apply the explicit attributes from the character style diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 8082dd29e45e..3ef8db04ef78 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -960,8 +960,8 @@ SwNumberPortion *SwTextFormatter::NewFootnoteNumPortion( SwTextFormatInfo &rInf // Weight style of paragraph font should not be considered // Posture style of paragraph font should not be considered // See also #i18463# and SwTextFormatter::NewNumberPortion() - pNumFnt->SetUnderline( UNDERLINE_NONE ); - pNumFnt->SetOverline( UNDERLINE_NONE ); + pNumFnt->SetUnderline( LINESTYLE_NONE ); + pNumFnt->SetOverline( LINESTYLE_NONE ); pNumFnt->SetItalic( ITALIC_NONE, SW_LATIN ); pNumFnt->SetItalic( ITALIC_NONE, SW_CJK ); pNumFnt->SetItalic( ITALIC_NONE, SW_CTL ); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 3f54a1735fe7..e0910e20be20 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -120,8 +120,8 @@ SwFntObj::SwFntObj(const SwSubFont &rFont, const void *pOwn, SwViewShell const * { nZoom = pSh ? pSh->GetViewOptions()->GetZoom() : USHRT_MAX; bSymbol = RTL_TEXTENCODING_SYMBOL == aFont.GetCharSet(); - bPaintBlank = ( UNDERLINE_NONE != aFont.GetUnderline() - || UNDERLINE_NONE != aFont.GetOverline() + bPaintBlank = ( LINESTYLE_NONE != aFont.GetUnderline() + || LINESTYLE_NONE != aFont.GetOverline() || STRIKEOUT_NONE != aFont.GetStrikeout() ) && !aFont.IsWordLineMode(); aFont.SetLanguage(rFont.GetLanguage()); @@ -869,7 +869,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) if ( ! pTmpFont ) pTmpFont = pPrtFont; - // HACK: UNDERLINE_WAVE must not be abused any more, hence the grey wave + // HACK: LINESTYLE_WAVE must not be abused any more, hence the grey wave // line of the ExtendedAttributeSets will appear in the font color first const bool bSwitchH2V = rInf.GetFrame() && rInf.GetFrame()->IsVertical(); @@ -1772,13 +1772,13 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) rInf.GetOut().Push(); Color aPreviousColor = pTmpFont->GetColor(); - FontUnderline aPreviousUnderline = pTmpFont->GetUnderline(); - FontUnderline aPreviousOverline = pTmpFont->GetOverline(); + FontLineStyle aPreviousUnderline = pTmpFont->GetUnderline(); + FontLineStyle aPreviousOverline = pTmpFont->GetOverline(); FontStrikeout aPreviousStrikeout = pTmpFont->GetStrikeout(); pTmpFont->SetColor( Color(NON_PRINTING_CHARACTER_COLOR) ); - pTmpFont->SetUnderline(UNDERLINE_NONE); - pTmpFont->SetOverline(UNDERLINE_NONE); + pTmpFont->SetUnderline(LINESTYLE_NONE); + pTmpFont->SetOverline(LINESTYLE_NONE); pTmpFont->SetStrikeout(STRIKEOUT_NONE); rInf.GetOut().SetFont( *pTmpFont ); long nShift = rInf.GetOut( ).GetFontMetric( ).GetBulletOffset( ); diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index 55853b6bf5f3..ccd6936749b3 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -305,8 +305,8 @@ void SwSubFont::DrawCapital( SwDrawTextInfo &rInf ) { // Es wird vorausgesetzt, dass rPos bereits kalkuliert ist! // hochgezogen in SwFont: const Point aPos( CalcPos(rPos) ); - rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE || - GetOverline() != UNDERLINE_NONE || + rInf.SetDrawSpace( GetUnderline() != LINESTYLE_NONE || + GetOverline() != LINESTYLE_NONE || GetStrikeout() != STRIKEOUT_NONE ); SwDoDrawCapital aDo( rInf ); DoOnCapitals( aDo ); @@ -457,8 +457,8 @@ void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf ) const sal_uInt16 nCapWidth = (sal_uInt16)( GetCapitalSize( rInf ).Width() ); rInf.SetPos(aOldPos); - rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE || - GetOverline() != UNDERLINE_NONE || + rInf.SetDrawSpace( GetUnderline() != LINESTYLE_NONE || + GetOverline() != LINESTYLE_NONE || GetStrikeout() != STRIKEOUT_NONE ); SwDoDrawStretchCapital aDo( rInf, nCapWidth ); DoOnCapitals( aDo ); @@ -499,8 +499,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) SwSubFont aFont( *this ); Point aStartPos( rDo.GetInf().GetPos() ); - const bool bTextLines = aFont.GetUnderline() != UNDERLINE_NONE - || aFont.GetOverline() != UNDERLINE_NONE + const bool bTextLines = aFont.GetUnderline() != LINESTYLE_NONE + || aFont.GetOverline() != LINESTYLE_NONE || aFont.GetStrikeout() != STRIKEOUT_NONE; const bool bWordWise = bTextLines && aFont.IsWordLineMode() && rDo.GetInf().GetDrawSpace(); @@ -519,8 +519,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) pSpaceFont = pLastFont; // Wir basteln uns einen Font fuer die Grossbuchstaben: - aFont.SetUnderline( UNDERLINE_NONE ); - aFont.SetOverline( UNDERLINE_NONE ); + aFont.SetUnderline( LINESTYLE_NONE ); + aFont.SetOverline( LINESTYLE_NONE ); aFont.SetStrikeout( STRIKEOUT_NONE ); pMagic2 = nullptr; nIndex2 = 0; diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 5d47d9bc8064..012e913f1975 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -807,7 +807,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, m_aSub[SW_CTL].SetLanguage( pAttrSet->GetCTLLanguage().GetLanguage() ); } if ( pAttrSet->GetCharHidden().GetValue() ) - SetUnderline( UNDERLINE_DOTTED ); + SetUnderline( LINESTYLE_DOTTED ); else SetUnderline( pAttrSet->GetUnderline().GetLineStyle() ); SetUnderColor( pAttrSet->GetUnderline().GetColor() ); @@ -982,8 +982,8 @@ bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut ) pLastFont->SetDevFont( pSh, rOut ); pLastFont->Lock(); - return UNDERLINE_NONE != GetUnderline() || - UNDERLINE_NONE != GetOverline() || + return LINESTYLE_NONE != GetUnderline() || + LINESTYLE_NONE != GetOverline() || STRIKEOUT_NONE != GetStrikeout(); } @@ -1169,13 +1169,13 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey ) if( COMPLETE_STRING == rInf.GetLen() ) rInf.SetLen( nLn ); - FontUnderline nOldUnder = UNDERLINE_NONE; + FontLineStyle nOldUnder = LINESTYLE_NONE; SwUnderlineFont* pUnderFnt = nullptr; if( rInf.GetUnderFnt() ) { nOldUnder = GetUnderline(); - SetUnderline( UNDERLINE_NONE ); + SetUnderline( LINESTYLE_NONE ); pUnderFnt = rInf.GetUnderFnt(); } @@ -1235,7 +1235,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey ) } } - if( pUnderFnt && nOldUnder != UNDERLINE_NONE ) + if( pUnderFnt && nOldUnder != LINESTYLE_NONE ) { Size aFontSize = _GetTextSize( rInf ); const OUString oldStr = rInf.GetText(); @@ -1296,13 +1296,13 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf ) if( !rInf.GetLen() || !rInf.GetText().getLength() ) return; - FontUnderline nOldUnder = UNDERLINE_NONE; + FontLineStyle nOldUnder = LINESTYLE_NONE; SwUnderlineFont* pUnderFnt = nullptr; if( rInf.GetUnderFnt() ) { nOldUnder = GetUnderline(); - SetUnderline( UNDERLINE_NONE ); + SetUnderline( LINESTYLE_NONE ); pUnderFnt = rInf.GetUnderFnt(); } @@ -1347,7 +1347,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf ) rInf.GetText() ), rInf.GetIdx(), rInf.GetLen() ); } - if( pUnderFnt && nOldUnder != UNDERLINE_NONE ) + if( pUnderFnt && nOldUnder != LINESTYLE_NONE ) { const OUString oldStr = rInf.GetText(); OUString aStr(" "); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index e37125aa0ad3..518d2a9bc9e1 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2324,10 +2324,10 @@ static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt, { switch( pUItem->GetLineStyle() ) { - case UNDERLINE_NONE: + case LINESTYLE_NONE: bNone = true; break; - case UNDERLINE_DONTKNOW: + case LINESTYLE_DONTKNOW: break; default: if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ) @@ -2347,10 +2347,10 @@ static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt, { switch( pOItem->GetLineStyle() ) { - case UNDERLINE_NONE: + case LINESTYLE_NONE: bNone = true; break; - case UNDERLINE_DONTKNOW: + case LINESTYLE_DONTKNOW: break; default: if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ) diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 476ce691058d..3e70ba9506d2 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1271,10 +1271,10 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) case RES_CHRATR_UNDERLINE: switch( static_cast<const SvxUnderlineItem&>(rItem).GetLineStyle() ) { - case UNDERLINE_SINGLE: + case LINESTYLE_SINGLE: eState = HTML_ON_VALUE; break; - case UNDERLINE_NONE: + case LINESTYLE_NONE: eState = HTML_OFF_VALUE; break; default: @@ -2878,8 +2878,8 @@ static Writer& OutHTML_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.m_bOutOpts ) return rWrt; - const FontUnderline eUnder = static_cast<const SvxUnderlineItem&>(rHt).GetLineStyle(); - if( UNDERLINE_NONE != eUnder ) + const FontLineStyle eUnder = static_cast<const SvxUnderlineItem&>(rHt).GetLineStyle(); + if( LINESTYLE_NONE != eUnder ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_underline, rHTMLWrt.m_bTagOn ); } diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 7b61ea1fd094..591a0cebecfc 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1113,15 +1113,15 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, aItemSet.Put( SvxPostureItem( eItalic, RES_CHRATR_POSTURE ) ); } } - if( xPropSetInfo->hasPropertyByName( "FontUnderline" ) ) + if( xPropSetInfo->hasPropertyByName( "FontLineStyle" ) ) { - aTmp = xPropSet->getPropertyValue( "FontUnderline" ); + aTmp = xPropSet->getPropertyValue( "FontLineStyle" ); if( aTmp.getValueType() == ::cppu::UnoType<sal_Int16>::get() ) { - FontUnderline eUnderline = - (FontUnderline)*static_cast<sal_Int16 const *>(aTmp.getValue()); - if( eUnderline != UNDERLINE_DONTKNOW && - eUnderline != UNDERLINE_NONE ) + FontLineStyle eUnderline = + (FontLineStyle)*static_cast<sal_Int16 const *>(aTmp.getValue()); + if( eUnderline != LINESTYLE_DONTKNOW && + eUnderline != LINESTYLE_NONE ) aItemSet.Put( SvxUnderlineItem( eUnderline, RES_CHRATR_UNDERLINE ) ); } } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 641d75aa7cca..b8abbc05873c 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1840,8 +1840,8 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, bool bCrossedOut = false; bool bBlink = false; bool bBlinkOn = false; - FontUnderline eUnderline = UNDERLINE_NONE; - FontUnderline eOverline = UNDERLINE_NONE; + FontLineStyle eUnderline = LINESTYLE_NONE; + FontLineStyle eOverline = LINESTYLE_NONE; FontStrikeout eCrossedOut = STRIKEOUT_NONE; // der Wert kann zwei Werte enthalten! Und MS-IE auch Strings @@ -1857,10 +1857,10 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, if( aValue == "none" ) { bUnderline = true; - eUnderline = UNDERLINE_NONE; + eUnderline = LINESTYLE_NONE; bOverline = true; - eOverline = UNDERLINE_NONE; + eOverline = LINESTYLE_NONE; bCrossedOut = true; eCrossedOut = STRIKEOUT_NONE; @@ -1876,7 +1876,7 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, if( aValue == "underline" ) { bUnderline = true; - eUnderline = UNDERLINE_SINGLE; + eUnderline = LINESTYLE_SINGLE; bKnown = true; } @@ -1886,7 +1886,7 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, if( aValue == "overline" ) { bOverline = true; - eOverline = UNDERLINE_SINGLE; + eOverline = LINESTYLE_SINGLE; bKnown = true; } @@ -1916,7 +1916,7 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, if( !bKnown ) { bUnderline = true; - eUnderline = UNDERLINE_SINGLE; + eUnderline = LINESTYLE_SINGLE; } pExpr = pExpr->GetNext(); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index e208f06daf6c..036992f41714 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1771,7 +1771,7 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_UNDERLINE_ON: { NewStdAttr( HTML_UNDERLINE_ON, &m_aAttrTab.pUnderline, - SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE) ); + SvxUnderlineItem(LINESTYLE_SINGLE, RES_CHRATR_UNDERLINE) ); } break; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 1586054805f3..011e67952f3b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3926,7 +3926,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt) bMustWrite = static_cast< const SvxShadowedItem& >(rHt).GetValue(); break; case RES_CHRATR_UNDERLINE: - bMustWrite = static_cast< const SvxUnderlineItem& >(rHt).GetLineStyle() != UNDERLINE_NONE; + bMustWrite = static_cast< const SvxUnderlineItem& >(rHt).GetLineStyle() != LINESTYLE_NONE; break; case RES_CHRATR_WEIGHT: bMustWrite = static_cast< const SvxWeightItem& >(rHt).GetWeight() != WEIGHT_NORMAL; @@ -6335,23 +6335,23 @@ void DocxAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline ) switch ( rUnderline.GetLineStyle() ) { - case UNDERLINE_SINGLE: pUnderlineValue = "single"; break; - case UNDERLINE_BOLD: pUnderlineValue = "thick"; break; - case UNDERLINE_DOUBLE: pUnderlineValue = "double"; break; - case UNDERLINE_DOTTED: pUnderlineValue = "dotted"; break; - case UNDERLINE_DASH: pUnderlineValue = "dash"; break; - case UNDERLINE_DASHDOT: pUnderlineValue = "dotDash"; break; - case UNDERLINE_DASHDOTDOT: pUnderlineValue = "dotDotDash"; break; - case UNDERLINE_WAVE: pUnderlineValue = "wave"; break; - case UNDERLINE_BOLDDOTTED: pUnderlineValue = "dottedHeavy"; break; - case UNDERLINE_BOLDDASH: pUnderlineValue = "dashedHeavy"; break; - case UNDERLINE_LONGDASH: pUnderlineValue = "dashLongHeavy"; break; - case UNDERLINE_BOLDLONGDASH: pUnderlineValue = "dashLongHeavy"; break; - case UNDERLINE_BOLDDASHDOT: pUnderlineValue = "dashDotHeavy"; break; - case UNDERLINE_BOLDDASHDOTDOT: pUnderlineValue = "dashDotDotHeavy"; break; - case UNDERLINE_BOLDWAVE: pUnderlineValue = "wavyHeavy"; break; - case UNDERLINE_DOUBLEWAVE: pUnderlineValue = "wavyDouble"; break; - case UNDERLINE_NONE: // fall through + case LINESTYLE_SINGLE: pUnderlineValue = "single"; break; + case LINESTYLE_BOLD: pUnderlineValue = "thick"; break; + case LINESTYLE_DOUBLE: pUnderlineValue = "double"; break; + case LINESTYLE_DOTTED: pUnderlineValue = "dotted"; break; + case LINESTYLE_DASH: pUnderlineValue = "dash"; break; + case LINESTYLE_DASHDOT: pUnderlineValue = "dotDash"; break; + case LINESTYLE_DASHDOTDOT: pUnderlineValue = "dotDotDash"; break; + case LINESTYLE_WAVE: pUnderlineValue = "wave"; break; + case LINESTYLE_BOLDDOTTED: pUnderlineValue = "dottedHeavy"; break; + case LINESTYLE_BOLDDASH: pUnderlineValue = "dashedHeavy"; break; + case LINESTYLE_LONGDASH: pUnderlineValue = "dashLongHeavy"; break; + case LINESTYLE_BOLDLONGDASH: pUnderlineValue = "dashLongHeavy"; break; + case LINESTYLE_BOLDDASHDOT: pUnderlineValue = "dashDotHeavy"; break; + case LINESTYLE_BOLDDASHDOTDOT: pUnderlineValue = "dashDotDotHeavy"; break; + case LINESTYLE_BOLDWAVE: pUnderlineValue = "wavyHeavy"; break; + case LINESTYLE_DOUBLEWAVE: pUnderlineValue = "wavyDouble"; break; + case LINESTYLE_NONE: // fall through default: pUnderlineValue = "none"; break; } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 46d9ed9f377f..34a171a0bfbf 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2364,55 +2364,55 @@ void RtfAttributeOutput::CharUnderline(const SvxUnderlineItem& rUnderline) bWord = static_cast<const SvxWordLineModeItem*>(pItem)->GetValue(); switch (rUnderline.GetLineStyle()) { - case UNDERLINE_SINGLE: + case LINESTYLE_SINGLE: pStr = bWord ? OOO_STRING_SVTOOLS_RTF_ULW : OOO_STRING_SVTOOLS_RTF_UL; break; - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: pStr = OOO_STRING_SVTOOLS_RTF_ULDB; break; - case UNDERLINE_NONE: + case LINESTYLE_NONE: pStr = OOO_STRING_SVTOOLS_RTF_ULNONE; break; - case UNDERLINE_DOTTED: + case LINESTYLE_DOTTED: pStr = OOO_STRING_SVTOOLS_RTF_ULD; break; - case UNDERLINE_DASH: + case LINESTYLE_DASH: pStr = OOO_STRING_SVTOOLS_RTF_ULDASH; break; - case UNDERLINE_DASHDOT: + case LINESTYLE_DASHDOT: pStr = OOO_STRING_SVTOOLS_RTF_ULDASHD; break; - case UNDERLINE_DASHDOTDOT: + case LINESTYLE_DASHDOTDOT: pStr = OOO_STRING_SVTOOLS_RTF_ULDASHDD; break; - case UNDERLINE_BOLD: + case LINESTYLE_BOLD: pStr = OOO_STRING_SVTOOLS_RTF_ULTH; break; - case UNDERLINE_WAVE: + case LINESTYLE_WAVE: pStr = OOO_STRING_SVTOOLS_RTF_ULWAVE; break; - case UNDERLINE_BOLDDOTTED: + case LINESTYLE_BOLDDOTTED: pStr = OOO_STRING_SVTOOLS_RTF_ULTHD; break; - case UNDERLINE_BOLDDASH: + case LINESTYLE_BOLDDASH: pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASH; break; - case UNDERLINE_LONGDASH: + case LINESTYLE_LONGDASH: pStr = OOO_STRING_SVTOOLS_RTF_ULLDASH; break; - case UNDERLINE_BOLDLONGDASH: + case LINESTYLE_BOLDLONGDASH: pStr = OOO_STRING_SVTOOLS_RTF_ULTHLDASH; break; - case UNDERLINE_BOLDDASHDOT: + case LINESTYLE_BOLDDASHDOT: pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASHD; break; - case UNDERLINE_BOLDDASHDOTDOT: + case LINESTYLE_BOLDDASHDOTDOT: pStr = OOO_STRING_SVTOOLS_RTF_ULTHDASHDD; break; - case UNDERLINE_BOLDWAVE: + case LINESTYLE_BOLDWAVE: pStr = OOO_STRING_SVTOOLS_RTF_ULHWAVE; break; - case UNDERLINE_DOUBLEWAVE: + case LINESTYLE_DOUBLEWAVE: pStr = OOO_STRING_SVTOOLS_RTF_ULULDBWAVE; break; default: diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index a1f9d83e5dde..eb30f1d81bda 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1208,60 +1208,60 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline ) sal_uInt8 b = 0; switch ( rUnderline.GetLineStyle() ) { - case UNDERLINE_SINGLE: + case LINESTYLE_SINGLE: b = ( bWord ) ? 2 : 1; break; - case UNDERLINE_BOLD: + case LINESTYLE_BOLD: b = 6; break; - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: b = 3; break; - case UNDERLINE_DOTTED: + case LINESTYLE_DOTTED: b = 4; break; - case UNDERLINE_DASH: + case LINESTYLE_DASH: b = 7; break; - case UNDERLINE_DASHDOT: + case LINESTYLE_DASHDOT: b = 9; break; - case UNDERLINE_DASHDOTDOT: + case LINESTYLE_DASHDOTDOT: b = 10; break; - case UNDERLINE_WAVE: + case LINESTYLE_WAVE: b = 11; break; // new in WW2000 - case UNDERLINE_BOLDDOTTED: + case LINESTYLE_BOLDDOTTED: b = 20; break; - case UNDERLINE_BOLDDASH: + case LINESTYLE_BOLDDASH: b = 23; break; - case UNDERLINE_LONGDASH: + case LINESTYLE_LONGDASH: b = 39; break; - case UNDERLINE_BOLDLONGDASH: + case LINESTYLE_BOLDLONGDASH: b = 55; break; - case UNDERLINE_BOLDDASHDOT: + case LINESTYLE_BOLDDASHDOT: b = 25; break; - case UNDERLINE_BOLDDASHDOTDOT: + case LINESTYLE_BOLDDASHDOTDOT: b = 26; break; - case UNDERLINE_BOLDWAVE: + case LINESTYLE_BOLDWAVE: b = 27; break; - case UNDERLINE_DOUBLEWAVE: + case LINESTYLE_DOUBLEWAVE: b = 43; break; - case UNDERLINE_NONE: + case LINESTYLE_NONE: b = 0; break; default: - OSL_ENSURE( rUnderline.GetLineStyle() == UNDERLINE_NONE, "Unhandled underline type" ); + OSL_ENSURE( rUnderline.GetLineStyle() == LINESTYLE_NONE, "Unhandled underline type" ); break; } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 092f5650f3eb..a4eb8755478d 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3260,7 +3260,7 @@ void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, sho void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short nLen ) { - FontUnderline eUnderline = UNDERLINE_NONE; + FontLineStyle eUnderline = LINESTYLE_NONE; bool bWordLine = false; if( pData ) { @@ -3271,22 +3271,22 @@ void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short switch( *pData ) { case 2: bWordLine = true; // no break; - case 1: eUnderline = (FontUnderline)UNDERLINE_SINGLE; break; - case 3: eUnderline = (FontUnderline)UNDERLINE_DOUBLE; break; - case 4: eUnderline = (FontUnderline)UNDERLINE_DOTTED; break; - case 7: eUnderline = (FontUnderline)UNDERLINE_DASH; break; - case 9: eUnderline = (FontUnderline)UNDERLINE_DASHDOT; break; - case 10:eUnderline = (FontUnderline)UNDERLINE_DASHDOTDOT; break; - case 6: eUnderline = (FontUnderline)UNDERLINE_BOLD; break; - case 11:eUnderline = (FontUnderline)UNDERLINE_WAVE; break; - case 20:eUnderline = (FontUnderline)UNDERLINE_BOLDDOTTED; break; - case 23:eUnderline = (FontUnderline)UNDERLINE_BOLDDASH; break; - case 39:eUnderline = (FontUnderline)UNDERLINE_LONGDASH; break; - case 55:eUnderline = (FontUnderline)UNDERLINE_BOLDLONGDASH; break; - case 25:eUnderline = (FontUnderline)UNDERLINE_BOLDDASHDOT; break; - case 26:eUnderline = (FontUnderline)UNDERLINE_BOLDDASHDOTDOT;break; - case 27:eUnderline = (FontUnderline)UNDERLINE_BOLDWAVE; break; - case 43:eUnderline = (FontUnderline)UNDERLINE_DOUBLEWAVE; break; + case 1: eUnderline = (FontLineStyle)LINESTYLE_SINGLE; break; + case 3: eUnderline = (FontLineStyle)LINESTYLE_DOUBLE; break; + case 4: eUnderline = (FontLineStyle)LINESTYLE_DOTTED; break; + case 7: eUnderline = (FontLineStyle)LINESTYLE_DASH; break; + case 9: eUnderline = (FontLineStyle)LINESTYLE_DASHDOT; break; + case 10:eUnderline = (FontLineStyle)LINESTYLE_DASHDOTDOT; break; + case 6: eUnderline = (FontLineStyle)LINESTYLE_BOLD; break; + case 11:eUnderline = (FontLineStyle)LINESTYLE_WAVE; break; + case 20:eUnderline = (FontLineStyle)LINESTYLE_BOLDDOTTED; break; + case 23:eUnderline = (FontLineStyle)LINESTYLE_BOLDDASH; break; + case 39:eUnderline = (FontLineStyle)LINESTYLE_LONGDASH; break; + case 55:eUnderline = (FontLineStyle)LINESTYLE_BOLDLONGDASH; break; + case 25:eUnderline = (FontLineStyle)LINESTYLE_BOLDDASHDOT; break; + case 26:eUnderline = (FontLineStyle)LINESTYLE_BOLDDASHDOTDOT;break; + case 27:eUnderline = (FontLineStyle)LINESTYLE_BOLDWAVE; break; + case 43:eUnderline = (FontLineStyle)LINESTYLE_DOUBLEWAVE; break; } } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index d12d037c5dc6..2c0c8d13938e 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1544,8 +1544,8 @@ static CharAttr aRedlineAttr[] = { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_NOT_MAPPED }, { SID_ATTR_CHAR_WEIGHT, WEIGHT_BOLD }, { SID_ATTR_CHAR_POSTURE, ITALIC_NORMAL }, - { SID_ATTR_CHAR_UNDERLINE, UNDERLINE_SINGLE }, - { SID_ATTR_CHAR_UNDERLINE, UNDERLINE_DOUBLE }, + { SID_ATTR_CHAR_UNDERLINE, LINESTYLE_SINGLE }, + { SID_ATTR_CHAR_UNDERLINE, LINESTYLE_DOUBLE }, { SID_ATTR_CHAR_STRIKEOUT, STRIKEOUT_SINGLE }, { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_VERSALIEN }, { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_GEMEINE }, @@ -2101,8 +2101,8 @@ IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void ) rCJKFont.SetWeight(WEIGHT_NORMAL); rFont.SetItalic(ITALIC_NONE); rCJKFont.SetItalic(ITALIC_NONE); - rFont.SetUnderline(UNDERLINE_NONE); - rCJKFont.SetUnderline(UNDERLINE_NONE); + rFont.SetUnderline(LINESTYLE_NONE); + rCJKFont.SetUnderline(LINESTYLE_NONE); rFont.SetStrikeout(STRIKEOUT_NONE); rCJKFont.SetStrikeout(STRIKEOUT_NONE); rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED); @@ -2147,8 +2147,8 @@ IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void ) break; case SID_ATTR_CHAR_UNDERLINE: - rFont.SetUnderline( ( FontUnderline ) pAttr->nAttr ); - rCJKFont.SetUnderline( ( FontUnderline ) pAttr->nAttr ); + rFont.SetUnderline( ( FontLineStyle ) pAttr->nAttr ); + rCJKFont.SetUnderline( ( FontLineStyle ) pAttr->nAttr ); break; case SID_ATTR_CHAR_STRIKEOUT: diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 6eae65389b70..3ecbd16825ce 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -590,8 +590,8 @@ void AutoFormatPreview::MakeFonts( sal_uInt8 nIndex, vcl::Font& rFont, vcl::Font lcl_SetFontProperties( rCJKFont, rBoxFormat.GetCJKFont(), rBoxFormat.GetCJKWeight(), rBoxFormat.GetCJKPosture() ); lcl_SetFontProperties( rCTLFont, rBoxFormat.GetCTLFont(), rBoxFormat.GetCTLWeight(), rBoxFormat.GetCTLPosture() ); - SETONALLFONTS( SetUnderline, (FontUnderline)rBoxFormat.GetUnderline().GetValue() ); - SETONALLFONTS( SetOverline, (FontUnderline)rBoxFormat.GetOverline().GetValue() ); + SETONALLFONTS( SetUnderline, (FontLineStyle)rBoxFormat.GetUnderline().GetValue() ); + SETONALLFONTS( SetOverline, (FontLineStyle)rBoxFormat.GetOverline().GetValue() ); SETONALLFONTS( SetStrikeout, (FontStrikeout)rBoxFormat.GetCrossedOut().GetValue() ); SETONALLFONTS( SetOutline, rBoxFormat.GetContour().GetValue() ); SETONALLFONTS( SetShadow, rBoxFormat.GetShadowed().GetValue() ); diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 649937193ea2..d9d52fbd8a1b 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -479,7 +479,7 @@ static void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet, break; case SID_ATTR_CHAR_UNDERLINE: - rSet.Put( SvxUnderlineItem( (FontUnderline)rAttr.nAttr, + rSet.Put( SvxUnderlineItem( (FontLineStyle)rAttr.nAttr, RES_CHRATR_UNDERLINE)); break; diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index 956b074517ca..92c331d9b54a 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -249,7 +249,7 @@ SwRevisionConfig::SwRevisionConfig() : ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree) { aInsertAttr.nItemId = SID_ATTR_CHAR_UNDERLINE; - aInsertAttr.nAttr = UNDERLINE_SINGLE; + aInsertAttr.nAttr = LINESTYLE_SINGLE; aInsertAttr.nColor = COL_TRANSPARENT; aDeletedAttr.nItemId = SID_ATTR_CHAR_STRIKEOUT; aDeletedAttr.nAttr = STRIKEOUT_SINGLE; @@ -272,7 +272,7 @@ static sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr) { case SID_ATTR_CHAR_WEIGHT: nRet = 1; break; case SID_ATTR_CHAR_POSTURE: nRet = 2; break; - case SID_ATTR_CHAR_UNDERLINE: nRet = UNDERLINE_SINGLE == rAttr.nAttr ? 3 : 4; break; + case SID_ATTR_CHAR_UNDERLINE: nRet = LINESTYLE_SINGLE == rAttr.nAttr ? 3 : 4; break; case SID_ATTR_CHAR_STRIKEOUT: nRet = 3; break; case SID_ATTR_CHAR_CASEMAP: { @@ -332,10 +332,10 @@ static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, bool bDe else { rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE; - rAttr.nAttr = UNDERLINE_SINGLE; + rAttr.nAttr = LINESTYLE_SINGLE; } break; - case 4: rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.nAttr = UNDERLINE_DOUBLE ; break; + case 4: rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.nAttr = LINESTYLE_DOUBLE ; break; case 5: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_VERSALIEN ; break; case 6: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_GEMEINE ; break; case 7: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_KAPITAELCHEN ; break; diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index b40e0fc17c0b..09be8c4cacf1 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -327,7 +327,7 @@ void SwViewOption::SetOnlineSpell(bool b) AuthorCharAttr::AuthorCharAttr() : nItemId (SID_ATTR_CHAR_UNDERLINE), - nAttr (UNDERLINE_SINGLE), + nAttr (LINESTYLE_SINGLE), nColor (COL_TRANSPARENT) { } diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index f19da7ecab9a..6cd4b83e0ba8 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -283,16 +283,16 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) } else { - FontUnderline eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); - aNewAttr.Put( SvxUnderlineItem( eFU != UNDERLINE_NONE ?UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ) ); + FontLineStyle eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); + aNewAttr.Put( SvxUnderlineItem( eFU != LINESTYLE_NONE ?LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE ) ); } } break; } case SID_ATTR_CHAR_OVERLINE: { - FontUnderline eFO = static_cast<const SvxOverlineItem&>(aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); - aNewAttr.Put(SvxOverlineItem(eFO == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_OVERLINE)); + FontLineStyle eFO = static_cast<const SvxOverlineItem&>(aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); + aNewAttr.Put(SvxOverlineItem(eFO == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_OVERLINE)); break; } case SID_ATTR_CHAR_CONTOUR: nEEWhich = EE_CHAR_OUTLINE; break; diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 377753d781fb..e90bc5a2d797 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -178,16 +178,16 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) } else { - FontUnderline eFU = static_cast<const SvxUnderlineItem&>(aEditAttr.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); - aNewAttr.Put( SvxUnderlineItem(eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE) ); + FontLineStyle eFU = static_cast<const SvxUnderlineItem&>(aEditAttr.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); + aNewAttr.Put( SvxUnderlineItem(eFU == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE) ); } } break; case SID_ATTR_CHAR_OVERLINE: { - FontUnderline eFO = static_cast<const SvxOverlineItem&>(aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); - aNewAttr.Put(SvxOverlineItem(eFO == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_OVERLINE)); + FontLineStyle eFO = static_cast<const SvxOverlineItem&>(aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); + aNewAttr.Put(SvxOverlineItem(eFO == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_OVERLINE)); } break; diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 3d004231fa01..43d4eef57fd5 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -135,20 +135,20 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) break; case FN_UNDERLINE_DOUBLE: { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( aSet.Get(RES_CHRATR_UNDERLINE)).GetLineStyle(); switch( eState ) { case STATE_TOGGLE: - eUnderline = eUnderline == UNDERLINE_DOUBLE ? - UNDERLINE_NONE : - UNDERLINE_DOUBLE; + eUnderline = eUnderline == LINESTYLE_DOUBLE ? + LINESTYLE_NONE : + LINESTYLE_DOUBLE; break; case STATE_ON: - eUnderline = UNDERLINE_DOUBLE; + eUnderline = LINESTYLE_DOUBLE; break; case STATE_OFF: - eUnderline = UNDERLINE_NONE; + eUnderline = LINESTYLE_NONE; break; } SvxUnderlineItem aUnderline(eUnderline, RES_CHRATR_UNDERLINE ); @@ -659,9 +659,9 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) eState = aCoreSet.GetItemState(RES_CHRATR_UNDERLINE); if( eState >= SfxItemState::DEFAULT ) { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( aCoreSet.Get(RES_CHRATR_UNDERLINE)).GetLineStyle(); - rSet.Put(SfxBoolItem(nSlot, eUnderline == UNDERLINE_DOUBLE)); + rSet.Put(SfxBoolItem(nSlot, eUnderline == LINESTYLE_DOUBLE)); } else rSet.InvalidateItem(nSlot); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 22179dff12ea..ddab490c0f93 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -406,8 +406,8 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons aFont.SetWeight( VCLUnoHelper::ConvertFontWeight( rDescr.Weight ) ); if ( rDescr.Slant != css::awt::FontSlant_DONTKNOW ) aFont.SetItalic( VCLUnoHelper::ConvertFontSlant( rDescr.Slant ) ); - if ( (FontUnderline)rDescr.Underline != UNDERLINE_DONTKNOW ) - aFont.SetUnderline( (FontUnderline)rDescr.Underline ); + if ( (FontLineStyle)rDescr.Underline != LINESTYLE_DONTKNOW ) + aFont.SetUnderline( (FontLineStyle)rDescr.Underline ); if ( (FontStrikeout)rDescr.Strikeout != STRIKEOUT_DONTKNOW ) aFont.SetStrikeout( (FontStrikeout)rDescr.Strikeout ); diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index 3a7ff26c4b30..bc6b4c8197b0 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -116,8 +116,8 @@ private: FontWidth meWidthType; FontItalic meItalic; TextAlign meAlign; - FontUnderline meUnderline; - FontUnderline meOverline; + FontLineStyle meUnderline; + FontLineStyle meOverline; FontStrikeout meStrikeout; FontRelief meRelief; FontEmphasisMark meEmphasisMark; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 31538e842d9f..55acf9f1415a 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -688,16 +688,16 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec { vcl::Font aFont = rRenderContext.GetFont(); if (nAttr & EXTTEXTINPUT_ATTR_UNDERLINE) - aFont.SetUnderline(UNDERLINE_SINGLE); + aFont.SetUnderline(LINESTYLE_SINGLE); else if (nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE) - aFont.SetUnderline( UNDERLINE_BOLD); + aFont.SetUnderline( LINESTYLE_BOLD); else if (nAttr & EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE) - aFont.SetUnderline( UNDERLINE_DOTTED); + aFont.SetUnderline( LINESTYLE_DOTTED); else if (nAttr & EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE) - aFont.SetUnderline( UNDERLINE_DASHDOT); + aFont.SetUnderline( LINESTYLE_DASHDOT); else if (nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE) { - aFont.SetUnderline(UNDERLINE_WAVE); + aFont.SetUnderline(LINESTYLE_WAVE); rRenderContext.SetTextLineColor(Color(COL_LIGHTGRAY)); } rRenderContext.SetFont(aFont); diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index a4ec5e784a82..da53f9a18824 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -33,7 +33,7 @@ void FixedHyperlink::Initialize() // changes the font vcl::Font aFont = GetControlFont( ); // to underline - aFont.SetUnderline( UNDERLINE_SINGLE ); + aFont.SetUnderline( LINESTYLE_SINGLE ); SetControlFont( aFont ); // changes the color to light blue SetControlForeground( Color( COL_LIGHTBLUE ) ); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 6f593a7931b4..4598c13333d2 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1417,13 +1417,13 @@ void TextEngine::SeekCursor( sal_uInt32 nPara, sal_Int32 nPos, vcl::Font& rFont, { sal_uInt16 nAttr = mpIMEInfos->pAttribs[ nPos - mpIMEInfos->aPos.GetIndex() - 1 ]; if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE ) - rFont.SetUnderline( UNDERLINE_SINGLE ); + rFont.SetUnderline( LINESTYLE_SINGLE ); else if ( nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE ) - rFont.SetUnderline( UNDERLINE_BOLD ); + rFont.SetUnderline( LINESTYLE_BOLD ); else if ( nAttr & EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ) - rFont.SetUnderline( UNDERLINE_DOTTED ); + rFont.SetUnderline( LINESTYLE_DOTTED ); else if ( nAttr & EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ) - rFont.SetUnderline( UNDERLINE_DOTTED ); + rFont.SetUnderline( LINESTYLE_DOTTED ); if ( nAttr & EXTTEXTINPUT_ATTR_REDTEXT ) rFont.SetColor( Color( COL_RED ) ); else if ( nAttr & EXTTEXTINPUT_ATTR_HALFTONETEXT ) @@ -1437,7 +1437,7 @@ void TextEngine::SeekCursor( sal_uInt32 nPara, sal_Int32 nPos, vcl::Font& rFont, } else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) { - rFont.SetUnderline( UNDERLINE_WAVE ); + rFont.SetUnderline( LINESTYLE_WAVE ); // if( pOut ) // pOut->SetTextLineColor( Color( COL_LIGHTGRAY ) ); } diff --git a/vcl/source/edit/txtattr.cxx b/vcl/source/edit/txtattr.cxx index 1d894273e449..23e0c02cd281 100644 --- a/vcl/source/edit/txtattr.cxx +++ b/vcl/source/edit/txtattr.cxx @@ -102,7 +102,7 @@ TextAttribHyperLink::~TextAttribHyperLink() void TextAttribHyperLink::SetFont( vcl::Font& rFont ) const { rFont.SetColor( maColor ); - rFont.SetUnderline( UNDERLINE_SINGLE ); + rFont.SetUnderline( LINESTYLE_SINGLE ); } TextAttrib* TextAttribHyperLink::Clone() const diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 7d5c0d4ab8aa..837e44482739 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -539,8 +539,8 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u if ((Atr.Schnitt & TextBoldBit) !=0) aFont.SetWeight(WEIGHT_BOLD); if ((Atr.Schnitt & TextRSlnBit) !=0) aFont.SetItalic(ITALIC_NORMAL); - if ((Atr.Schnitt & TextUndlBit) !=0) aFont.SetUnderline(UNDERLINE_SINGLE); - if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE); + if ((Atr.Schnitt & TextUndlBit) !=0) aFont.SetUnderline(LINESTYLE_SINGLE); + if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(LINESTYLE_DOUBLE); if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE); if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE); if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(true); diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 68ed00c6adc9..ab2d7a8a6c8b 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -532,7 +532,7 @@ void EMFWriter::ImplCheckTextAttr() m_rStm.WriteInt32( nWeight ); m_rStm.WriteUChar( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); - m_rStm.WriteUChar( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); + m_rStm.WriteUChar( ( LINESTYLE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); m_rStm.WriteUChar( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ); m_rStm.WriteUChar( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); m_rStm.WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 60aa409e74c4..3ff2d3b5c2e4 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -221,7 +221,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) aFont.SetItalic( ITALIC_NORMAL ); if( rFont.lfUnderline ) - aFont.SetUnderline( UNDERLINE_SINGLE ); + aFont.SetUnderline( LINESTYLE_SINGLE ); if( rFont.lfStrikeOut ) aFont.SetStrikeout( STRIKEOUT_SINGLE ); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index f12b51096dc9..4ab9868f3998 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -331,7 +331,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont) pWMF->WriteUInt16( nWeight ); if (rFont.GetItalic()==ITALIC_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); - if (rFont.GetUnderline()==UNDERLINE_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); + if (rFont.GetUnderline()==LINESTYLE_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); if (rFont.GetStrikeout()==STRIKEOUT_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); rtl_TextEncoding eFontNameEncoding = rFont.GetCharSet(); diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 4d41ed4f687e..4cfd900f400d 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -322,7 +322,7 @@ void Font::SetShadow( bool bShadow ) } } -void Font::SetUnderline( FontUnderline eUnderline ) +void Font::SetUnderline( FontLineStyle eUnderline ) { if( mpImplFont->meUnderline != eUnderline ) { @@ -331,7 +331,7 @@ void Font::SetUnderline( FontUnderline eUnderline ) } } -void Font::SetOverline( FontUnderline eOverline ) +void Font::SetOverline( FontLineStyle eOverline ) { if( mpImplFont->meOverline != eOverline ) { @@ -430,12 +430,12 @@ void Font::Merge( const vcl::Font& rFont ) if ( rFont.GetSize().Height() ) SetSize( rFont.GetSize() ); - if ( rFont.GetUnderline() != UNDERLINE_DONTKNOW ) + if ( rFont.GetUnderline() != LINESTYLE_DONTKNOW ) { SetUnderline( rFont.GetUnderline() ); SetWordLineMode( rFont.IsWordLineMode() ); } - if ( rFont.GetOverline() != UNDERLINE_DONTKNOW ) + if ( rFont.GetOverline() != LINESTYLE_DONTKNOW ) { SetOverline( rFont.GetOverline() ); SetWordLineMode( rFont.IsWordLineMode() ); @@ -483,7 +483,7 @@ SvStream& ReadImplFont( SvStream& rIStm, ImplFont& rImplFont ) rIStm.ReadUInt16( nTmp16 ); rImplFont.SetFamilyType( (FontFamily) nTmp16 ); rIStm.ReadUInt16( nTmp16 ); rImplFont.SetPitch( (FontPitch) nTmp16 ); rIStm.ReadUInt16( nTmp16 ); rImplFont.SetWeight( (FontWeight) nTmp16 ); - rIStm.ReadUInt16( nTmp16 ); rImplFont.meUnderline = (FontUnderline) nTmp16; + rIStm.ReadUInt16( nTmp16 ); rImplFont.meUnderline = (FontLineStyle) nTmp16; rIStm.ReadUInt16( nTmp16 ); rImplFont.meStrikeout = (FontStrikeout) nTmp16; rIStm.ReadUInt16( nTmp16 ); rImplFont.SetItalic( (FontItalic) nTmp16 ); rIStm.ReadUInt16( nTmp16 ); rImplFont.maLanguageTag.reset( (LanguageType) nTmp16); @@ -506,7 +506,7 @@ SvStream& ReadImplFont( SvStream& rIStm, ImplFont& rImplFont ) if( aCompat.GetVersion() >= 3 ) { - rIStm.ReadUInt16( nTmp16 ); rImplFont.meOverline = (FontUnderline) nTmp16; + rIStm.ReadUInt16( nTmp16 ); rImplFont.meOverline = (FontLineStyle) nTmp16; } // Relief @@ -829,8 +829,8 @@ void Font::SetOrientationFlag( bool bCanRotate ) { mpImplFont->SetOrientationFla bool Font::IsOutline() const { return mpImplFont->mbOutline; } bool Font::IsShadow() const { return mpImplFont->mbShadow; } FontRelief Font::GetRelief() const { return mpImplFont->meRelief; } -FontUnderline Font::GetUnderline() const { return mpImplFont->meUnderline; } -FontUnderline Font::GetOverline() const { return mpImplFont->meOverline; } +FontLineStyle Font::GetUnderline() const { return mpImplFont->meUnderline; } +FontLineStyle Font::GetOverline() const { return mpImplFont->meOverline; } FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; } FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; } bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } @@ -846,8 +846,8 @@ ImplFont::ImplFont() : meWidthType( WIDTH_DONTKNOW ), meItalic( ITALIC_NONE ), meAlign( ALIGN_TOP ), - meUnderline( UNDERLINE_NONE ), - meOverline( UNDERLINE_NONE ), + meUnderline( LINESTYLE_NONE ), + meOverline( LINESTYLE_NONE ), meStrikeout( STRIKEOUT_NONE ), meRelief( RELIEF_NONE ), meEmphasisMark( EMPHASISMARK_NONE ), diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2643b9bc14e5..4756804f96f6 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1378,8 +1378,8 @@ MetaTextLineAction::MetaTextLineAction() : MetaAction ( MetaActionType::TEXTLINE ), mnWidth ( 0 ), meStrikeout ( STRIKEOUT_NONE ), - meUnderline ( UNDERLINE_NONE ), - meOverline ( UNDERLINE_NONE ) + meUnderline ( LINESTYLE_NONE ), + meOverline ( LINESTYLE_NONE ) {} MetaTextLineAction::~MetaTextLineAction() @@ -1387,8 +1387,8 @@ MetaTextLineAction::~MetaTextLineAction() MetaTextLineAction::MetaTextLineAction( const Point& rPos, long nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline ) : + FontLineStyle eUnderline, + FontLineStyle eOverline ) : MetaAction ( MetaActionType::TEXTLINE ), maPos ( rPos ), mnWidth ( nWidth ), @@ -1446,11 +1446,11 @@ void MetaTextLineAction::Read( SvStream& rIStm, ImplMetaReadData* ) meStrikeout = (FontStrikeout)nTempStrikeout; sal_uInt32 nTempUnderline(0); rIStm.ReadUInt32( nTempUnderline ); - meUnderline = (FontUnderline)nTempUnderline; + meUnderline = (FontLineStyle)nTempUnderline; if ( aCompat.GetVersion() >= 2 ) { sal_uInt32 nTempUnderline2(0); rIStm.ReadUInt32(nTempUnderline2); - meUnderline = (FontUnderline)nTempUnderline2; + meUnderline = (FontLineStyle)nTempUnderline2; } } diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index fed08e478b60..df8a1a21336d 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -71,8 +71,8 @@ void PDFWriter::DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline, + FontLineStyle eUnderline, + FontLineStyle eOverline, bool bUnderlineAbove ) { xImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 11e43a993fb6..a26d5ff46df2 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9066,12 +9066,12 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool // draw eventual textlines FontStrikeout eStrikeout = m_aCurrentPDFState.m_aFont.GetStrikeout(); - FontUnderline eUnderline = m_aCurrentPDFState.m_aFont.GetUnderline(); - FontUnderline eOverline = m_aCurrentPDFState.m_aFont.GetOverline(); + FontLineStyle eUnderline = m_aCurrentPDFState.m_aFont.GetUnderline(); + FontLineStyle eOverline = m_aCurrentPDFState.m_aFont.GetOverline(); if( bTextLines && ( - ( eUnderline != UNDERLINE_NONE && eUnderline != UNDERLINE_DONTKNOW ) || - ( eOverline != UNDERLINE_NONE && eOverline != UNDERLINE_DONTKNOW ) || + ( eUnderline != LINESTYLE_NONE && eUnderline != LINESTYLE_DONTKNOW ) || + ( eOverline != LINESTYLE_NONE && eOverline != LINESTYLE_DONTKNOW ) || ( eStrikeout != STRIKEOUT_NONE && eStrikeout != STRIKEOUT_DONTKNOW ) ) ) @@ -9484,7 +9484,7 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin #define HCONV( x ) m_pReferenceDevice->ImplDevicePixelToLogicHeight( x ) -void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ) +void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ) { // note: units in pFontInstance are ref device pixel LogicalFontInstance* pFontInstance = m_pReferenceDevice->mpFontInstance; @@ -9508,20 +9508,20 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnd nLineHeight = HCONV( pFontInstance->mxFontMetric->GetWavelineUnderlineSize() ); nLinePos = HCONV( pFontInstance->mxFontMetric->GetWavelineUnderlineOffset() ); } - if ( (eTextLine == UNDERLINE_SMALLWAVE) && (nLineHeight > 3) ) + if ( (eTextLine == LINESTYLE_SMALLWAVE) && (nLineHeight > 3) ) nLineHeight = 3; long nLineWidth = getReferenceDevice()->mnDPIX/450; if ( ! nLineWidth ) nLineWidth = 1; - if ( eTextLine == UNDERLINE_BOLDWAVE ) + if ( eTextLine == LINESTYLE_BOLDWAVE ) nLineWidth = 3*nLineWidth; m_aPages.back().appendMappedLength( (sal_Int32)nLineWidth, aLine ); aLine.append( " w " ); - if ( eTextLine == UNDERLINE_DOUBLEWAVE ) + if ( eTextLine == LINESTYLE_DOUBLEWAVE ) { long nOrgLineHeight = nLineHeight; nLineHeight /= 3; @@ -9548,13 +9548,13 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnd } else { - if ( eTextLine != UNDERLINE_BOLDWAVE ) + if ( eTextLine != LINESTYLE_BOLDWAVE ) nLinePos -= nLineWidth/2; m_aPages.back().appendWaveLine( nWidth, -nLinePos, nLineHeight, aLine ); } } -void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ) +void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ) { // note: units in pFontInstance are ref device pixel LogicalFontInstance* pFontInstance = m_pReferenceDevice->mpFontInstance; @@ -9562,17 +9562,17 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon long nLinePos = 0; long nLinePos2 = 0; - if ( eTextLine > UNDERLINE_BOLDWAVE ) - eTextLine = UNDERLINE_SINGLE; + if ( eTextLine > LINESTYLE_BOLDWAVE ) + eTextLine = LINESTYLE_SINGLE; switch ( eTextLine ) { - case UNDERLINE_SINGLE: - case UNDERLINE_DOTTED: - case UNDERLINE_DASH: - case UNDERLINE_LONGDASH: - case UNDERLINE_DASHDOT: - case UNDERLINE_DASHDOTDOT: + case LINESTYLE_SINGLE: + case LINESTYLE_DOTTED: + case LINESTYLE_DASH: + case LINESTYLE_LONGDASH: + case LINESTYLE_DASHDOT: + case LINESTYLE_DASHDOTDOT: if ( bIsAbove ) { if ( !pFontInstance->mxFontMetric->GetAboveUnderlineSize() ) @@ -9588,12 +9588,12 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon nLinePos = HCONV( pFontInstance->mxFontMetric->GetUnderlineOffset() ); } break; - case UNDERLINE_BOLD: - case UNDERLINE_BOLDDOTTED: - case UNDERLINE_BOLDDASH: - case UNDERLINE_BOLDLONGDASH: - case UNDERLINE_BOLDDASHDOT: - case UNDERLINE_BOLDDASHDOTDOT: + case LINESTYLE_BOLD: + case LINESTYLE_BOLDDOTTED: + case LINESTYLE_BOLDDASH: + case LINESTYLE_BOLDLONGDASH: + case LINESTYLE_BOLDDASHDOT: + case LINESTYLE_BOLDDASHDOTDOT: if ( bIsAbove ) { if ( !pFontInstance->mxFontMetric->GetAboveBoldUnderlineSize() ) @@ -9610,7 +9610,7 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon nLinePos += nLineHeight/2; } break; - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: if ( bIsAbove ) { if ( !pFontInstance->mxFontMetric->GetAboveDoubleUnderlineSize() ) @@ -9641,20 +9641,20 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon switch ( eTextLine ) { - case UNDERLINE_DOTTED: - case UNDERLINE_BOLDDOTTED: + case LINESTYLE_DOTTED: + case LINESTYLE_BOLDDOTTED: aLine.append( "[ " ); m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, false ); aLine.append( " ] 0 d\n" ); break; - case UNDERLINE_DASH: - case UNDERLINE_LONGDASH: - case UNDERLINE_BOLDDASH: - case UNDERLINE_BOLDLONGDASH: + case LINESTYLE_DASH: + case LINESTYLE_LONGDASH: + case LINESTYLE_BOLDDASH: + case LINESTYLE_BOLDLONGDASH: { sal_Int32 nDashLength = 4*nLineHeight; sal_Int32 nVoidLength = 2*nLineHeight; - if ( ( eTextLine == UNDERLINE_LONGDASH ) || ( eTextLine == UNDERLINE_BOLDLONGDASH ) ) + if ( ( eTextLine == LINESTYLE_LONGDASH ) || ( eTextLine == LINESTYLE_BOLDLONGDASH ) ) nDashLength = 8*nLineHeight; aLine.append( "[ " ); @@ -9664,8 +9664,8 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon aLine.append( " ] 0 d\n" ); } break; - case UNDERLINE_DASHDOT: - case UNDERLINE_BOLDDASHDOT: + case LINESTYLE_DASHDOT: + case LINESTYLE_BOLDDASHDOT: { sal_Int32 nDashLength = 4*nLineHeight; sal_Int32 nVoidLength = 2*nLineHeight; @@ -9680,8 +9680,8 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon aLine.append( " ] 0 d\n" ); } break; - case UNDERLINE_DASHDOTDOT: - case UNDERLINE_BOLDDASHDOTDOT: + case LINESTYLE_DASHDOTDOT: + case LINESTYLE_BOLDDASHDOTDOT: { sal_Int32 nDashLength = 4*nLineHeight; sal_Int32 nVoidLength = 2*nLineHeight; @@ -9711,7 +9711,7 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon aLine.append( ' ' ); m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos), aLine ); aLine.append( " l S\n" ); - if ( eTextLine == UNDERLINE_DOUBLE ) + if ( eTextLine == LINESTYLE_DOUBLE ) { aLine.append( "0 " ); m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos2-nLineHeight), aLine ); @@ -9846,12 +9846,12 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik } } -void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bUnderlineAbove ) +void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove ) { if ( !nWidth || ( ((eStrikeout == STRIKEOUT_NONE)||(eStrikeout == STRIKEOUT_DONTKNOW)) && - ((eUnderline == UNDERLINE_NONE)||(eUnderline == UNDERLINE_DONTKNOW)) && - ((eOverline == UNDERLINE_NONE)||(eOverline == UNDERLINE_DONTKNOW)) ) ) + ((eUnderline == LINESTYLE_NONE)||(eUnderline == LINESTYLE_DONTKNOW)) && + ((eOverline == LINESTYLE_NONE)||(eOverline == LINESTYLE_DONTKNOW)) ) ) return; MARK( "drawTextLine" ); @@ -9894,19 +9894,19 @@ void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout if ( aUnderlineColor.GetTransparency() != 0 ) aUnderlineColor = aStrikeoutColor; - if ( (eUnderline == UNDERLINE_SMALLWAVE) || - (eUnderline == UNDERLINE_WAVE) || - (eUnderline == UNDERLINE_DOUBLEWAVE) || - (eUnderline == UNDERLINE_BOLDWAVE) ) + if ( (eUnderline == LINESTYLE_SMALLWAVE) || + (eUnderline == LINESTYLE_WAVE) || + (eUnderline == LINESTYLE_DOUBLEWAVE) || + (eUnderline == LINESTYLE_BOLDWAVE) ) { drawWaveTextLine( aLine, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove ); bUnderlineDone = true; } - if ( (eOverline == UNDERLINE_SMALLWAVE) || - (eOverline == UNDERLINE_WAVE) || - (eOverline == UNDERLINE_DOUBLEWAVE) || - (eOverline == UNDERLINE_BOLDWAVE) ) + if ( (eOverline == LINESTYLE_SMALLWAVE) || + (eOverline == LINESTYLE_WAVE) || + (eOverline == LINESTYLE_DOUBLEWAVE) || + (eOverline == LINESTYLE_BOLDWAVE) ) { drawWaveTextLine( aLine, nWidth, eOverline, aOverlineColor, true ); bOverlineDone = true; diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 2864fa06e987..03156e2b7e3e 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1160,9 +1160,9 @@ public: sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true ); void drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, bool bTextLines = true ); - void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bUnderlineAbove ); - void drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ); - void drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ); + void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove ); + void drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); + void drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); void drawStrikeoutLine( OStringBuffer& aLine, long nWidth, FontStrikeout eStrikeout, Color aColor ); void drawStrikeoutChar( const Point& rPos, long nWidth, FontStrikeout eStrikeout ); diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index c7aba9117076..3ff05366678f 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -831,7 +831,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) aFont.SetAlignment( (FontAlign) nAlign ); aFont.SetWeight( ( nWeight == 1 ) ? WEIGHT_LIGHT : ( nWeight == 2 ) ? WEIGHT_NORMAL : ( nWeight == 3 ) ? WEIGHT_BOLD : WEIGHT_DONTKNOW ); - aFont.SetUnderline( (FontUnderline) nUnderline ); + aFont.SetUnderline( (FontLineStyle) nUnderline ); aFont.SetStrikeout( (FontStrikeout) nStrikeout ); aFont.SetItalic( bItalic ? ITALIC_NORMAL : ITALIC_NONE ); aFont.SetOutline( bOutline ); @@ -1294,8 +1294,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) ImplSkipActions( rIStm, nFollowingActionCount ); rMtf.AddAction( new MetaTextLineAction( aStartPt, nWidth, (FontStrikeout) nStrikeout, - (FontUnderline) nUnderline, - UNDERLINE_NONE ) ); + (FontLineStyle) nUnderline, + LINESTYLE_NONE ) ); i += nFollowingActionCount; } @@ -2393,7 +2393,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const Point& rStartPt = pA->GetStartPoint(); const sal_Int32 nWidth = (sal_Int32) pA->GetWidth(); const FontStrikeout eStrikeout = pA->GetStrikeout(); - const FontUnderline eUnderline = pA->GetUnderline(); + const FontLineStyle eUnderline = pA->GetUnderline(); sal_uLong nOldPos, nNewPos; // write RefPoint comment diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 4850234cd068..65bd0112ea33 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1153,8 +1153,8 @@ bool OutputDevice::ImplNewFont() const } } - mbTextLines = ((maFont.GetUnderline() != UNDERLINE_NONE) && (maFont.GetUnderline() != UNDERLINE_DONTKNOW)) || - ((maFont.GetOverline() != UNDERLINE_NONE) && (maFont.GetOverline() != UNDERLINE_DONTKNOW)) || + mbTextLines = ((maFont.GetUnderline() != LINESTYLE_NONE) && (maFont.GetUnderline() != LINESTYLE_DONTKNOW)) || + ((maFont.GetOverline() != LINESTYLE_NONE) && (maFont.GetOverline() != LINESTYLE_DONTKNOW)) || ((maFont.GetStrikeout() != STRIKEOUT_NONE) && (maFont.GetStrikeout() != STRIKEOUT_DONTKNOW)); mbTextSpecial = maFont.IsShadow() || maFont.IsOutline() || (maFont.GetRelief() != RELIEF_NONE); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index a4ae98e9ac4d..8d0df9a2a83c 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -32,7 +32,7 @@ #include "impfont.hxx" #include "outdata.hxx" -#define UNDERLINE_LAST UNDERLINE_BOLDWAVE +#define UNDERLINE_LAST LINESTYLE_BOLDWAVE #define STRIKEOUT_LAST STRIKEOUT_X bool OutputDevice::ImplIsUnderlineAbove( const vcl::Font& rFont ) @@ -206,7 +206,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY, void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nDistX, long nDistY, long nWidth, - FontUnderline eTextLine, + FontLineStyle eTextLine, Color aColor, bool bIsAbove ) { @@ -224,20 +224,20 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY, nLineHeight = pFontInstance->mxFontMetric->GetWavelineUnderlineSize(); nLinePos = pFontInstance->mxFontMetric->GetWavelineUnderlineOffset(); } - if ( (eTextLine == UNDERLINE_SMALLWAVE) && (nLineHeight > 3) ) + if ( (eTextLine == LINESTYLE_SMALLWAVE) && (nLineHeight > 3) ) nLineHeight = 3; long nLineWidth = (mnDPIX / 300); if ( !nLineWidth ) nLineWidth = 1; - if ( eTextLine == UNDERLINE_BOLDWAVE ) + if ( eTextLine == LINESTYLE_BOLDWAVE ) nLineWidth *= 2; nLinePos += nDistY - (nLineHeight / 2); long nLineWidthHeight = ((nLineWidth * mnDPIX) + (mnDPIY / 2)) / mnDPIY; - if ( eTextLine == UNDERLINE_DOUBLEWAVE ) + if ( eTextLine == LINESTYLE_DOUBLEWAVE ) { long nOrgLineHeight = nLineHeight; nLineHeight /= 3; @@ -274,7 +274,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY, void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nDistX, long nDistY, long nWidth, - FontUnderline eTextLine, + FontLineStyle eTextLine, Color aColor, bool bIsAbove ) { @@ -286,16 +286,16 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, const long nY = nDistY; if ( eTextLine > UNDERLINE_LAST ) - eTextLine = UNDERLINE_SINGLE; + eTextLine = LINESTYLE_SINGLE; switch ( eTextLine ) { - case UNDERLINE_SINGLE: - case UNDERLINE_DOTTED: - case UNDERLINE_DASH: - case UNDERLINE_LONGDASH: - case UNDERLINE_DASHDOT: - case UNDERLINE_DASHDOTDOT: + case LINESTYLE_SINGLE: + case LINESTYLE_DOTTED: + case LINESTYLE_DASH: + case LINESTYLE_LONGDASH: + case LINESTYLE_DASHDOT: + case LINESTYLE_DASHDOTDOT: if ( bIsAbove ) { nLineHeight = pFontInstance->mxFontMetric->GetAboveUnderlineSize(); @@ -307,12 +307,12 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, nLinePos = nY + pFontInstance->mxFontMetric->GetUnderlineOffset(); } break; - case UNDERLINE_BOLD: - case UNDERLINE_BOLDDOTTED: - case UNDERLINE_BOLDDASH: - case UNDERLINE_BOLDLONGDASH: - case UNDERLINE_BOLDDASHDOT: - case UNDERLINE_BOLDDASHDOTDOT: + case LINESTYLE_BOLD: + case LINESTYLE_BOLDDOTTED: + case LINESTYLE_BOLDDASH: + case LINESTYLE_BOLDLONGDASH: + case LINESTYLE_BOLDDASHDOT: + case LINESTYLE_BOLDDASHDOTDOT: if ( bIsAbove ) { nLineHeight = pFontInstance->mxFontMetric->GetAboveBoldUnderlineSize(); @@ -324,7 +324,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, nLinePos = nY + pFontInstance->mxFontMetric->GetBoldUnderlineOffset(); } break; - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: if ( bIsAbove ) { nLineHeight = pFontInstance->mxFontMetric->GetAboveDoubleUnderlineSize(); @@ -356,16 +356,16 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, switch ( eTextLine ) { - case UNDERLINE_SINGLE: - case UNDERLINE_BOLD: + case LINESTYLE_SINGLE: + case LINESTYLE_BOLD: ImplDrawTextRect( nBaseX, nBaseY, nLeft, nLinePos, nWidth, nLineHeight ); break; - case UNDERLINE_DOUBLE: + case LINESTYLE_DOUBLE: ImplDrawTextRect( nBaseX, nBaseY, nLeft, nLinePos, nWidth, nLineHeight ); ImplDrawTextRect( nBaseX, nBaseY, nLeft, nLinePos2, nWidth, nLineHeight ); break; - case UNDERLINE_DOTTED: - case UNDERLINE_BOLDDOTTED: + case LINESTYLE_DOTTED: + case LINESTYLE_BOLDDOTTED: { long nDotWidth = nLineHeight*mnDPIY; nDotWidth += mnDPIY/2; @@ -383,10 +383,10 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, } } break; - case UNDERLINE_DASH: - case UNDERLINE_LONGDASH: - case UNDERLINE_BOLDDASH: - case UNDERLINE_BOLDLONGDASH: + case LINESTYLE_DASH: + case LINESTYLE_LONGDASH: + case LINESTYLE_BOLDDASH: + case LINESTYLE_BOLDLONGDASH: { long nDotWidth = nLineHeight*mnDPIY; nDotWidth += mnDPIY/2; @@ -396,8 +396,8 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nMinSpaceWidth; long nSpaceWidth; long nDashWidth; - if ( (eTextLine == UNDERLINE_LONGDASH) || - (eTextLine == UNDERLINE_BOLDLONGDASH) ) + if ( (eTextLine == LINESTYLE_LONGDASH) || + (eTextLine == LINESTYLE_BOLDLONGDASH) ) { nMinDashWidth = nDotWidth*6; nMinSpaceWidth = nDotWidth*2; @@ -431,8 +431,8 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, } } break; - case UNDERLINE_DASHDOT: - case UNDERLINE_BOLDDASHDOT: + case LINESTYLE_DASHDOT: + case LINESTYLE_BOLDDASHDOT: { long nDotWidth = nLineHeight*mnDPIY; nDotWidth += mnDPIY/2; @@ -466,8 +466,8 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, } } break; - case UNDERLINE_DASHDOTDOT: - case UNDERLINE_BOLDDASHDOTDOT: + case LINESTYLE_DASHDOTDOT: + case LINESTYLE_BOLDDASHDOTDOT: { long nDotWidth = nLineHeight*mnDPIY; nDotWidth += mnDPIY/2; @@ -674,8 +674,8 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY, void OutputDevice::ImplDrawTextLine( long nX, long nY, long nDistX, DeviceCoordinate nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline, + FontLineStyle eUnderline, + FontLineStyle eOverline, bool bUnderlineAbove ) { if ( !nWidth ) @@ -704,18 +704,18 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, if ( !IsOverlineColor() ) aOverlineColor = GetTextColor(); - if ( (eUnderline == UNDERLINE_SMALLWAVE) || - (eUnderline == UNDERLINE_WAVE) || - (eUnderline == UNDERLINE_DOUBLEWAVE) || - (eUnderline == UNDERLINE_BOLDWAVE) ) + if ( (eUnderline == LINESTYLE_SMALLWAVE) || + (eUnderline == LINESTYLE_WAVE) || + (eUnderline == LINESTYLE_DOUBLEWAVE) || + (eUnderline == LINESTYLE_BOLDWAVE) ) { ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove ); bUnderlineDone = true; } - if ( (eOverline == UNDERLINE_SMALLWAVE) || - (eOverline == UNDERLINE_WAVE) || - (eOverline == UNDERLINE_DOUBLEWAVE) || - (eOverline == UNDERLINE_BOLDWAVE) ) + if ( (eOverline == LINESTYLE_SMALLWAVE) || + (eOverline == LINESTYLE_WAVE) || + (eOverline == LINESTYLE_DOUBLEWAVE) || + (eOverline == LINESTYLE_BOLDWAVE) ) { ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, true ); bOverlineDone = true; @@ -739,7 +739,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, } void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStrikeout, - FontUnderline eUnderline, FontUnderline eOverline, + FontLineStyle eUnderline, FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove ) { if( bWordLine ) @@ -814,7 +814,7 @@ void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth ) nX = nBaseX - nWidth - (nX - nBaseX - 1); } - ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, false ); + ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, LINESTYLE_SINGLE, LINESTYLE_NONE, false ); } void OutputDevice::SetTextLineColor() @@ -933,8 +933,8 @@ void OutputDevice::SetOverlineColor( const Color& rColor ) void OutputDevice::DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, - FontUnderline eUnderline, - FontUnderline eOverline, + FontLineStyle eUnderline, + FontLineStyle eOverline, bool bUnderlineAbove ) { assert(!is_double_buffered_window()); @@ -942,8 +942,8 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth, if ( mpMetaFile ) mpMetaFile->AddAction( new MetaTextLineAction( rPos, nWidth, eStrikeout, eUnderline, eOverline ) ); - if ( ((eUnderline == UNDERLINE_NONE) || (eUnderline == UNDERLINE_DONTKNOW)) && - ((eOverline == UNDERLINE_NONE) || (eOverline == UNDERLINE_DONTKNOW)) && + if ( ((eUnderline == LINESTYLE_NONE) || (eUnderline == LINESTYLE_DONTKNOW)) && + ((eOverline == LINESTYLE_NONE) || (eOverline == LINESTYLE_DONTKNOW)) && ((eStrikeout == STRIKEOUT_NONE) || (eStrikeout == STRIKEOUT_DONTKNOW)) ) { return; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 50f448dc485b..4624105aa68d 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1486,7 +1486,7 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue) else if (rKey == "underline") { vcl::Font aFont(GetControlFont()); - aFont.SetUnderline(toBool(rValue) ? UNDERLINE_SINGLE : UNDERLINE_NONE); + aFont.SetUnderline(toBool(rValue) ? LINESTYLE_SINGLE : LINESTYLE_NONE); SetControlFont(aFont); } else if (rKey == "size") diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index e7dd594793f2..5ce0d947a3bf 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -890,9 +890,9 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ) else rFont.SetItalic( ITALIC_NONE ); if ( rLogFont.lfUnderline ) - rFont.SetUnderline( UNDERLINE_SINGLE ); + rFont.SetUnderline( LINESTYLE_SINGLE ); else - rFont.SetUnderline( UNDERLINE_NONE ); + rFont.SetUnderline( LINESTYLE_NONE ); if ( rLogFont.lfStrikeOut ) rFont.SetStrikeout( STRIKEOUT_SINGLE ); else |