[Libreoffice-commits] core.git: 4 commits - accessibility/source basctl/source cppcanvas/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/source include/drawinglayer include/editeng include/vcl reportdesign/source sc/source sd/source sfx2/source svtools/source svx/source sw/source toolkit/test vcl/osx vcl/source

Noel Grandin noelgrandin at gmail.com
Mon May 30 06:42:33 UTC 2016


 accessibility/source/extended/accessiblelistbox.cxx                   |    2 
 basctl/source/basicide/baside2b.cxx                                   |    6 
 basctl/source/basicide/bastype2.cxx                                   |    2 
 basctl/source/basicide/macrodlg.cxx                                   |    2 
 cppcanvas/source/inc/outdevstate.hxx                                  |    4 
 cppcanvas/source/mtfrenderer/implrenderer.cxx                         |    6 
 cui/source/customize/acccfg.cxx                                       |    2 
 cui/source/customize/cfg.cxx                                          |    2 
 cui/source/customize/macropg.cxx                                      |    2 
 cui/source/dialogs/hangulhanjadlg.cxx                                 |    2 
 cui/source/dialogs/iconcdlg.cxx                                       |    2 
 cui/source/dialogs/linkdlg.cxx                                        |    2 
 cui/source/dialogs/scriptdlg.cxx                                      |    2 
 cui/source/options/dbregister.cxx                                     |    2 
 cui/source/options/fontsubs.cxx                                       |    2 
 cui/source/options/optpath.cxx                                        |    2 
 cui/source/options/treeopt.cxx                                        |    2 
 cui/source/tabpages/chardlg.cxx                                       |    2 
 cui/source/tabpages/macroass.cxx                                      |    2 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx                        |    2 
 dbaccess/source/ui/app/AppDetailView.cxx                              |    2 
 dbaccess/source/ui/app/AppIconControl.cxx                             |    2 
 dbaccess/source/ui/dlg/adtabdlg.cxx                                   |    4 
 dbaccess/source/ui/dlg/indexdialog.cxx                                |    2 
 dbaccess/source/ui/dlg/sqlmessage.cxx                                 |    2 
 dbaccess/source/ui/dlg/tablespage.cxx                                 |    2 
 dbaccess/source/ui/misc/WNameMatch.cxx                                |    2 
 dbaccess/source/ui/querydesign/TableWindow.cxx                        |    2 
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx                 |    2 
 desktop/source/app/app.cxx                                            |   22 +-
 desktop/source/app/officeipcthread.cxx                                |   14 -
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx               |    6 
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx          |   12 -
 drawinglayer/source/primitive2d/texteffectprimitive2d.cxx             |   18 +-
 drawinglayer/source/primitive2d/textprimitive2d.cxx                   |    2 
 drawinglayer/source/processor2d/vclprocessor2d.cxx                    |   10 -
 editeng/source/editeng/editsel.cxx                                    |    2 
 editeng/source/editeng/eerdll.cxx                                     |    2 
 editeng/source/editeng/impedit4.cxx                                   |    6 
 editeng/source/items/textitem.cxx                                     |   12 -
 editeng/source/outliner/outliner.cxx                                  |    2 
 editeng/source/rtf/rtfitem.cxx                                        |    4 
 extensions/source/propctrlr/selectlabeldialog.cxx                     |    2 
 extensions/source/propctrlr/taborder.cxx                              |    2 
 filter/source/flash/swfwriter1.cxx                                    |    6 
 filter/source/msfilter/svdfppt.cxx                                    |    2 
 filter/source/svg/svgwriter.cxx                                       |    8 -
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx                  |    2 
 include/drawinglayer/primitive2d/texteffectprimitive2d.hxx            |   12 -
 include/editeng/charreliefitem.hxx                                    |    6 
 include/vcl/fntstyle.hxx                                              |    2 
 include/vcl/seleng.hxx                                                |    2 
 include/vcl/svapp.hxx                                                 |   78 +++++-----
 reportdesign/source/ui/dlg/AddField.cxx                               |    2 
 reportdesign/source/ui/dlg/Navigator.cxx                              |    2 
 reportdesign/source/ui/misc/UITools.cxx                               |    2 
 sc/source/core/data/docpool.cxx                                       |    2 
 sc/source/filter/xml/xmlcelli.cxx                                     |    2 
 sc/source/ui/condformat/condformatmgr.cxx                             |    2 
 sc/source/ui/dbgui/tpsubt.cxx                                         |    2 
 sc/source/ui/miscdlgs/acredlin.cxx                                    |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                                |    2 
 sc/source/ui/miscdlgs/sharedocdlg.cxx                                 |    2 
 sc/source/ui/namedlg/namemgrtable.cxx                                 |    2 
 sc/source/ui/navipi/navipi.cxx                                        |    2 
 sc/source/ui/view/select.cxx                                          |    4 
 sd/source/core/drawdoc4.cxx                                           |    2 
 sd/source/core/stlpool.cxx                                            |    8 -
 sd/source/ui/animations/CustomAnimationList.cxx                       |    2 
 sd/source/ui/dlg/inspagob.cxx                                         |    2 
 sd/source/ui/dlg/navigatr.cxx                                         |   10 -
 sd/source/ui/dlg/sdtreelb.cxx                                         |    4 
 sfx2/source/appl/appdde.cxx                                           |    4 
 sfx2/source/appl/newhelp.cxx                                          |    2 
 sfx2/source/dialog/templdlg.cxx                                       |    2 
 sfx2/source/dialog/versdlg.cxx                                        |    4 
 svtools/source/contnr/fileview.cxx                                    |    2 
 svtools/source/contnr/iconviewimpl.cxx                                |    2 
 svtools/source/contnr/imivctl1.cxx                                    |   40 ++---
 svtools/source/contnr/svimpbox.cxx                                    |   38 ++--
 svtools/source/contnr/treelistbox.cxx                                 |   10 -
 svtools/source/inc/svimpbox.hxx                                       |    2 
 svtools/source/table/mousefunction.cxx                                |    4 
 svtools/source/table/tablecontrol.cxx                                 |    2 
 svtools/source/table/tablecontrol_impl.cxx                            |   34 ++--
 svtools/source/uno/svtxgridcontrol.cxx                                |   14 -
 svtools/source/uno/treecontrolpeer.cxx                                |   16 +-
 svx/source/form/filtnav.cxx                                           |    2 
 svx/source/form/navigatortree.cxx                                     |    2 
 svx/source/svdraw/svdotextdecomposition.cxx                           |    6 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx |    2 
 sw/source/core/bastyp/init.cxx                                        |    2 
 sw/source/filter/ww8/docxattributeoutput.cxx                          |    6 
 sw/source/filter/ww8/rtfattributeoutput.cxx                           |    4 
 sw/source/filter/ww8/ww8atr.cxx                                       |    4 
 sw/source/filter/ww8/ww8par6.cxx                                      |   10 -
 sw/source/ui/chrdlg/swuiccoll.cxx                                     |    2 
 sw/source/ui/dbui/addresslistdialog.cxx                               |    2 
 sw/source/ui/dbui/mmaddressblockpage.cxx                              |    2 
 sw/source/ui/dbui/mmoutputtypepage.cxx                                |    2 
 sw/source/ui/dbui/selectdbtabledialog.cxx                             |    2 
 sw/source/ui/dialog/uiregionsw.cxx                                    |    2 
 sw/source/ui/envelp/label1.cxx                                        |    2 
 sw/source/ui/fldui/changedb.cxx                                       |    2 
 sw/source/ui/fldui/flddinf.cxx                                        |    2 
 sw/source/ui/index/cnttab.cxx                                         |    2 
 sw/source/ui/misc/bookmark.cxx                                        |    2 
 sw/source/uibase/dbui/dbtree.cxx                                      |    2 
 sw/source/uibase/misc/redlndlg.cxx                                    |    2 
 sw/source/uibase/utlui/navipi.cxx                                     |    4 
 toolkit/test/accessibility/SelectionDialog.java                       |    2 
 vcl/osx/salmenu.cxx                                                   |    2 
 vcl/osx/vclnsapp.mm                                                   |   10 -
 vcl/source/edit/textview.cxx                                          |    2 
 vcl/source/font/font.cxx                                              |    4 
 vcl/source/gdi/pdfwriter_impl.cxx                                     |    6 
 vcl/source/outdev/font.cxx                                            |    2 
 vcl/source/outdev/text.cxx                                            |    8 -
 vcl/source/window/seleng.cxx                                          |   22 +-
 119 files changed, 332 insertions(+), 330 deletions(-)

