summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-29 20:23:09 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-30 06:41:53 +0000
commit990082f37c31380d9fedd62c5dac1b5bff4c9636 (patch)
tree8f567bbc9814fd8a5b610529d82610422da59910
parent446d0887ff5421822e0296e20cbb36f08f1e6445 (diff)
Convert FontRelief to scoped enum
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011 Reviewed-on: https://gerrit.libreoffice.org/25626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--cppcanvas/source/inc/outdevstate.hxx4
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx6
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx10
-rw-r--r--editeng/source/editeng/eerdll.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/items/textitem.cxx12
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx6
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx8
-rw-r--r--include/editeng/charreliefitem.hxx6
-rw-r--r--include/vcl/fntstyle.hxx2
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx2
-rw-r--r--sd/source/core/stlpool.cxx8
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx6
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx10
-rw-r--r--vcl/source/font/font.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx6
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/text.cxx8
30 files changed, 74 insertions, 72 deletions
diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx
index 9478e4360138..2d199cc860ce 100644
--- a/cppcanvas/source/inc/outdevstate.hxx
+++ b/cppcanvas/source/inc/outdevstate.hxx
@@ -62,7 +62,7 @@ namespace cppcanvas
textDirection(css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
textAlignment(0), // TODO(Q2): Synchronize with implrenderer
// and possibly new rendering::TextAlignment
- textReliefStyle(RELIEF_NONE),
+ textReliefStyle(FontRelief::NONE),
textOverlineStyle(LINESTYLE_NONE),
textUnderlineStyle(LINESTYLE_NONE),
textStrikeoutStyle(STRIKEOUT_NONE),
@@ -103,7 +103,7 @@ namespace cppcanvas
PushFlags pushFlags;
sal_Int8 textDirection;
sal_Int8 textAlignment;
- sal_Int8 textReliefStyle;
+ FontRelief textReliefStyle;
sal_Int8 textOverlineStyle;
sal_Int8 textUnderlineStyle;
sal_Int8 textStrikeoutStyle;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index bb64de5c1e27..ab398c519186 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -905,7 +905,7 @@ namespace cppcanvas
aShadowColor.SetTransparency( aTextColor.GetTransparency() );
}
- if( rState.textReliefStyle )
+ if( rState.textReliefStyle != FontRelief::NONE )
{
// calculate relief offset (similar to outdev3.cxx)
sal_Int32 nReliefOffset = rParms.mrVDev.PixelToLogic( Size( 1, 1 ) ).Height();
@@ -913,7 +913,7 @@ namespace cppcanvas
if( nReliefOffset < 1 )
nReliefOffset = 1;
- if( rState.textReliefStyle == RELIEF_ENGRAVED )
+ if( rState.textReliefStyle == FontRelief::Engraved )
nReliefOffset = -nReliefOffset;
aReliefOffset.setWidth( nReliefOffset );
@@ -1491,7 +1491,7 @@ namespace cppcanvas
rFactoryParms );
// TODO(Q2): define and use appropriate enumeration types
- rState.textReliefStyle = (sal_Int8)rFont.GetRelief();
+ rState.textReliefStyle = rFont.GetRelief();
rState.textOverlineStyle = (sal_Int8)rFont.GetOverline();
rState.textUnderlineStyle = rParms.maFontUnderline.is_initialized() ?
(*rParms.maFontUnderline ? (sal_Int8)LINESTYLE_SINGLE : (sal_Int8)LINESTYLE_NONE) :
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2ea4aa69b6d9..d8cacd5d62a5 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2080,7 +2080,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
case SfxItemState::SET:
{
const SvxCharReliefItem& rItem = static_cast<const SvxCharReliefItem&>(rSet->Get( nWhich ));
- m_pReliefLB->SelectEntryPos(rItem.GetValue());
+ m_pReliefLB->SelectEntryPos((sal_Int32)rItem.GetValue());
SelectHdl_Impl(m_pReliefLB);
break;
}
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 70647cf11733..ff6d69426158 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1293,7 +1293,7 @@ namespace
|| LINESTYLE_NONE != rFont.GetUnderline()
|| STRIKEOUT_NONE != rFont.GetStrikeout()
|| FontEmphasisMark::NONE != (rFont.GetEmphasisMark() & FontEmphasisMark::Style)
- || RELIEF_NONE != rFont.GetRelief()
+ || FontRelief::NONE != rFont.GetRelief()
|| rFont.IsShadow()
|| bWordLineMode);
@@ -1327,8 +1327,8 @@ namespace
switch(rFont.GetRelief())
{
- case RELIEF_EMBOSSED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED; break;
- case RELIEF_ENGRAVED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED; break;
+ case FontRelief::Embossed : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED; break;
+ case FontRelief::Engraved : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED; break;
default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE
}
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 0d5c1186878c..62f7dce757c3 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -204,18 +204,18 @@ namespace drawinglayer
}
// set Relief attribute
- FontRelief eFontRelief = RELIEF_NONE;
+ FontRelief eFontRelief = FontRelief::NONE;
switch( pTCPP->getTextRelief() )
{
default:
SAL_WARN( "drawinglayer", "Unknown Relief style " << pTCPP->getTextRelief() );
SAL_FALLTHROUGH;
- case primitive2d::TEXT_RELIEF_NONE: eFontRelief = RELIEF_NONE; break;
- case primitive2d::TEXT_RELIEF_EMBOSSED: eFontRelief = RELIEF_EMBOSSED; break;
- case primitive2d::TEXT_RELIEF_ENGRAVED: eFontRelief = RELIEF_ENGRAVED; break;
+ case primitive2d::TEXT_RELIEF_NONE: eFontRelief = FontRelief::NONE; break;
+ case primitive2d::TEXT_RELIEF_EMBOSSED: eFontRelief = FontRelief::Embossed; break;
+ case primitive2d::TEXT_RELIEF_ENGRAVED: eFontRelief = FontRelief::Engraved; break;
}
- if( eFontRelief != RELIEF_NONE )
+ if( eFontRelief != FontRelief::NONE )
aFont.SetRelief( eFontRelief );
// set Shadow attribute
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index b444d6c0ac0a..1de90eb3567b 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -151,7 +151,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[41] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK );
ppDefItems[42] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL );
ppDefItems[43] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK );
- ppDefItems[44] = new SvxCharReliefItem( RELIEF_NONE, EE_CHAR_RELIEF );
+ ppDefItems[44] = new SvxCharReliefItem( FontRelief::NONE, EE_CHAR_RELIEF );
ppDefItems[45] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY );
ppDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS );
ppDefItems[47] = new SvxOverlineItem( LINESTYLE_NONE, EE_CHAR_OVERLINE );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 07ad13a8bde3..f38fcbf1bc0a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -912,10 +912,10 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
break;
case EE_CHAR_RELIEF:
{
- sal_uInt16 nRelief = static_cast<const SvxCharReliefItem&>(rItem).GetValue();
- if ( nRelief == RELIEF_EMBOSSED )
+ FontRelief nRelief = static_cast<const SvxCharReliefItem&>(rItem).GetValue();
+ if ( nRelief == FontRelief::Embossed )
rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_EMBO );
- if ( nRelief == RELIEF_ENGRAVED )
+ if ( nRelief == FontRelief::Engraved )
rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_IMPR );
}
break;
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 23243aa85d56..72172a67b35e 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -132,7 +132,7 @@ SfxPoolItem* SvxTwoLinesItem::CreateDefault() {return new SvxTwoLinesItem(true,
SfxPoolItem* SvxScriptTypeItem::CreateDefault() {return new SvxScriptTypeItem();}
SfxPoolItem* SvxCharRotateItem::CreateDefault() {return new SvxCharRotateItem(0, false, 0);}
SfxPoolItem* SvxCharScaleWidthItem::CreateDefault() {return new SvxCharScaleWidthItem(100, 0);}
-SfxPoolItem* SvxCharReliefItem::CreateDefault() {return new SvxCharReliefItem(RELIEF_NONE, 0);}
+SfxPoolItem* SvxCharReliefItem::CreateDefault() {return new SvxCharReliefItem(FontRelief::NONE, 0);}
SfxPoolItem* SvxRsidItem::CreateDefault() {return new SvxRsidItem(0, 0);}
@@ -3110,8 +3110,8 @@ SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, sal_uInt16) const
SvStream& SvxCharReliefItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const
{
- sal_uInt16 nVal = GetValue();
- rStrm.WriteUInt16( nVal );
+ FontRelief nVal = GetValue();
+ rStrm.WriteUInt16( (sal_uInt16)nVal );
return rStrm;
}
@@ -3140,7 +3140,7 @@ bool SvxCharReliefItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- rText = GetValueTextByPos( GetValue() );
+ rText = GetValueTextByPos( (sal_uInt16)GetValue() );
return true;
}
@@ -3155,8 +3155,8 @@ bool SvxCharReliefItem::PutValue( const css::uno::Any& rVal,
{
sal_Int16 nVal = -1;
rVal >>= nVal;
- if(nVal >= 0 && nVal <= RELIEF_ENGRAVED)
- SetValue( (sal_uInt16)nVal );
+ if(nVal >= 0 && nVal <= (sal_Int16)FontRelief::Engraved)
+ SetValue( (FontRelief)nVal );
else
bRet = false;
}
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 906367c796e1..8b2d79420a56 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -854,7 +854,7 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const
aBulletFont.SetOverline( LINESTYLE_NONE );
aBulletFont.SetStrikeout( STRIKEOUT_NONE );
aBulletFont.SetEmphasisMark( FontEmphasisMark::NONE );
- aBulletFont.SetRelief( RELIEF_NONE );
+ aBulletFont.SetRelief( FontRelief::NONE );
}
// Use original scale...
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index f10a60e1b46e..94aab744b878 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1062,14 +1062,14 @@ ATTR_SETEMPHASIS:
case RTF_EMBO:
if (aPlainMap.nRelief)
{
- pSet->Put(SvxCharReliefItem(RELIEF_EMBOSSED,
+ pSet->Put(SvxCharReliefItem(FontRelief::Embossed,
aPlainMap.nRelief));
}
break;
case RTF_IMPR:
if (aPlainMap.nRelief)
{
- pSet->Put(SvxCharReliefItem(RELIEF_ENGRAVED,
+ pSet->Put(SvxCharReliefItem(FontRelief::Engraved,
aPlainMap.nRelief));
}
break;
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 7ad1513f9838..f47ef3e0bfb1 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -388,7 +388,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
{
const FontMetric aMetric( mpVDev->GetFontMetric() );
- bool bTextSpecial = aMetric.IsShadow() || aMetric.IsOutline() || (aMetric.GetRelief() != RELIEF_NONE);
+ bool bTextSpecial = aMetric.IsShadow() || aMetric.IsOutline() || (aMetric.GetRelief() != FontRelief::NONE);
if( !bTextSpecial )
{
@@ -396,7 +396,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
}
else
{
- if( aMetric.GetRelief() != RELIEF_NONE )
+ if( aMetric.GetRelief() != FontRelief::NONE )
{
Color aReliefColor( COL_LIGHTGRAY );
Color aTextColor( mpVDev->GetTextColor() );
@@ -411,7 +411,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
Point aPos( rPos );
Point aOffset( 6,6 );
- if ( aMetric.GetRelief() == RELIEF_ENGRAVED )
+ if ( aMetric.GetRelief() == FontRelief::Engraved )
{
aPos -= aOffset;
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 4ce59e45a1f2..6199da64f760 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5667,7 +5667,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
}
if ( GetAttrib( PPT_CharAttr_Embossed, nVal, nDestinationInstance ) )
- rSet.Put( SvxCharReliefItem( nVal != 0 ? RELIEF_EMBOSSED : RELIEF_NONE, EE_CHAR_RELIEF ) );
+ rSet.Put( SvxCharReliefItem( nVal != 0 ? FontRelief::Embossed : FontRelief::NONE, EE_CHAR_RELIEF ) );
if ( nVal ) /* if Embossed is set, the font color depends to the fillstyle/color of the object,
if the object has no fillstyle, the font color depends to fillstyle of the background */
{
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index b54e6500b8f2..2aaf55f456b4 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1559,7 +1559,7 @@ void SVGTextWriter::writeTextPortion( const Point& rPos,
#if 0
const FontMetric aMetric( mpVDev->GetFontMetric() );
- bool bTextSpecial = aMetric.IsShadow() || aMetric.IsOutline() || (aMetric.GetRelief() != RELIEF_NONE);
+ bool bTextSpecial = aMetric.IsShadow() || aMetric.IsOutline() || (aMetric.GetRelief() != FontRelief::NONE);
if( true || !bTextSpecial )
{
@@ -2370,7 +2370,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
{
const FontMetric aMetric( mpVDev->GetFontMetric() );
- bool bTextSpecial = aMetric.IsShadow() || aMetric.IsOutline() || (aMetric.GetRelief() != RELIEF_NONE);
+ bool bTextSpecial = aMetric.IsShadow() || aMetric.IsOutline() || (aMetric.GetRelief() != FontRelief::NONE);
if( !bTextSpecial )
{
@@ -2378,7 +2378,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
}
else
{
- if( aMetric.GetRelief() != RELIEF_NONE )
+ if( aMetric.GetRelief() != FontRelief::NONE )
{
Color aReliefColor( COL_LIGHTGRAY );
Color aTextColor( mpVDev->GetTextColor() );
@@ -2393,7 +2393,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
Point aPos( rPos );
Point aOffset( 6, 6 );
- if ( aMetric.GetRelief() == RELIEF_ENGRAVED )
+ if ( aMetric.GetRelief() == FontRelief::Engraved )
{
aPos -= aOffset;
}
diff --git a/include/editeng/charreliefitem.hxx b/include/editeng/charreliefitem.hxx
index 6a01f71326bb..113678855c4b 100644
--- a/include/editeng/charreliefitem.hxx
+++ b/include/editeng/charreliefitem.hxx
@@ -36,7 +36,7 @@ class EDITENG_DLLPUBLIC SvxCharReliefItem : public SfxEnumItem
public:
static SfxPoolItem* CreateDefault();
- SvxCharReliefItem( FontRelief eValue /*= RELIEF_NONE*/,
+ SvxCharReliefItem( FontRelief eValue /*= FontRelief::NONE*/,
const sal_uInt16 nId );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
@@ -44,8 +44,10 @@ public:
virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override;
- virtual OUString GetValueTextByPos( sal_uInt16 nPos ) const override;
+ virtual OUString GetValueTextByPos( sal_uInt16 nPos ) const override;
virtual sal_uInt16 GetValueCount() const override;
+ FontRelief GetValue() const { return (FontRelief)SfxEnumItem::GetValue(); }
+ void SetValue(FontRelief f) { SfxEnumItem::SetValue((sal_uInt16)f); }
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/include/vcl/fntstyle.hxx b/include/vcl/fntstyle.hxx
index 481d0a2ff9cf..03814c2621fd 100644
--- a/include/vcl/fntstyle.hxx
+++ b/include/vcl/fntstyle.hxx
@@ -23,7 +23,7 @@
#include <sal/types.h>
#include <o3tl/typed_flags_set.hxx>
-enum FontRelief { RELIEF_NONE, RELIEF_EMBOSSED, RELIEF_ENGRAVED, FontRelief_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
+enum class FontRelief { NONE, Embossed, Engraved, FontRelief_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
enum class FontKerning
{
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index c509a0d62bd1..93f6ee9c0c11 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -674,7 +674,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
new SvxTwoLinesItem(true,0,0,ITEMID_TWOLINES),
new SvxCharRotateItem(0,false,ITEMID_CHARROTATE),
new SvxCharScaleWidthItem(100,ITEMID_CHARSCALE_W),
- new SvxCharReliefItem(RELIEF_NONE,ITEMID_CHARRELIEF),
+ new SvxCharReliefItem(FontRelief::NONE,ITEMID_CHARRELIEF),
new SvxCharHiddenItem(false,ITEMID_CHARHIDDEN),
new SvxBrushItem(ITEMID_BRUSH),
new SvxHorJustifyItem(ITEMID_HORJUSTIFY),
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 3b23782a0fc9..bb0055ca659a 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -250,7 +250,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool)
ppPoolDefaults[ ATTR_FONT_EMPHASISMARK-ATTR_STARTINDEX ] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, ATTR_FONT_EMPHASISMARK );
ppPoolDefaults[ ATTR_USERDEF - ATTR_STARTINDEX ] = new SvXMLAttrContainerItem( ATTR_USERDEF );
ppPoolDefaults[ ATTR_FONT_WORDLINE - ATTR_STARTINDEX ] = new SvxWordLineModeItem(false, ATTR_FONT_WORDLINE );
- ppPoolDefaults[ ATTR_FONT_RELIEF - ATTR_STARTINDEX ] = new SvxCharReliefItem( RELIEF_NONE, ATTR_FONT_RELIEF );
+ ppPoolDefaults[ ATTR_FONT_RELIEF - ATTR_STARTINDEX ] = new SvxCharReliefItem( FontRelief::NONE, ATTR_FONT_RELIEF );
ppPoolDefaults[ ATTR_HYPHENATE - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HYPHENATE );
ppPoolDefaults[ ATTR_SCRIPTSPACE - ATTR_STARTINDEX ] = new SvxScriptSpaceItem( false, ATTR_SCRIPTSPACE);
ppPoolDefaults[ ATTR_HANGPUNCTUATION - ATTR_STARTINDEX ] = new SvxHangingPunctuationItem( false, ATTR_HANGPUNCTUATION);
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 47c1a84296d9..eac311dfe17d 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -523,7 +523,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons
case EE_CHAR_RELIEF:
{
if (!pPoolItem)
- pPoolItem.reset(new SvxCharReliefItem(RELIEF_NONE, pEntry->mnItemID));
+ pPoolItem.reset(new SvxCharReliefItem(FontRelief::NONE, pEntry->mnItemID));
pPoolItem->PutValue(it->maValue, pEntry->mnFlag);
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index e151b8bcbae7..c19c67013d02 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -217,7 +217,7 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
rISet.Put(SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP ));
rISet.Put(SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK));
- rISet.Put(SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF));
+ rISet.Put(SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF));
rISet.Put(SvxColorItem(Color(COL_AUTO), EE_CHAR_COLOR ));
// Paragraph attributes (Edit Engine)
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index e21fa7feafed..90ce2f7905b4 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -245,7 +245,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSet.Put( SvxShadowedItem(false, EE_CHAR_SHADOW ) );
rSet.Put( SvxContourItem(false, EE_CHAR_OUTLINE ) );
rSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
- rSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
+ rSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF) );
rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) );
rSet.Put( SvxBackgroundColorItem( Color (COL_AUTO), EE_CHAR_BKGCOLOR ) );
rSet.Put( XLineStyleItem(css::drawing::LineStyle_NONE) );
@@ -363,7 +363,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rTitleSet.Put(SvxShadowedItem(false, EE_CHAR_SHADOW ));
rTitleSet.Put(SvxContourItem(false, EE_CHAR_OUTLINE ));
rTitleSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
- rTitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
+ rTitleSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF ) );
rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
rTitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
rTitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
@@ -409,7 +409,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSubtitleSet.Put(SvxShadowedItem(false, EE_CHAR_SHADOW ));
rSubtitleSet.Put(SvxContourItem(false, EE_CHAR_OUTLINE ));
rSubtitleSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
- rSubtitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
+ rSubtitleSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF ) );
rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
rSubtitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
rSubtitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
@@ -458,7 +458,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rNotesSet.Put( SvxShadowedItem(false, EE_CHAR_SHADOW ) );
rNotesSet.Put( SvxContourItem(false, EE_CHAR_OUTLINE ) );
rNotesSet.Put( SvxEmphasisMarkItem(FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ) );
- rNotesSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
+ rNotesSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF) );
rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) );
rNotesSet.Put( SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ) );
rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE ) );
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index d822a71183e7..87ee57c4aa55 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -279,7 +279,7 @@ namespace
|| LINESTYLE_NONE != rInfo.mrFont.GetUnderline()
|| STRIKEOUT_NONE != rInfo.mrFont.GetStrikeout()
|| FontEmphasisMark::NONE != (rInfo.mrFont.GetEmphasisMark() & FontEmphasisMark::Style)
- || RELIEF_NONE != rInfo.mrFont.GetRelief()
+ || FontRelief::NONE != rInfo.mrFont.GetRelief()
|| rInfo.mrFont.IsShadow()
|| bWordLineMode);
@@ -326,8 +326,8 @@ namespace
switch(rInfo.mrFont.GetRelief())
{
- case RELIEF_EMBOSSED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED; break;
- case RELIEF_ENGRAVED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED; break;
+ case FontRelief::Embossed : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED; break;
+ case FontRelief::Engraved : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED; break;
default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE
}
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 6441245fc443..fd3b63135752 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -507,7 +507,7 @@ void InitCore()
aAttrTab[ RES_CHRATR_EMPHASIS_MARK - POOLATTR_BEGIN ] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, RES_CHRATR_EMPHASIS_MARK );
aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( false, 0, 0, RES_CHRATR_TWO_LINES );
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_RELIEF - POOLATTR_BEGIN ] = new SvxCharReliefItem( FontRelief::NONE, RES_CHRATR_RELIEF );
aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( false, RES_CHRATR_HIDDEN );
aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( LINESTYLE_NONE, RES_CHRATR_OVERLINE );
aAttrTab[ RES_CHRATR_BOX - POOLATTR_BEGIN ] = new SvxBoxItem( RES_CHRATR_BOX );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 1678188120aa..59d375ec6407 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3992,7 +3992,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
bMustWrite = static_cast< const SvxCharScaleWidthItem& >(rHt).GetValue() != 100;
break;
case RES_CHRATR_RELIEF:
- bMustWrite = static_cast< const SvxCharReliefItem& >(rHt).GetValue() != RELIEF_NONE;
+ bMustWrite = static_cast< const SvxCharReliefItem& >(rHt).GetValue() != FontRelief::NONE;
break;
case RES_CHRATR_HIDDEN:
bMustWrite = static_cast< const SvxCharHiddenItem& >(rHt).GetValue();
@@ -6545,10 +6545,10 @@ void DocxAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
{
switch ( rRelief.GetValue() )
{
- case RELIEF_EMBOSSED:
+ case FontRelief::Embossed:
m_pSerializer->singleElementNS( XML_w, XML_emboss, FSEND );
break;
- case RELIEF_ENGRAVED:
+ case FontRelief::Engraved:
m_pSerializer->singleElementNS( XML_w, XML_imprint, FSEND );
break;
default:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index e0ee720cc0b0..59b6bb5abc54 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2582,10 +2582,10 @@ void RtfAttributeOutput::CharRelief(const SvxCharReliefItem& rRelief)
const sal_Char* pStr;
switch (rRelief.GetValue())
{
- case RELIEF_EMBOSSED:
+ case FontRelief::Embossed:
pStr = OOO_STRING_SVTOOLS_RTF_EMBO;
break;
- case RELIEF_ENGRAVED:
+ case FontRelief::Engraved:
pStr = OOO_STRING_SVTOOLS_RTF_IMPR;
break;
default:
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ebd51df6be9e..a987d145e4d1 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1387,8 +1387,8 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
sal_uInt16 nId;
switch ( rRelief.GetValue() )
{
- case RELIEF_EMBOSSED: nId = NS_sprm::LN_CFEmboss; break;
- case RELIEF_ENGRAVED: nId = NS_sprm::LN_CFImprint; break;
+ case FontRelief::Embossed: nId = NS_sprm::LN_CFEmboss; break;
+ case FontRelief::Engraved: nId = NS_sprm::LN_CFImprint; break;
default: nId = 0; break;
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 06d3ebca1808..c50d6d789674 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4491,13 +4491,13 @@ void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short
const SvxCharReliefItem* pOld = static_cast<const SvxCharReliefItem*>(
GetFormatAttr( RES_CHRATR_RELIEF ));
- FontRelief nNewValue = 0x854 == nId ? RELIEF_ENGRAVED
- : ( 0x858 == nId ? RELIEF_EMBOSSED
- : RELIEF_NONE );
+ FontRelief nNewValue = 0x854 == nId ? FontRelief::Engraved
+ : ( 0x858 == nId ? FontRelief::Embossed
+ : FontRelief::NONE );
if( pOld->GetValue() == nNewValue )
{
- if( RELIEF_NONE != nNewValue )
- nNewValue = RELIEF_NONE;
+ if( FontRelief::NONE != nNewValue )
+ nNewValue = FontRelief::NONE;
}
NewAttr( SvxCharReliefItem( nNewValue, RES_CHRATR_RELIEF ));
}
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index bc490ff431af..e6b2682a3a95 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -421,7 +421,7 @@ SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& rImplFont )
rOStm.WriteUChar( static_cast<sal_uInt8>(rImplFont.meKerning) );
// new in version 2
- rOStm.WriteUChar( rImplFont.meRelief );
+ rOStm.WriteUChar( (sal_uChar)rImplFont.meRelief );
rOStm.WriteUInt16( rImplFont.maCJKLanguageTag.getLanguageType( false) );
rOStm.WriteBool( rImplFont.mbVertical );
rOStm.WriteUInt16( (sal_uInt16)rImplFont.meEmphasisMark );
@@ -726,7 +726,7 @@ ImplFont::ImplFont() :
meUnderline( LINESTYLE_NONE ),
meOverline( LINESTYLE_NONE ),
meStrikeout( STRIKEOUT_NONE ),
- meRelief( RELIEF_NONE ),
+ meRelief( FontRelief::NONE ),
meEmphasisMark( FontEmphasisMark::NONE ),
meKerning( FontKerning::NONE ),
meCharSet( RTL_TEXTENCODING_DONTKNOW ),
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c04a8bdb59a1..c16205e7ad41 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8548,7 +8548,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool
aReliefColor = Color( COL_BLACK );
Font aSetFont = m_aCurrentPDFState.m_aFont;
- aSetFont.SetRelief( RELIEF_NONE );
+ aSetFont.SetRelief( FontRelief::NONE );
aSetFont.SetShadow( false );
aSetFont.SetColor( aReliefColor );
@@ -8556,7 +8556,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool
setOverlineColor( aReliefColor );
setFont( aSetFont );
long nOff = 1 + getReferenceDevice()->mnDPIX/300;
- if( eRelief == RELIEF_ENGRAVED )
+ if( eRelief == FontRelief::Engraved )
nOff = -nOff;
rLayout.DrawOffset() += Point( nOff, nOff );
@@ -8791,7 +8791,7 @@ void PDFWriterImpl::drawHorizontalGlyphs(
void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool bTextLines )
{
// relief takes precedence over shadow (see outdev3.cxx)
- if( m_aCurrentPDFState.m_aFont.GetRelief() != RELIEF_NONE )
+ if( m_aCurrentPDFState.m_aFont.GetRelief() != FontRelief::NONE )
{
drawRelief( rLayout, rText, bTextLines );
return;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 01aa8419b67c..022ba4438bd1 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1167,7 +1167,7 @@ bool OutputDevice::ImplNewFont() const
((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);
+ (maFont.GetRelief() != FontRelief::NONE);
// #95414# fix for OLE objects which use scale factors very creatively
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 2fb4c2f8eba4..67b61b9c8391 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -340,7 +340,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
FontRelief eRelief = maFont.GetRelief();
Point aOrigPos = rSalLayout.DrawBase();
- if ( eRelief != RELIEF_NONE )
+ if ( eRelief != FontRelief::NONE )
{
Color aReliefColor( COL_LIGHTGRAY );
Color aTextColor( aOldColor );
@@ -370,7 +370,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
long nOff = 1;
nOff += mnDPIX/300;
- if ( eRelief == RELIEF_ENGRAVED )
+ if ( eRelief == FontRelief::Engraved )
nOff = -nOff;
rSalLayout.DrawOffset() += Point( nOff, nOff);
ImplDrawTextDirect( rSalLayout, mbTextLines );
@@ -2482,7 +2482,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
vcl::Font aFont( GetFont() );
aFont.SetShadow( false );
aFont.SetOutline( false );
- aFont.SetRelief( RELIEF_NONE );
+ aFont.SetRelief( FontRelief::NONE );
aFont.SetOrientation( 0 );
aFont.SetFontSize( Size( mpFontInstance->maFontSelData.mnWidth, mpFontInstance->maFontSelData.mnHeight ) );
aVDev->SetFont( aFont );
@@ -2707,7 +2707,7 @@ bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
vcl::Font aFont(GetFont());
aFont.SetShadow(false);
aFont.SetOutline(false);
- aFont.SetRelief(RELIEF_NONE);
+ aFont.SetRelief(FontRelief::NONE);
aFont.SetOrientation(0);
if( bOptimize )
{