New commits:
commit 990082f37c31380d9fedd62c5dac1b5bff4c9636
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun May 29 20:23:09 2016 +0200

    Convert FontRelief to scoped enum
    
    Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011
    Reviewed-on: https://gerrit.libreoffice.org/25626
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx
index 9478e43..2d199cc 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 bb64de5..ab398c5 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 2ea4aa6..d8cacd5 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 70647cf..ff6d694 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 0d5c118..62f7dce 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 b444d6c..1de90eb 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 07ad13a..f38fcbf 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 23243aa..72172a6 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 906367c..8b2d794 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 f10a60e..94aab74 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 7ad1513..f47ef3e 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 4ce59e4..6199da6 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 b54e650..2aaf55f 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 6a01f71..1136788 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 481d0a2..03814c2 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 c509a0d..93f6ee9 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 3b23782..bb0055c 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 47c1a84..eac311d 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 e151b8b..c19c670 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 e21fa7f..90ce2f7 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 d822a71..87ee57c 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 6441245..fd3b631 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 1678188..59d375e 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 e0ee720..59b6bb5 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 ebd51df..a987d14 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 06d3ebc..c50d6d7 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 bc490ff..e6b2682 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 c04a8bd..c16205e 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 01aa841..022ba44 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 2fb4c2f..67b61b9 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 )
     {
commit 446d0887ff5421822e0296e20cbb36f08f1e6445
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun May 29 17:20:50 2016 +0200

    Convert TextEffectStyle2D to scoped enum
    
    Change-Id: I1ef784473408a220788f0ce7550bf16809fa2cd2
    Reviewed-on: https://gerrit.libreoffice.org/25625
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index cefbbb8..c2222b2 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -248,28 +248,28 @@ namespace drawinglayer
                         // be view-dependent
                         const basegfx::BColor aBBlack(0.0, 0.0, 0.0);
                         const bool bDefaultTextColor(aBBlack == getFontColor());
-                        TextEffectStyle2D aTextEffectStyle2D(TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED);
+                        TextEffectStyle2D aTextEffectStyle2D(TextEffectStyle2D::ReliefEmbossed);
 
                         if(bDefaultTextColor)
                         {
                             if(TEXT_RELIEF_ENGRAVED == getTextRelief())
                             {
-                                aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT;
+                                aTextEffectStyle2D = TextEffectStyle2D::ReliefEngravedDefault;
                             }
                             else
                             {
-                                aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT;
+                                aTextEffectStyle2D = TextEffectStyle2D::ReliefEmbossedDefault;
                             }
                         }
                         else
                         {
                             if(TEXT_RELIEF_ENGRAVED == getTextRelief())
                             {
-                                aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED;
+                                aTextEffectStyle2D = TextEffectStyle2D::ReliefEngraved;
                             }
                             else
                             {
-                                aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED;
+                                aTextEffectStyle2D = TextEffectStyle2D::ReliefEmbossed;
                             }
                         }
 
@@ -288,7 +288,7 @@ namespace drawinglayer
                             aRetval,
                             aDecTrans.getTranslate(),
                             aDecTrans.getRotate(),
-                            TEXTEFFECTSTYLE2D_OUTLINE));
+                            TextEffectStyle2D::Outline));
                         aRetval = Primitive2DContainer { aNewTextEffect };
                     }
 
diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index cd13281..2e0838d 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -43,10 +43,10 @@ namespace drawinglayer
 
             switch(getTextEffectStyle2D())
             {
-                case TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED:
-                case TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED:
-                case TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT:
-                case TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT:
+                case TextEffectStyle2D::ReliefEmbossed:
+                case TextEffectStyle2D::ReliefEngraved:
+                case TextEffectStyle2D::ReliefEmbossedDefault:
+                case TextEffectStyle2D::ReliefEngravedDefault:
                 {
                     // prepare transform of sub-group back to (0,0) and align to X-Axis
                     basegfx::B2DHomMatrix aBackTransform(basegfx::tools::createTranslateB2DHomMatrix(
@@ -59,11 +59,11 @@ namespace drawinglayer
 
                     // create transformation for one discrete unit
                     const bool bEmbossed(
-                        TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED  == getTextEffectStyle2D()
-                        || TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT == getTextEffectStyle2D());
+                        TextEffectStyle2D::ReliefEmbossed  == getTextEffectStyle2D()
+                        || TextEffectStyle2D::ReliefEmbossedDefault == getTextEffectStyle2D());
                     const bool bDefaultTextColor(
-                        TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT == getTextEffectStyle2D()
-                        || TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT == getTextEffectStyle2D());
+                        TextEffectStyle2D::ReliefEmbossedDefault == getTextEffectStyle2D()
+                        || TextEffectStyle2D::ReliefEngravedDefault == getTextEffectStyle2D());
                     basegfx::B2DHomMatrix aTransform(aBackTransform);
                     aRetval.resize(2);
 
@@ -128,7 +128,7 @@ namespace drawinglayer
 
                     break;
                 }
-                case TEXTEFFECTSTYLE2D_OUTLINE:
+                case TextEffectStyle2D::Outline:
                 {
                     // create transform primitives in all directions
                     basegfx::B2DHomMatrix aTransform;
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 11bbc23..be1c4e7 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -205,7 +205,7 @@ namespace drawinglayer
                             aRetval,
                             aTranslate,
                             fRotate,
-                            TEXTEFFECTSTYLE2D_OUTLINE));
+                            TextEffectStyle2D::Outline));
 
                         aRetval = Primitive2DContainer { aNewTextEffect };
                     }
diff --git a/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx
index 0c66993..6b16520 100644
--- a/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx
@@ -31,13 +31,13 @@ namespace drawinglayer
     namespace primitive2d
     {
         /** TextEffectStyle2D definition */
-        enum TextEffectStyle2D
+        enum class TextEffectStyle2D
         {
-            TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT,
-            TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT,
-            TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED,
-            TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED,
-            TEXTEFFECTSTYLE2D_OUTLINE
+            ReliefEmbossedDefault,
+            ReliefEngravedDefault,
+            ReliefEmbossed,
+            ReliefEngraved,
+            Outline
         };
 
         /** TextEffectPrimitive2D class
commit c47b170c71ecdcaacf2e12e5ce28e7d411bb52e6
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun May 29 17:12:52 2016 +0200

    Convert SelectionMode to scoped enum
    
    Change-Id: I86c435de3918540cb54a0cb24568e58456c2f9d1
    Reviewed-on: https://gerrit.libreoffice.org/25611
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index a1838a4..30bd2c7 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -582,7 +582,7 @@ namespace accessibility
         {
             rStateSet.AddState( AccessibleStateType::FOCUSABLE );
             rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
-            if ( getListBox()->GetSelectionMode() == MULTIPLE_SELECTION )
+            if ( getListBox()->GetSelectionMode() == SelectionMode::Multiple )
                 rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
         }
     }
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index c8bc435..e9f9ace 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1851,7 +1851,7 @@ StackWindow::StackWindow (Layout* pParent) :
     aTreeListBox->SetAccessibleName(IDEResId(RID_STR_STACKNAME).toString());
     aTreeListBox->SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
     aTreeListBox->SetHighlightRange();
-    aTreeListBox->SetSelectionMode( NO_SELECTION );
+    aTreeListBox->SetSelectionMode( SelectionMode::NONE );
     aTreeListBox->InsertEntry( OUString() );
     aTreeListBox->Show();
 
@@ -1906,7 +1906,7 @@ void StackWindow::UpdateCalls()
     if (StarBASIC::IsRunning())
     {
         SbxError eOld = SbxBase::GetError();
-        aTreeListBox->SetSelectionMode( SINGLE_SELECTION );
+        aTreeListBox->SetSelectionMode( SelectionMode::Single );
 
         sal_Int32 nScope = 0;
         SbMethod* pMethod = StarBASIC::GetActiveMethod( nScope );
@@ -1966,7 +1966,7 @@ void StackWindow::UpdateCalls()
     }
     else
     {
-        aTreeListBox->SetSelectionMode( NO_SELECTION );
+        aTreeListBox->SetSelectionMode( SelectionMode::NONE );
         aTreeListBox->InsertEntry( OUString() );
     }
 
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 20a4ecc..3fcaae4 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -180,7 +180,7 @@ TreeListBox::TreeListBox (vcl::Window* pParent, WinBits nStyle)
 void TreeListBox::Init()
 {
     SetNodeDefaultImages();
-    SetSelectionMode( SINGLE_SELECTION );
+    SetSelectionMode( SelectionMode::Single );
     nMode = 0xFF;   // everything
 }
 
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 5051928..2d583f7 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -70,7 +70,7 @@ MacroChooser::MacroChooser( vcl::Window* pParnt, bool bCreateEntries )
     get(m_pNewLibButton, "newlibrary");
     get(m_pNewModButton, "newmodule");
 
-    m_pMacroBox->SetSelectionMode( SINGLE_SELECTION );
+    m_pMacroBox->SetSelectionMode( SelectionMode::Single );
     m_pMacroBox->SetHighlightRange(); // select over the whole width
 
     m_pRunButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index b12b59c..588965a 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -795,7 +795,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const
 
     // initialize Entriesbox
     m_pEntriesBox->SetStyle(m_pEntriesBox->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN);
-    m_pEntriesBox->SetSelectionMode(SINGLE_SELECTION);
+    m_pEntriesBox->SetSelectionMode(SelectionMode::Single);
     m_pEntriesBox->SetTabs(&AccCfgTabs[0]);
     m_pEntriesBox->Resize(); // OS: Hack for right selection
     m_pEntriesBox->SetSpaceBetweenEntries(0);
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 7b0178b..eec86095 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1622,7 +1622,7 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox(vcl::Window* pParent, SvxConfigPage
     SetEntryHeight( ENTRY_HEIGHT );
 
     SetHighlightRange();
-    SetSelectionMode(SINGLE_SELECTION);
+    SetSelectionMode(SelectionMode::Single);
 
     SetDragDropMode( DragDropMode::CTRL_MOVE  |
                      DragDropMode::APP_COPY   |
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 4447889..0c32d0b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -727,7 +727,7 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla
 
     rListBox.SetSelectHdl( LINK( this, SvxMacroTabPage_, SelectEvent_Impl ));
 
-    rListBox.SetSelectionMode( SINGLE_SELECTION );
+    rListBox.SetSelectionMode( SelectionMode::Single );
     rListBox.SetTabs( &nTabs[0] );
     Size aSize( nTabs[ 2 ], 0 );
     rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 80c4be1..5586c0f8 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1117,7 +1117,7 @@ namespace svx
         m_pDictsLB->set_height_request(m_pDictsLB->GetTextHeight() * 5);
         m_pDictsLB->set_width_request(m_pDictsLB->approximate_char_width() * 32);
         m_pDictsLB->SetStyle( m_pDictsLB->GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE );
-        m_pDictsLB->SetSelectionMode( SINGLE_SELECTION );
+        m_pDictsLB->SetSelectionMode( SelectionMode::Single );
         m_pDictsLB->SetHighlightRange();
         m_pDictsLB->SetSelectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) );
         m_pDictsLB->SetDeselectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) );
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 6a22c26..666d825 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -182,7 +182,7 @@ IconChoiceDialog::IconChoiceDialog ( vcl::Window* pParent, const OUString& rID,
     m_pIconCtrl->SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) );
     m_pIconCtrl->Show();
     m_pIconCtrl->SetChoiceWithCursor();
-    m_pIconCtrl->SetSelectionMode( SINGLE_SELECTION );
+    m_pIconCtrl->SetSelectionMode( SelectionMode::Single );
     m_pIconCtrl->SetHelpId( HID_ICCDIALOG_CHOICECTRL );
 
     // ItemSet
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 1d4e1fb..75a9cda 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -112,7 +112,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
     get(m_pPbChangeSource, "CHANGE_SOURCE");
     get(m_pPbBreakLink, "BREAK_LINK");
 
-    m_pTbLinks->SetSelectionMode( MULTIPLE_SELECTION );
+    m_pTbLinks->SetSelectionMode( SelectionMode::Multiple );
     m_pTbLinks->SetTabs( &nTabs[0] );
     FixedText *pFtFiles = get<FixedText>("FILES");
     pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MAP_APPFONT).Width());
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index ec995ee..2dabd1c 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -84,7 +84,7 @@ SFTreeListBox::SFTreeListBox(vcl::Window* pParent)
     , m_sMyMacros(CUI_RESSTR(RID_SVXSTR_MYMACROS))
     , m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS))
 {
-    SetSelectionMode( SINGLE_SELECTION );
+    SetSelectionMode( SelectionMode::Single );
 
     SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL |
                    WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HIDESELECTION |
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index c3a422c..46034fb 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -147,7 +147,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons
     m_pPathBox->SetStyle( m_pPathBox->GetStyle()|nBits );
     m_pPathBox->SetDoubleClickHdl( LINK( this, DbRegistrationOptionsPage, PathBoxDoubleClickHdl ) );
     m_pPathBox->SetSelectHdl( LINK( this, DbRegistrationOptionsPage, PathSelect_Impl ) );
-    m_pPathBox->SetSelectionMode( SINGLE_SELECTION );
+    m_pPathBox->SetSelectionMode( SelectionMode::Single );
     m_pPathBox->SetPosSizePixel( Point( 0, aHeadSize.Height() ),
                                Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) );
     m_pPathBox->SvSimpleTable::SetTabs( aTabs );
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 6423568..30e9d5e 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -67,7 +67,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent,
     m_pCheckLB->SetHelpId(HID_OFA_FONT_SUBST_CLB);
 
     m_pCheckLB->SetStyle(m_pCheckLB->GetStyle()|WB_HSCROLL|WB_VSCROLL);
-    m_pCheckLB->SetSelectionMode(MULTIPLE_SELECTION);
+    m_pCheckLB->SetSelectionMode(SelectionMode::Multiple);
     m_pCheckLB->SortByCol(2);
     long aStaticTabs[] = { 4, 0, 0, 0, 0 };
     m_pCheckLB->SvSimpleTable::SetTabs(&aStaticTabs[0]);
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 2a52540..14fa478 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -231,7 +231,7 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
 
     pPathBox->SetDoubleClickHdl( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) );
     pPathBox->SetSelectHdl( LINK( this, SvxPathTabPage, PathSelect_Impl ) );
-    pPathBox->SetSelectionMode( MULTIPLE_SELECTION );
+    pPathBox->SetSelectionMode( SelectionMode::Multiple );
     pPathBox->SetHighlightRange();
 
     xDialogListener->SetDialogClosedLink( LINK( this, SvxPathTabPage, DialogClosedHdl ) );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 6cf6e03..a2d47e0 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -785,7 +785,7 @@ void OfaTreeOptionsDialog::InitTreeAndHandler()
                            WB_HASLINES | WB_HASLINESATROOT |
                            WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE | WB_QUICK_SEARCH );
     pTreeLB->SetSpaceBetweenEntries( 0 );
-    pTreeLB->SetSelectionMode( SINGLE_SELECTION );
+    pTreeLB->SetSelectionMode( SelectionMode::Single );
     pTreeLB->SetSublistOpenWithLeftRight();
     pTreeLB->SetExpandedHdl( LINK( this, OfaTreeOptionsDialog, ExpandedHdl_Impl ) );
     pTreeLB->SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) );
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 0b2a038..0842da4 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -383,7 +383,7 @@ void SfxMacroTabPage_::InitAndSetHandler()
     mpImpl->pGroupLB->SetSelectHdl( LINK( this, SfxMacroTabPage_, SelectGroup_Impl ));
     mpImpl->pMacroLB->SetSelectHdl( LINK( this, SfxMacroTabPage_, SelectMacro_Impl ));
 
-    rListBox.SetSelectionMode( SINGLE_SELECTION );
+    rListBox.SetSelectionMode( SelectionMode::Single );
     rListBox.SetTabs( &nTabs[0] );
     Size aSize( nTabs[ 2 ], 0 );
     rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 836059f..4c1a541 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -738,7 +738,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
     _pTreeView->SetStyle(_pTreeView->GetStyle() | WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP);
     _pTreeView->GetModel()->SetSortMode(SortAscending);
     _pTreeView->EnableCheckButton( nullptr ); // do not show any buttons
-    _pTreeView->SetSelectionMode(MULTIPLE_SELECTION);
+    _pTreeView->SetSelectionMode(SelectionMode::Multiple);
 
     _pTreeView->SetDefaultCollapsedEntryBmp( _rImage );
     _pTreeView->SetDefaultExpandedEntryBmp( _rImage );
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 6a481b3..4e26e02 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -79,7 +79,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
 {
     sal_uInt16 nSize = SPACEBETWEENENTRIES;
     SetSpaceBetweenEntries(nSize);
-    SetSelectionMode( NO_SELECTION );
+    SetSelectionMode( SelectionMode::NONE );
     SetExtendedWinBits( EWB_NO_AUTO_CURENTRY );
     SetNodeDefaultImages( );
     EnableEntryMnemonics();
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 078b224..1298cc9 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -57,7 +57,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
     }
 
     SetChoiceWithCursor();
-    SetSelectionMode(SINGLE_SELECTION);
+    SetSelectionMode(SelectionMode::Single);
 }
 
 OApplicationIconControl::~OApplicationIconControl()
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 1cb57da..91e96fa 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -344,12 +344,12 @@ OAddTableDlg::OAddTableDlg( vcl::Window* pParent, IAddTableDialogContext& _rCont
     m_pTableList->EnableInplaceEditing( false );
     m_pTableList->SetStyle(m_pTableList->GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL );
     m_pTableList->EnableCheckButton( nullptr ); // do not show any buttons
-    m_pTableList->SetSelectionMode( SINGLE_SELECTION );
+    m_pTableList->SetSelectionMode( SelectionMode::Single );
     m_pTableList->notifyHiContrastChanged();
     m_pTableList->suppressEmptyFolders();
 
     m_pQueryList->EnableInplaceEditing( false );
-    m_pQueryList->SetSelectionMode( SINGLE_SELECTION );
+    m_pQueryList->SetSelectionMode( SelectionMode::Single );
 
     if ( !m_rContext.allowQueries() )
     {
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 56a63f7..5613a5f 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -211,7 +211,7 @@ namespace dbaui
 
         m_pIndexList->SetSelectHdl(LINK(this, DbaIndexDialog, OnIndexSelected));
         m_pIndexList->SetEndEditHdl(LINK(this, DbaIndexDialog, OnEntryEdited));
-        m_pIndexList->SetSelectionMode(SINGLE_SELECTION);
+        m_pIndexList->SetSelectionMode(SelectionMode::Single);
         m_pIndexList->SetHighlightRange();
         m_pIndexList->setConnection(m_xConnection);
 
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 5408b2f..4de77cc 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -314,7 +314,7 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti
     m_sStatusLabel = ModuleRes( STR_EXCEPTION_STATUS );
     m_sErrorCodeLabel = ModuleRes( STR_EXCEPTION_ERRORCODE );
 
-    m_pExceptionList->SetSelectionMode(SINGLE_SELECTION);
+    m_pExceptionList->SetSelectionMode(SelectionMode::Single);
     m_pExceptionList->SetDragDropMode(DragDropMode::NONE);
     m_pExceptionList->EnableInplaceEditing(false);
     m_pExceptionList->SetStyle(m_pExceptionList->GetStyle() | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL);
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index e8051d8..127ea3a 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -86,7 +86,7 @@ namespace dbaui
         m_pTablesList->SetCheckHandler(LINK(this,OGenericAdministrationPage,OnControlModified));
 
         // initialize the TabListBox
-        m_pTablesList->SetSelectionMode( MULTIPLE_SELECTION );
+        m_pTablesList->SetSelectionMode( SelectionMode::Multiple );
         m_pTablesList->SetDragDropMode( DragDropMode::NONE );
         m_pTablesList->EnableInplaceEditing( false );
         m_pTablesList->SetStyle(m_pTablesList->GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT);
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 68c91aa..e5a5e962 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -365,7 +365,7 @@ OColumnTreeBox::OColumnTreeBox( vcl::Window* pParent, WinBits nBits )
     SetDragDropMode( DragDropMode::NONE );
     EnableInplaceEditing( false );
     SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL | nBits);
-    SetSelectionMode( SINGLE_SELECTION );
+    SetSelectionMode( SelectionMode::Single );
 }
 
 VCL_BUILDER_FACTORY(OColumnTreeBox)
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index d7dbc5e..10d3fd4e 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -303,7 +303,7 @@ bool OTableWindow::Init()
     {
         m_xListBox = CreateListBox();
         OSL_ENSURE( m_xListBox != nullptr, "OTableWindow::Init() : CreateListBox returned NULL !" );
-        m_xListBox->SetSelectionMode( MULTIPLE_SELECTION );
+        m_xListBox->SetSelectionMode( SelectionMode::Multiple );
     }
 
     // Set the title
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index ab38fcc..6e5ba06 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -51,7 +51,7 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent )
     m_aScrollTimer.SetTimeout( SCROLLING_TIMESPAN );
     SetDoubleClickHdl( LINK(this, OTableWindowListBox, OnDoubleClick) );
 
-    SetSelectionMode(SINGLE_SELECTION);
+    SetSelectionMode(SelectionMode::Single);
 
     SetHighlightRange( );
 }
diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx
index b852af7..46d0140 100644
--- a/editeng/source/editeng/editsel.cxx
+++ b/editeng/source/editeng/editsel.cxx
@@ -84,7 +84,7 @@ void EditSelFunctionSet::DeselectAll()
 
 EditSelectionEngine::EditSelectionEngine() : SelectionEngine( nullptr )
 {
-    SetSelectionMode( RANGE_SELECTION );
+    SetSelectionMode( SelectionMode::Range );
     EnableDrag( true );
 }
 
diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx
index c693408..b8193a3 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -60,7 +60,7 @@ namespace pcr
         get(m_pNoAssignment, "noassignment");
 
         // initialize the TreeListBox
-        m_pControlTree->SetSelectionMode( SINGLE_SELECTION );
+        m_pControlTree->SetSelectionMode( SelectionMode::Single );
         m_pControlTree->SetDragDropMode( DragDropMode::NONE );
         m_pControlTree->EnableInplaceEditing( false );
         m_pControlTree->SetStyle(m_pControlTree->GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL);
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 6528ba3..4d7ce61 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -297,7 +297,7 @@ namespace pcr
         SetDragDropMode(DragDropMode::ALL/*DragDropMode::CTRL_MOVE*/);
             // Hmm. The flag alone is not enough, so to be on the safe side ...
 
-        SetSelectionMode( MULTIPLE_SELECTION );
+        SetSelectionMode( SelectionMode::Multiple );
     }
 
     VCL_BUILDER_DECL_FACTORY(TabOrderListBox)
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 506f76e..6216673 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1413,7 +1413,7 @@ XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl
 
     static long nTabs[] = {2, 0, nTabSize };
 
-    SetSelectionMode( MULTIPLE_SELECTION );
+    SetSelectionMode( SelectionMode::Multiple );
     SetTabs( &nTabs[0], MAP_PIXEL );
     SetScrolledHdl( LINK( this, XMLFilterListBox, TabBoxScrollHdl_Impl ) );
     SetHighlightRange();
diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx
index 2f3ee27..32625a7 100644
--- a/include/vcl/seleng.hxx
+++ b/include/vcl/seleng.hxx
@@ -34,7 +34,7 @@ class CommandEvent;
 #define SELENG_AUTOREPEAT_INTERVAL_MIN 25
 #define SELENG_AUTOREPEAT_INTERVAL_MAX 300
 
-enum SelectionMode { NO_SELECTION, SINGLE_SELECTION, RANGE_SELECTION, MULTIPLE_SELECTION };
+enum class SelectionMode { NONE, Single, Range, Multiple };
 
 
 class VCL_DLLPUBLIC FunctionSet
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 5cfeb75..3d7ee4f 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -105,7 +105,7 @@ OAddFieldWindowListBox::OAddFieldWindowListBox( OAddFieldWindow* _pParent )
     ,m_pTabWin( _pParent )
 {
     SetHelpId( HID_RPT_FIELD_SEL );
-    SetSelectionMode(MULTIPLE_SELECTION);
+    SetSelectionMode(SelectionMode::Multiple);
     SetDragDropMode( DragDropMode::ALL );
     SetHighlightRange( );
 }
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index f8e6364..0413884 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -244,7 +244,7 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll
 
     SetDragDropMode(DragDropMode::ALL);
     EnableInplaceEditing( false );
-    SetSelectionMode(MULTIPLE_SELECTION);
+    SetSelectionMode(SelectionMode::Multiple);
     Clear();
 
     m_aDropActionTimer.SetTimeoutHdl(LINK(this, NavigatorTree, OnDropActionTimer));
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 69ad5a2..a8c0ecc 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -30,7 +30,7 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(SvSimpleTableContainer& rPa
 
     Init();
     Show();
-    SetSelectionMode(MULTIPLE_SELECTION);
+    SetSelectionMode(SelectionMode::Multiple);
 }
 
 OUString ScCondFormatManagerWindow::createEntryString(const ScConditionalFormat& rFormat)
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 82e1422..c483f46 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -58,7 +58,7 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( vcl::Window* pParent,
     mpLbFunctions->set_height_request(nHeight);
 
     // Font is correctly initialized by SvTreeListBox ctor
-    mpLbColumns->SetSelectionMode( SINGLE_SELECTION );
+    mpLbColumns->SetSelectionMode( SelectionMode::Single );
     mpLbColumns->SetDragDropMode( DragDropMode::NONE );
     mpLbColumns->SetSpaceBetweenEntries( 0 );
 
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 696b01c..407bd39 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -133,7 +133,7 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
     pTheView->SetDeselectHdl( LINK(this, ScAcceptChgDlg, SelectHandle));
     pTheView->SetCommandHdl( LINK(this, ScAcceptChgDlg, CommandHdl));
     pTheView->SetColCompareHdl( LINK(this, ScAcceptChgDlg,ColCompareHdl));
-    pTheView->SetSelectionMode(MULTIPLE_SELECTION);
+    pTheView->SetSelectionMode(SelectionMode::Multiple);
     pTheView->SetHighlightRange(1);
 
     Init();
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 7b17d76..2d4e8cf 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -418,7 +418,7 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
     m_pLbConflicts->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::VCENTER );
 
     m_pLbConflicts->SetStyle( m_pLbConflicts->GetStyle() | WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL );
-    m_pLbConflicts->SetSelectionMode( MULTIPLE_SELECTION );
+    m_pLbConflicts->SetSelectionMode( SelectionMode::Multiple );
     m_pLbConflicts->SetHighlightRange();
 
     maSelectionIdle.SetPriority( SchedulerPriority::LOW );
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 213b93a..9ac5a5c 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -101,7 +101,7 @@ ScShareDocumentDlg::ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewD
     aHeader += "\t";
     aHeader += get<FixedText>("accessed")->GetText();
     m_pLbUsers->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::VCENTER );
-    m_pLbUsers->SetSelectionMode( NO_SELECTION );
+    m_pLbUsers->SetSelectionMode( SelectionMode::NONE );
 
     UpdateView();
 }
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 6abb349..eedf33c 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -60,7 +60,7 @@ ScRangeManagerTable::ScRangeManagerTable(SvSimpleTableContainer& rParent,
     UpdateViewSize();
     Init();
     ShowTable();
-    SetSelectionMode(MULTIPLE_SELECTION);
+    SetSelectionMode(SelectionMode::Multiple);
     SetScrolledHdl( LINK( this, ScRangeManagerTable, ScrollHdl ) );
     HeaderEndDragHdl(nullptr);
 }
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index ce339cc..862b985 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -631,7 +631,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
     aLbEntries->InitWindowBits(true);
 
     aLbEntries->SetSpaceBetweenEntries(0);
-    aLbEntries->SetSelectionMode( SINGLE_SELECTION );
+    aLbEntries->SetSelectionMode( SelectionMode::Single );
     aLbEntries->SetDragDropMode( DragDropMode::CTRL_MOVE |
                                  DragDropMode::CTRL_COPY |
                                  DragDropMode::ENABLE_TOP );
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index acc8e8b..bcceb4a 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -751,7 +751,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( vcl::Window* pWindow, ScTabView* p
         SelectionEngine( pWindow, &pView->GetFunctionSet() ),
         eWhich( eSplitPos )
 {
-    SetSelectionMode( MULTIPLE_SELECTION );
+    SetSelectionMode( SelectionMode::Multiple );
     EnableDrag( true );
 }
 
@@ -945,7 +945,7 @@ void ScHeaderFunctionSet::DeselectAll()
 ScHeaderSelectionEngine::ScHeaderSelectionEngine( vcl::Window* pWindow, ScHeaderFunctionSet* pFuncSet ) :
         SelectionEngine( pWindow, pFuncSet )
 {
-    SetSelectionMode( MULTIPLE_SELECTION );
+    SetSelectionMode( SelectionMode::Multiple );
     EnableDrag( false );
 }
 
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index ddb14db..e6a63fa 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -463,7 +463,7 @@ CustomAnimationList::CustomAnimationList( vcl::Window* pParent )
 {
 
     EnableContextMenuHandling();
-    SetSelectionMode( MULTIPLE_SELECTION );
+    SetSelectionMode( SelectionMode::Multiple );
     SetOptimalImageIndent();
     SetNodeDefaultImages();
 }
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index b0f8bad..5e9ca96 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -74,7 +74,7 @@ void SdInsertPagesObjsDlg::Reset()
 {
     if( pMedium )
     {
-        m_pLbTree->SetSelectionMode( MULTIPLE_SELECTION );
+        m_pLbTree->SetSelectionMode( SelectionMode::Multiple );
 
         // transfer ownership of Medium
         m_pLbTree->Fill( mpDoc, pMedium, rName );
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index b761777..e6b5e52 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -103,7 +103,7 @@ SdNavigatorWin::SdNavigatorWin(
     long nListboxYPos = maToolbox->GetPosPixel().Y() + maToolbox->GetSizePixel().Height() + 4;
     maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
     maTlbObjects->SetDoubleClickHdl( LINK( this, SdNavigatorWin, ClickObjectHdl ) );
-    maTlbObjects->SetSelectionMode( SINGLE_SELECTION );
+    maTlbObjects->SetSelectionMode( SelectionMode::Single );
     // set focus to listbox, otherwise it is in the toolbox which is only useful
     // for keyboard navigation
     maTlbObjects->GrabFocus();
@@ -465,10 +465,10 @@ IMPL_LINK_TYPED( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu, bool )
                 if( maTlbObjects->GetSelectionCount() > 1 )
                     maTlbObjects->SelectAll( false );
 
-                maTlbObjects->SetSelectionMode( SINGLE_SELECTION );
+                maTlbObjects->SetSelectionMode( SelectionMode::Single );
             }
             else
-                maTlbObjects->SetSelectionMode( MULTIPLE_SELECTION );
+                maTlbObjects->SetSelectionMode( SelectionMode::Multiple );
         }
     }
     return false;
@@ -601,7 +601,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
             if (xMedium->IsStorage())
             {
                 // Now depending on mode:
-                // maTlbObjects->SetSelectionMode(MULTIPLE_SELECTION);
+                // maTlbObjects->SetSelectionMode(SelectionMode::Multiple);
                 // handover of ownership of xMedium;
                 SdDrawDocument* pDropDoc = maTlbObjects->GetBookmarkDoc(xMedium.release());
 
@@ -917,7 +917,7 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
 
             if( !pNavigatorWin->maTlbObjects->HasSelectedChildren( aPageName ) )
             {
-                if( pNavigatorWin->maTlbObjects->GetSelectionMode() == MULTIPLE_SELECTION )
+                if( pNavigatorWin->maTlbObjects->GetSelectionMode() == SelectionMode::Multiple )
                 {
                     // because otherwise it is always additional select
                     pNavigatorWin->maTlbObjects->SelectAll( false );
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 0e0babd..ba371ad 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1143,7 +1143,7 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
         // targets.  This prevents moving shapes from one page to another.
 
         // Select all entries and disable them as drop targets.
-        SetSelectionMode(MULTIPLE_SELECTION);
+        SetSelectionMode(SelectionMode::Multiple);
         SetCursor(static_cast<SvTreeListEntry*>(nullptr));
         SelectAll(true, false);
         EnableSelectionAsDropTarget(false);
@@ -1162,7 +1162,7 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
 
         // Set selection back to the entry under the mouse.
         SelectAll(false, false);
-        SetSelectionMode(SINGLE_SELECTION);
+        SetSelectionMode(SelectionMode::Single);
         Select(pEntry);
 
         // We can delete the Navigator from ExecuteDrag (when switching to
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 94b7073..39babcd 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -276,7 +276,7 @@ ContentListBox_Impl::ContentListBox_Impl(vcl::Window* pParent, WinBits nStyle)
     SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL );
 
     SetEntryHeight( 16 );
-    SetSelectionMode( SINGLE_SELECTION );
+    SetSelectionMode( SelectionMode::Single );
     SetSpaceBetweenEntries( 2 );
     SetNodeBitmaps( aClosedBookImage, aOpenBookImage );
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 9e43750..a6bf7d5 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -854,7 +854,7 @@ void SfxCommonTemplateDialog_Impl::Initialize()
     aFilterLb->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FilterSelectHdl ) );
     aFmtLb->SetDoubleClickHdl( LINK( this, SfxCommonTemplateDialog_Impl, TreeListApplyHdl ) );
     aFmtLb->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FmtSelectHdl ) );
-    aFmtLb->SetSelectionMode(MULTIPLE_SELECTION);
+    aFmtLb->SetSelectionMode(SelectionMode::Multiple);
 
 
     aFilterLb->Show();
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 0d98e7d..985dd1d 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -227,7 +227,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion
 
     m_pVersionBox->GrabFocus();
     m_pVersionBox->SetStyle( m_pVersionBox->GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN );
-    m_pVersionBox->SetSelectionMode( SINGLE_SELECTION );
+    m_pVersionBox->SetSelectionMode( SelectionMode::Single );
 
     long nTabs_Impl[] = { 3, 0, 0, 0 };
 
@@ -548,7 +548,7 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame )
 
     m_pVersionBox->GrabFocus();
     m_pVersionBox->SetStyle( m_pVersionBox->GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN );
-    m_pVersionBox->SetSelectionMode( SINGLE_SELECTION );
+    m_pVersionBox->SetSelectionMode( SelectionMode::Single );
 
     long nTabs_Impl[] = { 3, 0, 0, 0 };
 
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 7ccefa5..d287cea 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -523,7 +523,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin,
     SetHighlightRange();
     SetEntryHeight( ROW_HEIGHT );
     if (nFlags & FileViewFlags::MULTISELECTION)
-        SetSelectionMode( MULTIPLE_SELECTION );
+        SetSelectionMode( SelectionMode::Multiple );
 
     Show();
     if( mbShowHeader )
diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx
index 55242a3..5328d50 100644
--- a/svtools/source/contnr/iconviewimpl.cxx
+++ b/svtools/source/contnr/iconviewimpl.cxx
@@ -419,7 +419,7 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR
     if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
     {
         // do not select if multiselection or explicit set
-        bool bNotSelect = (aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
+        bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
         SetCursor(pStartEntry, bNotSelect);
     }
 
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 77f358d..75c79f3 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -115,7 +115,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
     bUpdateMode = true;
     bEntryEditingEnabled = false;
     bHighlightFramePressed = false;
-    eSelectionMode = MULTIPLE_SELECTION;
+    eSelectionMode = SelectionMode::Multiple;
     pView = pCurView;
     pZOrderList = new SvxIconChoiceCtrlEntryList_impl();
     ePositionMode = IcnViewPositionModeFree;
@@ -230,7 +230,7 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
     if( nWinBits & (WB_SMALLICON | WB_DETAILS) )
         nCurTextDrawFlags = DRAWTEXT_FLAGS_SMALLICON;
     if( nWinBits & WB_NOSELECTION )
-        eSelectionMode = NO_SELECTION;
+        eSelectionMode = SelectionMode::NONE;
     if( !(nWinStyle & (WB_ALIGN_TOP | WB_ALIGN_LEFT)))
         nWinBits |= WB_ALIGN_LEFT;
     if( (nWinStyle & WB_DETAILS))
@@ -353,7 +353,7 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
 void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, bool bSelect,
     bool bAdd, bool bSyncPaint )
 {
-    if( eSelectionMode == NO_SELECTION )
+    if( eSelectionMode == SelectionMode::NONE )
         return;
 
     if( !bAdd )
@@ -392,7 +392,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected(SvxIconChoiceCtrlEntry* pEntry, bool
     // When using SingleSelection, make sure that the cursor is always placed
     // over the (only) selected entry. (But only if a cursor exists.)
     if (bSelect && pCursor &&
-        eSelectionMode == SINGLE_SELECTION &&
+        eSelectionMode == SelectionMode::Single &&
         pEntry != pCursor)
     {
         SetCursor(pEntry);
@@ -728,7 +728,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
     if( pEntry )
         MakeEntryVisible( pEntry, false );
 
-    if( rMEvt.IsShift() && eSelectionMode != SINGLE_SELECTION )
+    if( rMEvt.IsShift() && eSelectionMode != SelectionMode::Single )
     {
         if( pEntry )
             SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), true);
@@ -737,7 +737,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
 
     if( pAnchor && (rMEvt.IsShift() || rMEvt.IsMod1())) // keyboard selection?
     {
-        DBG_ASSERT(eSelectionMode != SINGLE_SELECTION,"Invalid selection mode");
+        DBG_ASSERT(eSelectionMode != SelectionMode::Single,"Invalid selection mode");
         if( rMEvt.IsMod1() )
             nFlags |= IconChoiceFlags::AddMode;
 
@@ -769,7 +769,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
     {
         if( !pEntry )
         {
-            if( eSelectionMode == MULTIPLE_SELECTION )
+            if( eSelectionMode == SelectionMode::Multiple )
             {
                 if( !rMEvt.IsMod1() )  // Ctrl
                 {
@@ -810,7 +810,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
                 EditEntry( pEntry );
             }
         }
-        else if( eSelectionMode == SINGLE_SELECTION )
+        else if( eSelectionMode == SelectionMode::Single )
         {
             DeselectAllBut( pEntry );
             SetCursor( pEntry );
@@ -820,7 +820,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
                 nFlags |= IconChoiceFlags::StartEditTimerInMouseUp;
             }
         }
-        else if( eSelectionMode == NO_SELECTION )
+        else if( eSelectionMode == SelectionMode::NONE )
         {
             if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) )
             {
@@ -938,7 +938,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
     {
         SvxIconChoiceCtrlEntry* pFilterEntry = nullptr;
         bool bDeselectAll = false;
-        if( eSelectionMode != SINGLE_SELECTION )
+        if( eSelectionMode != SelectionMode::Single )
         {
             if( !bMod1 && !bShift )
                 bDeselectAll = true;
@@ -1004,7 +1004,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
     bool bMod1 = rKEvt.GetKeyCode().IsMod1();
     bool bShift = rKEvt.GetKeyCode().IsShift();
 
-    if( eSelectionMode == SINGLE_SELECTION || eSelectionMode == NO_SELECTION)
+    if( eSelectionMode == SelectionMode::Single || eSelectionMode == SelectionMode::NONE)
     {
         bShift = false;
         bMod1 = false;
@@ -1117,7 +1117,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
             break;
 
         case KEY_SPACE:
-            if( pCursor && eSelectionMode != SINGLE_SELECTION )
+            if( pCursor && eSelectionMode != SelectionMode::Single )
             {
                 if( !bMod1 )
                 {
@@ -1154,7 +1154,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
         case KEY_ADD:
         case KEY_DIVIDE :
         case KEY_A:
-            if( bMod1 && (eSelectionMode != SINGLE_SELECTION))
+            if( bMod1 && (eSelectionMode != SelectionMode::Single))
                 SelectAll();
             else
                 bKeyUsed = false;
@@ -1510,7 +1510,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSel
 
     bool bSolidTextRect = false;
 
-    if(bDropTarget && (eSelectionMode != NO_SELECTION))
+    if(bDropTarget && (eSelectionMode != SelectionMode::NONE))
     {
         rRenderContext.SetFillColor(rSettings.GetHighlightColor());
         bSolidTextRect = true;
@@ -1592,7 +1592,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
 {
     bool bSelected = false;
 
-    if (eSelectionMode != NO_SELECTION)
+    if (eSelectionMode != SelectionMode::NONE)
         bSelected = pEntry->IsSelected();
 
     bool bCursored = pEntry->IsCursored();
@@ -1605,7 +1605,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
     Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText));
     Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos));
 
-    bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != NO_SELECTION));
+    bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != SelectionMode::NONE));
 
     bool bActiveSelection = (0 != (nWinBits & WB_NOHIDESELECTION)) || pView->HasFocus();
 
@@ -1992,7 +1992,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry )
 {
     if( pEntry == pCursor )
     {
-        if( pCursor && eSelectionMode == SINGLE_SELECTION &&
+        if( pCursor && eSelectionMode == SelectionMode::Single &&
                 !pCursor->IsSelected() )
             SelectEntry( pCursor, true );
         return;
@@ -2003,14 +2003,14 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry )
     if( pOldCursor )
     {
         pOldCursor->ClearFlags( SvxIconViewFlags::FOCUSED );
-        if( eSelectionMode == SINGLE_SELECTION )
+        if( eSelectionMode == SelectionMode::Single )
             SelectEntry( pOldCursor, false ); // deselect old cursor
     }
     if( pCursor )
     {
         ToTop( pCursor );
         pCursor->SetFlags( SvxIconViewFlags::FOCUSED );
-        if( eSelectionMode == SINGLE_SELECTION )
+        if( eSelectionMode == SelectionMode::Single )
             SelectEntry( pCursor, true );
         ShowCursor( true );
     }
@@ -2996,7 +2996,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
     if( !GetSelectionCount() )
         return nullptr;
 
-    if( (nWinBits & WB_HIGHLIGHTFRAME) && (eSelectionMode == NO_SELECTION) )
+    if( (nWinBits & WB_HIGHLIGHTFRAME) && (eSelectionMode == SelectionMode::NONE) )
     {
         return pCurHighlightFrame;
     }
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index d380870..fd412c9 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -64,7 +64,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
     aSelEng.SetFunctionSet( static_cast<FunctionSet*>(&aFctSet) );
     aSelEng.ExpandSelectionOnMouseMove( false );
     SetStyle( nWinStyle );
-    SetSelectionMode( SINGLE_SELECTION );
+    SetSelectionMode( SelectionMode::Single );
     SetDragDropMode( DragDropMode::NONE );
 
     aVerSBar->SetScrollHdl( LINK( this, SvImpLBox, ScrollUpDownHdl ) );
@@ -240,7 +240,7 @@ void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect )
 void SvImpLBox::SetStyle( WinBits i_nWinStyle )
 {
     m_nStyle = i_nWinStyle;
-    if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) )
+    if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == SelectionMode::Multiple ) )
         aSelEng.AddAlways( true );
 }
 
@@ -643,7 +643,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
         // multiple selection: select in cursor move if we're not in
         // Add mode (Ctrl-F8)
         else if( GetUpdateMode() &&
-                 pView->GetSelectionMode() == MULTIPLE_SELECTION &&
+                 pView->GetSelectionMode() == SelectionMode::Multiple &&
                  !(nFlags & LBoxFlags::DeselectAll) && !aSelEng.IsAddMode() &&
                  !bForceNoSelect )
         {
@@ -661,7 +661,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
 
         if( pAnchor )
         {
-            DBG_ASSERT(aSelEng.GetSelectionMode() != SINGLE_SELECTION,"Mode?");
+            DBG_ASSERT(aSelEng.GetSelectionMode() != SelectionMode::Single,"Mode?");
             SetAnchorSelection( pOldCursor, pCursor );
         }
     }
@@ -853,7 +853,7 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint)
         if( pEntry )
         {
             if( pEntry != pCursor &&
-                 aSelEng.GetSelectionMode() == SINGLE_SELECTION
+                 aSelEng.GetSelectionMode() == SelectionMode::Single
             )
                 pView->Select( pCursor, false );
         }
@@ -930,7 +930,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
     if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
     {
         // do not select if multiselection or explicit set
-        bool bNotSelect = (aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
+        bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
         SetCursor(pStartEntry, bNotSelect);
     }
 
@@ -1600,7 +1600,7 @@ void SvImpLBox::EntrySelected( SvTreeListEntry* pEntry, bool bSelect )
 
     nFlags &= (~LBoxFlags::DeselectAll);
     if( bSelect &&
-        aSelEng.GetSelectionMode() == SINGLE_SELECTION &&
+        aSelEng.GetSelectionMode() == SelectionMode::Single &&
         pEntry != pCursor )
     {
         SetCursor( pEntry );
@@ -2069,13 +2069,13 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
             return;
         // Inplace-Editing?
     }
-    if ( aSelEng.GetSelectionMode() != NO_SELECTION )
+    if ( aSelEng.GetSelectionMode() != SelectionMode::NONE )
         aSelEng.SelMouseButtonDown( rMEvt );
 }
 
 void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
 {
-    if ( !ButtonUpCheckCtrl( rMEvt ) && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
+    if ( !ButtonUpCheckCtrl( rMEvt ) && ( aSelEng.GetSelectionMode() != SelectionMode::NONE ) )
         aSelEng.SelMouseButtonUp( rMEvt );
     EndScroll();
     if( nFlags & LBoxFlags::StartEditTimer )
@@ -2091,7 +2091,7 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
 void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
 {
     SvTreeListEntry* pEntry = GetClickedEntry( rMEvt.GetPosPixel() );
-    if ( !MouseMoveCheckCtrl( rMEvt, pEntry ) && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
+    if ( !MouseMoveCheckCtrl( rMEvt, pEntry ) && ( aSelEng.GetSelectionMode() != SelectionMode::NONE ) )
         aSelEng.SelMouseMove( rMEvt );
     return;
 }
@@ -2337,11 +2337,11 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
             break;
 
         case KEY_SPACE:
-            if ( pView->GetSelectionMode() != NO_SELECTION )
+            if ( pView->GetSelectionMode() != SelectionMode::NONE )
             {
                 if ( bMod1 )
                 {
-                    if ( pView->GetSelectionMode() == MULTIPLE_SELECTION && !bShift )
+                    if ( pView->GetSelectionMode() == SelectionMode::Multiple && !bShift )
                         // toggle selection
                         pView->Select( pCursor, !pView->IsSelected( pCursor ) );
                 }
@@ -2390,7 +2390,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
             break;
 
         case KEY_F8:
-            if( bShift && pView->GetSelectionMode()==MULTIPLE_SELECTION &&
+            if( bShift && pView->GetSelectionMode()==SelectionMode::Multiple &&
                 !(m_nStyle & WB_SIMPLEMODE))
             {
                 if( aSelEng.IsAlwaysAdding() )
@@ -2846,11 +2846,11 @@ void SvImpLBox::SelAllDestrAnch(
 void SvImpLBox::SetSelectionMode( SelectionMode eSelMode  )
 {
     aSelEng.SetSelectionMode( eSelMode);
-    if( eSelMode == SINGLE_SELECTION )
+    if( eSelMode == SelectionMode::Single )
         bSimpleTravel = true;
     else
         bSimpleTravel = false;
-    if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) )
+    if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == SelectionMode::Multiple) )
         aSelEng.AddAlways( true );
 }
 
@@ -2969,7 +2969,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
                     pView->SetCursor( pClickedEntry );
                 }
             }
-            else if( aSelEng.GetSelectionMode() == SINGLE_SELECTION )
+            else if( aSelEng.GetSelectionMode() == SelectionMode::Single )
             {
                 bClickedIsFreePlace = true;
                 sal_Int32               nSelectedEntries = pView->GetSelectionCount();
@@ -3090,14 +3090,14 @@ void SvImpLBox::Invalidate()
 
 void SvImpLBox::SetCurEntry( SvTreeListEntry* pEntry )
 {
-    if  (  ( aSelEng.GetSelectionMode() != SINGLE_SELECTION )
-        && ( aSelEng.GetSelectionMode() != NO_SELECTION )
+    if  (  ( aSelEng.GetSelectionMode() != SelectionMode::Single )
+        && ( aSelEng.GetSelectionMode() != SelectionMode::NONE )
         )
         SelAllDestrAnch( false );
     if ( pEntry )
         MakeVisible( pEntry );
     SetCursor( pEntry );
-    if ( pEntry && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
+    if ( pEntry && ( aSelEng.GetSelectionMode() != SelectionMode::NONE ) )
         pView->Select( pEntry );
 }
 
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index dd742ae..fc72252 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -338,7 +338,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
     mbContextBmpExpanded(false),
     mbAlternatingRowColors(false),
     mbUpdateAlternatingRows(false),
-    eSelMode(NO_SELECTION),
+    eSelMode(SelectionMode::NONE),
     nMinWidthInChars(0),
     mbCenterAndClipText(false)
 {
@@ -353,7 +353,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
     pModel->InsertView( this );
     pHdlEntry = nullptr;
     pEdCtrl = nullptr;
-    eSelMode = SINGLE_SELECTION;
+    eSelMode = SelectionMode::Single;
     nDragDropMode = DragDropMode::NONE;
     SetType(WINDOW_TREELISTBOX);
 
@@ -370,7 +370,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, const ResId& rResId) :
     mbContextBmpExpanded(false),
     mbAlternatingRowColors(false),
     mbUpdateAlternatingRows(false),
-    eSelMode(NO_SELECTION),
+    eSelMode(SelectionMode::NONE),
     nMinWidthInChars(0),
     mbCenterAndClipText(false)
 {
@@ -2372,7 +2372,7 @@ void SvTreeListBox::SelectAll( bool bSelect, bool )
     pImpl->SelAllDestrAnch(
         bSelect,
         true,       // delete anchor,
-        true );     // even when using SINGLE_SELECTION, deselect the cursor
+        true );     // even when using SelectionMode::Single, deselect the cursor
 }
 
 void SvTreeListBox::ModelHasInsertedTree( SvTreeListEntry* pEntry )
@@ -2682,7 +2682,7 @@ void SvTreeListBox::EditedText( const OUString& rStr )
         }
         if( GetSelectionCount() == 0 )
             Select( pEdEntry );
-        if( GetSelectionMode() == MULTIPLE_SELECTION && !GetCurEntry() )
+        if( GetSelectionMode() == SelectionMode::Multiple && !GetCurEntry() )
             SetCurEntry( pEdEntry );
     }
 }
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 7d32014..cca5fc9 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -218,7 +218,7 @@ protected:
     SelectionEngine         aSelEng;
     sal_uLong               nVisibleCount;  // Number of lines in control
     bool                    bInVScrollHdl : 1;
-    bool                    bSimpleTravel : 1; // ist true bei SINGLE_SELECTION
+    bool                    bSimpleTravel : 1; // ist true bei SelectionMode::Single
     long                    nNextVerVisSize;
     long                    nNodeBmpTabDistance; // typical smaller than 0
 
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx
index 676b979..bb01268 100644
--- a/svtools/source/table/mousefunction.cxx
+++ b/svtools/source/table/mousefunction.cxx
@@ -175,7 +175,7 @@ namespace svt { namespace table
         TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
         if ( tableCell.nRow >= 0 )
         {
-            if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION )
+            if ( i_tableControl.getSelEngine()->GetSelectionMode() == SelectionMode::NONE )
             {
                 i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow );
                 handled = true;
@@ -197,7 +197,7 @@ namespace svt { namespace table
         TableCell const tableCell = i_tableControl.hitTest( i_event.GetPosPixel() );
         if ( tableCell.nRow >= 0 )
         {
-            if ( i_tableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION )
+            if ( i_tableControl.getSelEngine()->GetSelectionMode() != SelectionMode::NONE )
             {
                 i_tableControl.getSelEngine()->SelMouseButtonUp( i_event );
             }
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 9689d9ec..643778c 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -424,7 +424,7 @@ namespace svt { namespace table
 
                 rStateSet.AddState( AccessibleStateType::FOCUSABLE );
 
-                if ( m_pImpl->getSelEngine()->GetSelectionMode() == MULTIPLE_SELECTION )
+                if ( m_pImpl->getSelEngine()->GetSelectionMode() == SelectionMode::Multiple )
                     rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE);
 
                 if ( HasChildPathFocus() )
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index b8eb95c..f87c0f1 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -248,7 +248,7 @@ namespace svt { namespace table
         ,m_pAccessibleTable     ( nullptr                          )
     {
         m_pSelEngine = new SelectionEngine( m_pDataWindow.get(), m_pTableFunctionSet );
-        m_pSelEngine->SetSelectionMode(SINGLE_SELECTION);
+        m_pSelEngine->SetSelectionMode(SelectionMode::Single);
         m_pDataWindow->SetPosPixel( Point( 0, 0 ) );
         m_pDataWindow->Show();
     }
@@ -1308,7 +1308,7 @@ namespace svt { namespace table
         switch ( _eAction )
         {
         case cursorDown:
-        if ( m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION )
+        if ( m_pSelEngine->GetSelectionMode() == SelectionMode::Single )
         {
             //if other rows already selected, deselect them
             if(!m_aSelectedRows.empty())
@@ -1336,7 +1336,7 @@ namespace svt { namespace table
             break;
 
         case cursorUp:
-        if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
+        if(m_pSelEngine->GetSelectionMode() == SelectionMode::Single)
         {
             if(!m_aSelectedRows.empty())
             {
@@ -1420,7 +1420,7 @@ namespace svt { namespace table
 
         case cursorSelectRow:
         {
-            if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
+            if(m_pSelEngine->GetSelectionMode() == SelectionMode::NONE)
                 return bSuccess = false;

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list