[Libreoffice-commits] core.git: chart2/source cui/source editeng/source filter/source forms/source include/editeng include/svx reportdesign/source sc/source sd/qa sd/source svx/source sw/qa sw/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Mar 8 06:31:26 UTC 2017


 chart2/source/controller/main/DrawCommandDispatch.cxx   |    2 
 cui/source/tabpages/numpages.cxx                        |   20 ++---
 cui/source/tabpages/paragrph.cxx                        |   48 ++++++-------
 editeng/source/editeng/eehtml.cxx                       |   12 +--
 editeng/source/editeng/eerdll.cxx                       |    2 
 editeng/source/editeng/impedit2.cxx                     |   12 +--
 editeng/source/editeng/impedit3.cxx                     |   16 ++--
 editeng/source/editeng/impedit4.cxx                     |    4 -
 editeng/source/items/numitem.cxx                        |    4 -
 editeng/source/items/paraitem.cxx                       |   25 ++----
 editeng/source/outliner/outliner.cxx                    |    8 +-
 editeng/source/rtf/rtfitem.cxx                          |    8 +-
 editeng/source/uno/unonrule.cxx                         |   19 ++---
 filter/source/msfilter/svdfppt.cxx                      |    2 
 forms/source/richtext/rtattributehandler.cxx            |   26 +++----
 include/editeng/adjustitem.hxx                          |   34 ++++-----
 include/editeng/svxenum.hxx                             |   15 ++--
 include/svx/nbdtmg.hxx                                  |    2 
 reportdesign/source/ui/report/ReportSection.cxx         |    2 
 sc/source/core/data/patattr.cxx                         |   20 ++---
 sc/source/core/tool/autoform.cxx                        |    4 -
 sc/source/filter/excel/xiescher.cxx                     |   30 ++++----
 sc/source/filter/rtf/eeimpars.cxx                       |    2 
 sc/source/filter/xcl97/xcl97rec.cxx                     |    8 +-
 sc/source/ui/Accessibility/AccessiblePageHeader.cxx     |    6 -
 sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx |   12 +--
 sc/source/ui/Accessibility/AccessibleText.cxx           |    2 
 sc/source/ui/app/inputhdl.cxx                           |   14 +--
 sc/source/ui/app/inputwin.cxx                           |    2 
 sc/source/ui/drawfunc/drtxtob.cxx                       |   24 +++---
 sc/source/ui/drawfunc/drtxtob2.cxx                      |    2 
 sc/source/ui/drawfunc/fuconcustomshape.cxx              |    2 
 sc/source/ui/pagedlg/tphfedit.cxx                       |    2 
 sc/source/ui/view/gridwin.cxx                           |   10 +-
 sc/source/ui/view/output2.cxx                           |   38 +++++-----
 sc/source/ui/view/printfun.cxx                          |    8 +-
 sc/source/ui/view/viewdata.cxx                          |   14 +--
 sd/qa/unit/misc-tests.cxx                               |   12 ++-
 sd/source/core/drawdoc4.cxx                             |   12 +--
 sd/source/core/sdpage.cxx                               |   12 +--
 sd/source/core/stlpool.cxx                              |    8 +-
 sd/source/ui/func/fuconcs.cxx                           |    2 
 sd/source/ui/func/fuconrec.cxx                          |    2 
 sd/source/ui/view/drtxtob.cxx                           |    8 +-
 sd/source/ui/view/drtxtob1.cxx                          |   28 +++----
 sd/source/ui/view/drviews3.cxx                          |    8 +-
 sd/source/ui/view/drviewsf.cxx                          |    8 +-
 svx/source/dialog/paraprev.cxx                          |   20 ++---
 svx/source/sdr/properties/textproperties.cxx            |    2 
 svx/source/svdraw/svdotextdecomposition.cxx             |    6 -
 sw/qa/extras/uiwriter/uiwriter.cxx                      |   20 +++--
 sw/source/core/bastyp/init.cxx                          |    2 
 sw/source/core/crsr/crstrvl.cxx                         |   10 +-
 sw/source/core/doc/DocumentStylePoolManager.cxx         |    8 +-
 sw/source/core/doc/htmltbl.cxx                          |    6 -
 sw/source/core/doc/tblafmt.cxx                          |    2 
 sw/source/core/edit/autofmt.cxx                         |   16 ++--
 sw/source/core/table/swtable.cxx                        |    8 +-
 sw/source/core/text/EnhancedPDFExportHelper.cxx         |   10 +-
 sw/source/core/text/frmform.cxx                         |    4 -
 sw/source/core/text/guess.cxx                           |    6 -
 sw/source/core/text/itradj.cxx                          |   14 +--
 sw/source/core/text/itrcrsr.cxx                         |   22 +++---
 sw/source/core/text/itrform2.cxx                        |    8 +-
 sw/source/core/text/itrtxt.hxx                          |    6 -
 sw/source/core/text/porlay.cxx                          |    2 
 sw/source/core/text/pormulti.cxx                        |    4 -
 sw/source/core/text/porrst.cxx                          |    4 -
 sw/source/core/text/txtfld.cxx                          |    4 -
 sw/source/core/text/txtfrm.cxx                          |    6 -
 sw/source/core/text/txtftn.cxx                          |    6 -
 sw/source/core/unocore/unosett.cxx                      |    9 +-
 sw/source/filter/html/css1atr.cxx                       |    8 +-
 sw/source/filter/html/htmlatr.cxx                       |   10 +-
 sw/source/filter/html/htmlcss1.cxx                      |    8 +-
 sw/source/filter/html/htmlctxt.cxx                      |    2 
 sw/source/filter/html/htmldrawreader.cxx                |    2 
 sw/source/filter/html/htmlform.cxx                      |    2 
 sw/source/filter/html/htmlsect.cxx                      |    6 -
 sw/source/filter/html/htmltab.cxx                       |   58 ++++++++--------
 sw/source/filter/html/svxcss1.cxx                       |   18 ++--
 sw/source/filter/html/swhtml.cxx                        |   34 ++++-----
 sw/source/filter/ww8/docxattributeoutput.cxx            |   16 ++--
 sw/source/filter/ww8/rtfattributeoutput.cxx             |   14 +--
 sw/source/filter/ww8/wrtw8num.cxx                       |    6 -
 sw/source/filter/ww8/ww8atr.cxx                         |   10 +-
 sw/source/filter/ww8/ww8par.cxx                         |    4 -
 sw/source/filter/ww8/ww8par2.cxx                        |    4 -
 sw/source/filter/ww8/ww8par3.cxx                        |   20 ++---
 sw/source/filter/ww8/ww8par6.cxx                        |   24 +++---
 sw/source/ui/dialog/uiregionsw.cxx                      |    4 -
 sw/source/ui/misc/num.cxx                               |   10 +-
 sw/source/ui/table/tautofmt.cxx                         |    4 -
 sw/source/uibase/app/docshini.cxx                       |    2 
 sw/source/uibase/ribbar/concustomshape.cxx              |    2 
 sw/source/uibase/shells/annotsh.cxx                     |   30 ++++----
 sw/source/uibase/shells/drwtxtex.cxx                    |   31 ++++----
 sw/source/uibase/shells/txtattr.cxx                     |   54 ++++++++------
 sw/source/uibase/shells/txtnum.cxx                      |    2 
 sw/source/uibase/wrtsh/wrtsh1.cxx                       |    2 
 100 files changed, 584 insertions(+), 569 deletions(-)

New commits:
commit 9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Mar 7 11:19:35 2017 +0200

    convert SvxAdjust to scoped enum
    
    Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639
    Reviewed-on: https://gerrit.libreoffice.org/34941
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 9072f31..e52994d 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -167,7 +167,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
             }
             if ( !bAttributesAppliedFromGallery )
             {
-                pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
+                pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, 0 ) );
                 pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
                 pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
                 pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 7ebc6d1..edd9a15 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1583,9 +1583,9 @@ void SvxNumOptionsTabPage::InitControls()
     if(bSameAdjust)
     {
         sal_Int32 nPos = 1; // centered
-        if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+        if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
             nPos = 0;
-        else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+        else if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
             nPos = 2;
         m_pAlignLB->SelectEntryPos(nPos);
     }
@@ -2265,11 +2265,11 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl( Edit* pEdit )
             else //align
             {
                 sal_Int32 nPos = m_pAlignLB->GetSelectEntryPos();
-                SvxAdjust eAdjust = SVX_ADJUST_CENTER;
+                SvxAdjust eAdjust = SvxAdjust::Center;
                 if(nPos == 0)
-                    eAdjust = SVX_ADJUST_LEFT;
+                    eAdjust = SvxAdjust::Left;
                 else if(nPos == 2)
-                    eAdjust = SVX_ADJUST_RIGHT;
+                    eAdjust = SvxAdjust::Right;
                 aNumFmt.SetNumAdjust( eAdjust );
             }
             pActNum->SetLevel(i, aNumFmt);
@@ -2898,9 +2898,9 @@ void SvxNumPositionTabPage::InitControls()
     if(bSameAdjust)
     {
         sal_Int32 nPos = 1; // centered
-        if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+        if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
             nPos = 0;
-        else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+        else if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
             nPos = 2;
         m_pAlignLB->SelectEntryPos(nPos);
         m_pAlign2LB->SelectEntryPos( nPos );
@@ -3207,11 +3207,11 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, EditModifyHdl_Impl, ListBox&, void)
             const sal_Int32 nPos = m_pAlignLB->IsVisible()
                                 ? m_pAlignLB->GetSelectEntryPos()
                                 : m_pAlign2LB->GetSelectEntryPos();
-            SvxAdjust eAdjust = SVX_ADJUST_CENTER;
+            SvxAdjust eAdjust = SvxAdjust::Center;
             if(nPos == 0)
-                eAdjust = SVX_ADJUST_LEFT;
+                eAdjust = SvxAdjust::Left;
             else if(nPos == 2)
-                eAdjust = SVX_ADJUST_RIGHT;
+                eAdjust = SvxAdjust::Right;
             aNumFmt.SetNumAdjust( eAdjust );
             pActNum->SetLevel(i, aNumFmt);
         }
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 5a3e94cf..6387621 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1093,29 +1093,29 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
     bool bModified = false;
 
     bool bAdj = false, bChecked = false;
-    SvxAdjust eAdjust = SVX_ADJUST_LEFT;
+    SvxAdjust eAdjust = SvxAdjust::Left;
 
     if ( m_pLeft->IsChecked() )
     {
-        eAdjust = SVX_ADJUST_LEFT;
+        eAdjust = SvxAdjust::Left;
         bAdj = !m_pLeft->GetSavedValue();
         bChecked = true;
     }
     else if ( m_pRight->IsChecked() )
     {
-        eAdjust = SVX_ADJUST_RIGHT;
+        eAdjust = SvxAdjust::Right;
         bAdj = !m_pRight->GetSavedValue();
         bChecked = true;
     }
     else if ( m_pCenter->IsChecked() )
     {
-        eAdjust = SVX_ADJUST_CENTER;
+        eAdjust = SvxAdjust::Center;
         bAdj = !m_pCenter->GetSavedValue();
         bChecked = true;
     }
     else if ( m_pJustify->IsChecked() )
     {
-        eAdjust = SVX_ADJUST_BLOCK;
+        eAdjust = SvxAdjust::Block;
         bAdj = !m_pJustify->GetSavedValue() ||
             m_pExpandCB->IsValueChangedFromSaved() ||
             m_pLastLineLB->IsValueChangedFromSaved();
@@ -1127,15 +1127,15 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
     {
         const SvxAdjustItem* pOld = static_cast<const SvxAdjustItem*>(GetOldItem( *rOutSet, SID_ATTR_PARA_ADJUST ));
 
-        SvxAdjust eOneWord = m_pExpandCB->IsChecked() ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT;
+        SvxAdjust eOneWord = m_pExpandCB->IsChecked() ? SvxAdjust::Block : SvxAdjust::Left;
 
         sal_Int32 nLBPos = m_pLastLineLB->GetSelectEntryPos();
-        SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+        SvxAdjust eLastBlock = SvxAdjust::Left;
 
         if ( 1 == nLBPos )
-            eLastBlock = SVX_ADJUST_CENTER;
+            eLastBlock = SvxAdjust::Center;
         else if ( 2 == nLBPos )
-            eLastBlock = SVX_ADJUST_BLOCK;
+            eLastBlock = SvxAdjust::Block;
 
         bool bNothingWasChecked =
             !m_pLeft->GetSavedValue() && !m_pRight->GetSavedValue() &&
@@ -1190,13 +1190,13 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
 
         switch ( rAdj.GetAdjust() /*!!! ask VB rAdj.GetLastBlock()*/ )
         {
-            case SVX_ADJUST_LEFT: m_pLeft->Check(); break;
+            case SvxAdjust::Left: m_pLeft->Check(); break;
 
-            case SVX_ADJUST_RIGHT: m_pRight->Check(); break;
+            case SvxAdjust::Right: m_pRight->Check(); break;
 
-            case SVX_ADJUST_CENTER: m_pCenter->Check(); break;
+            case SvxAdjust::Center: m_pCenter->Check(); break;
 
-            case SVX_ADJUST_BLOCK: m_pJustify->Check(); break;
+            case SvxAdjust::Block: m_pJustify->Check(); break;
             default: ; //prevent warning
         }
         bool bEnable = m_pJustify->IsChecked();
@@ -1205,15 +1205,15 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
 
         switch(rAdj.GetLastBlock())
         {
-            case SVX_ADJUST_LEFT:  nLBSelect = 0; break;
+            case SvxAdjust::Left:  nLBSelect = 0; break;
 
-            case SVX_ADJUST_CENTER: nLBSelect = 1;  break;
+            case SvxAdjust::Center: nLBSelect = 1;  break;
 
-            case SVX_ADJUST_BLOCK: nLBSelect = 2;  break;
+            case SvxAdjust::Block: nLBSelect = 2;  break;
             default: ; //prevent warning
         }
         m_pExpandCB->Enable(bEnable && nLBSelect == 2);
-        m_pExpandCB->Check(SVX_ADJUST_BLOCK == rAdj.GetOneWord());
+        m_pExpandCB->Check(SvxAdjust::Block == rAdj.GetOneWord());
     }
     else
     {
@@ -1324,20 +1324,20 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox&, void)
 void SvxParaAlignTabPage::UpdateExample_Impl()
 {
     if ( m_pLeft->IsChecked() )
-        m_pExampleWin->SetAdjust( SVX_ADJUST_LEFT );
+        m_pExampleWin->SetAdjust( SvxAdjust::Left );
     else if ( m_pRight->IsChecked() )
-        m_pExampleWin->SetAdjust( SVX_ADJUST_RIGHT );
+        m_pExampleWin->SetAdjust( SvxAdjust::Right );
     else if ( m_pCenter->IsChecked() )
-        m_pExampleWin->SetAdjust( SVX_ADJUST_CENTER );
+        m_pExampleWin->SetAdjust( SvxAdjust::Center );
     else if ( m_pJustify->IsChecked() )
     {
-        m_pExampleWin->SetAdjust( SVX_ADJUST_BLOCK );
-        SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+        m_pExampleWin->SetAdjust( SvxAdjust::Block );
+        SvxAdjust eLastBlock = SvxAdjust::Left;
         sal_Int32 nLBPos = m_pLastLineLB->GetSelectEntryPos();
         if(nLBPos == 1)
-            eLastBlock = SVX_ADJUST_CENTER;
+            eLastBlock = SvxAdjust::Center;
         else if(nLBPos == 2)
-            eLastBlock = SVX_ADJUST_BLOCK;
+            eLastBlock = SvxAdjust::Block;
         m_pExampleWin->SetLastLine( eLastBlock );
     }
 
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index b76fbe8..965a18a 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -217,7 +217,7 @@ void EditHTMLParser::NextToken( int nToken )
                                 SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
                                 aItems.ClearItem( EE_PARA_JUST );
                                 if ( nToken == HTML_CENTER_ON )
-                                    aItems.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+                                    aItems.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
                                 mpEditEngine->SetParaAttribsOnly(nNode, aItems);
                             }
                             break;
@@ -698,7 +698,7 @@ void EditHTMLParser::StartPara( bool bReal )
     if ( bReal )
     {
         const HTMLOptions& aOptions = GetOptions();
-        SvxAdjust eAdjust = SVX_ADJUST_LEFT;
+        SvxAdjust eAdjust = SvxAdjust::Left;
         for (const auto & aOption : aOptions)
         {
             switch( aOption.GetToken() )
@@ -707,13 +707,13 @@ void EditHTMLParser::StartPara( bool bReal )
                 {
                     OUString const& rTmp(aOption.GetString());
                     if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_right))
-                        eAdjust = SVX_ADJUST_RIGHT;
+                        eAdjust = SvxAdjust::Right;
                     else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_middle))
-                        eAdjust = SVX_ADJUST_CENTER;
+                        eAdjust = SvxAdjust::Center;
                     else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_center))
-                        eAdjust = SVX_ADJUST_CENTER;
+                        eAdjust = SvxAdjust::Center;
                     else
-                        eAdjust = SVX_ADJUST_LEFT;
+                        eAdjust = SvxAdjust::Left;
                 }
                 break;
             }
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 94f9760..f2c2980 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -123,7 +123,7 @@ std::vector<SfxPoolItem*>* GlobalEditData::GetDefItems()
         rDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE );
         rDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE );
         rDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL );
-        rDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+        rDefItems[14] = new SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST );
         rDefItems[15] = new SvxTabStopItem( 0, 0, SvxTabAdjust::Left, EE_PARA_TABS );
         rDefItems[16] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, EE_PARA_JUST_METHOD );
         rDefItems[17] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, EE_PARA_VER_JUST );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index ad99ca9..1341ec7 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1993,7 +1993,7 @@ sal_uInt8 ImpEditEngine::GetRightToLeft( sal_Int32 nPara, sal_Int32 nPos, sal_In
 
 SvxAdjust ImpEditEngine::GetJustification( sal_Int32 nPara ) const
 {
-    SvxAdjust eJustification = SVX_ADJUST_LEFT;
+    SvxAdjust eJustification = SvxAdjust::Left;
 
     if ( !aStatus.IsOutliner() )
     {
@@ -2001,10 +2001,10 @@ SvxAdjust ImpEditEngine::GetJustification( sal_Int32 nPara ) const
 
         if ( IsRightToLeft( nPara ) )
         {
-            if ( eJustification == SVX_ADJUST_LEFT )
-                eJustification = SVX_ADJUST_RIGHT;
-            else if ( eJustification == SVX_ADJUST_RIGHT )
-                eJustification = SVX_ADJUST_LEFT;
+            if ( eJustification == SvxAdjust::Left )
+                eJustification = SvxAdjust::Right;
+            else if ( eJustification == SvxAdjust::Right )
+                eJustification = SvxAdjust::Left;
         }
     }
     return eJustification;
@@ -3126,7 +3126,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine,
             break;
             case PortionKind::TEXT:
             {
-                if ( ( eJustification != SVX_ADJUST_BLOCK ) || ( !bIgnoreExtraSpace ) )
+                if ( ( eJustification != SvxAdjust::Block ) || ( !bIgnoreExtraSpace ) )
                 {
                     nWidth += rTextPortion.GetSize().Width();
                 }
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 1453427..10ae540 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -525,7 +525,7 @@ void ImpEditEngine::CheckAutoPageSize()
                 ParaPortion* pParaPortion = GetParaPortions()[nPara];
                 ContentNode* pNode = pParaPortion->GetNode();
                 SvxAdjust eJustification = GetJustification( nPara );
-                if ( eJustification != SVX_ADJUST_LEFT )
+                if ( eJustification != SvxAdjust::Left )
                 {
                     pParaPortion->MarkSelectionInvalid( 0, pNode->Len() );
                     CreateLines( nPara, 0 );  // 0: For AutoPageSize no TextRange!
@@ -1457,14 +1457,14 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
         pLine->SetTextWidth( aTextSize.Width() );
         switch ( eJustification )
         {
-            case SVX_ADJUST_CENTER:
+            case SvxAdjust::Center:
             {
                 long n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
                 n += nStartX;  // Indentation is kept.
                 pLine->SetStartPosX( n );
             }
             break;
-            case SVX_ADJUST_RIGHT:
+            case SvxAdjust::Right:
             {
                 // For automatically wrapped lines, which has a blank at the end
                 // the blank must not be displayed!
@@ -1473,7 +1473,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
                 pLine->SetStartPosX( n );
             }
             break;
-            case SVX_ADJUST_BLOCK:
+            case SvxAdjust::Block:
             {
                 bool bDistLastLine = (GetJustifyMethod(nPara) == SvxCellJustifyMethod::Distribute);
                 long nRemainingSpace = nMaxLineWidth - aTextSize.Width();
@@ -1691,9 +1691,9 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
         long nTextXOffset = 0;
         if ( nMaxLineWidth < 0 )
             nMaxLineWidth = 1;
-        if ( eJustification ==  SVX_ADJUST_CENTER )
+        if ( eJustification ==  SvxAdjust::Center )
             nStartX = nMaxLineWidth / 2;
-        else if ( eJustification ==  SVX_ADJUST_RIGHT )
+        else if ( eJustification ==  SvxAdjust::Right )
             nStartX = nMaxLineWidth;
 
         nStartX = nStartX + nTextXOffset;
@@ -1997,9 +1997,9 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
 
     if ( !bCompressBlank && !bHangingPunctuation )
     {
-        // When justification is not SVX_ADJUST_LEFT, it's important to compress
+        // When justification is not SvxAdjust::Left, it's important to compress
         // the trailing space even if there is enough room for the space...
-        // Don't check for SVX_ADJUST_LEFT, doesn't matter to compress in this case too...
+        // Don't check for SvxAdjust::Left, doesn't matter to compress in this case too...
         DBG_ASSERT( nBreakPos > pLine->GetStart(), "ImpBreakLines - BreakPos not expected!" );
         if ( pNode->GetChar( nBreakPos-1 ) == ' ' )
             bCompressBlank = true;
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 53fe083..2a5f702 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -769,9 +769,9 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
             SvxAdjust eJustification = static_cast<const SvxAdjustItem&>(rItem).GetAdjust();
             switch ( eJustification )
             {
-                case SVX_ADJUST_CENTER: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QC );
+                case SvxAdjust::Center: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QC );
                                         break;
-                case SVX_ADJUST_RIGHT:  rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QR );
+                case SvxAdjust::Right:  rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QR );
                                         break;
                 default:                rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QL );
                                         break;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 54eef3e..695e00f 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -150,7 +150,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
 SvxNumberFormat::SvxNumberFormat( SvxNumType eType,
                                   SvxNumPositionAndSpaceMode ePositionAndSpaceMode )
     : SvxNumberType(eType),
-      eNumAdjust(SVX_ADJUST_LEFT),
+      eNumAdjust(SvxAdjust::Left),
       nInclUpperLevels(0),
       nStart(1),
       cBullet(SVX_DEF_BULLET),
@@ -255,7 +255,7 @@ void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverte
     rStream.WriteUInt16( NUMITEM_VERSION_04 );
 
     rStream.WriteUInt16( GetNumberingType() );
-    rStream.WriteUInt16( eNumAdjust );
+    rStream.WriteUInt16( (sal_uInt16)eNumAdjust );
     rStream.WriteUInt16( nInclUpperLevels );
     rStream.WriteUInt16( nStart );
     rStream.WriteUInt16( cBullet );
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 760e77f..2a99d6e 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/style/LineSpacingMode.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/extract.hxx>
 #include <unotools/syslocale.hxx>
 #include <comphelper/types.hxx>
 #include <tools/mapunit.hxx>
@@ -54,7 +55,7 @@ using namespace ::com::sun::star;
 
 
 SfxPoolItem* SvxLineSpacingItem::CreateDefault() { return new  SvxLineSpacingItem(LINE_SPACE_DEFAULT_HEIGHT, 0);}
-SfxPoolItem* SvxAdjustItem::CreateDefault() { return new  SvxAdjustItem(SVX_ADJUST_LEFT, 0);}
+SfxPoolItem* SvxAdjustItem::CreateDefault() { return new  SvxAdjustItem(SvxAdjust::Left, 0);}
 SfxPoolItem* SvxWidowsItem::CreateDefault() { return new  SvxWidowsItem(0, 0);}
 SfxPoolItem* SvxOrphansItem::CreateDefault() { return new  SvxOrphansItem(0, 0);}
 SfxPoolItem* SvxHyphenZoneItem::CreateDefault() { return new  SvxHyphenZoneItem(false, 0);}
@@ -375,22 +376,16 @@ bool SvxAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
         case MID_LAST_LINE_ADJUST :
         {
             sal_Int32 eVal = - 1;
-            try
-            {
-                eVal = ::comphelper::getEnumAsINT32(rVal);
-            }
-            catch(...) {}
+            ::cppu::enum2int(eVal,rVal);
             if(eVal >= 0 && eVal <= 4)
             {
+                SvxAdjust eAdjust = (SvxAdjust)eVal;
                 if(MID_LAST_LINE_ADJUST == nMemberId &&
-                    eVal != SVX_ADJUST_LEFT &&
-                    eVal != SVX_ADJUST_BLOCK &&
-                    eVal != SVX_ADJUST_CENTER)
+                    eAdjust != SvxAdjust::Left &&
+                    eAdjust != SvxAdjust::Block &&
+                    eAdjust != SvxAdjust::Center)
                         return false;
-                if(eVal < (sal_uInt16)SVX_ADJUST_END)
-                    nMemberId == MID_PARA_ADJUST ?
-                        SetAdjust((SvxAdjust)eVal) :
-                            SetLastBlock((SvxAdjust)eVal);
+                nMemberId == MID_PARA_ADJUST ? SetAdjust(eAdjust) : SetLastBlock(eAdjust);
             }
         }
         break;
@@ -430,13 +425,13 @@ bool SvxAdjustItem::GetPresentation
 
 sal_uInt16 SvxAdjustItem::GetValueCount() const
 {
-    return SVX_ADJUST_END;  // SVX_ADJUST_BLOCKLINE + 1
+    return (sal_uInt16)SvxAdjust::End;  // SvxAdjust::BlockLine + 1
 }
 
 
 OUString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos ) const
 {
-    DBG_ASSERT( nPos <= (sal_uInt16)SVX_ADJUST_BLOCKLINE, "enum overflow!" );
+    DBG_ASSERT( nPos <= (sal_uInt16)SvxAdjust::BlockLine, "enum overflow!" );
     return EE_RESSTR(RID_SVXITEMS_ADJUST_BEGIN + nPos);
 }
 
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 236e265..ec6e5ca 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1535,8 +1535,8 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu
         {
             // Adjust when centered or align right
             const SvxAdjustItem& rItem = static_cast<const SvxAdjustItem&>(pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST ));
-            if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) ||
-                 ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
+            if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Left ) ) ||
+                 ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Right ) ) )
             {
                 aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
             }
@@ -1569,11 +1569,11 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu
         }
 
         // Horizontal:
-        if( pFmt->GetNumAdjust() == SVX_ADJUST_RIGHT )
+        if( pFmt->GetNumAdjust() == SvxAdjust::Right )
         {
             aTopLeft.X() += nBulletWidth - aBulletSize.Width();
         }
-        else if( pFmt->GetNumAdjust() == SVX_ADJUST_CENTER )
+        else if( pFmt->GetNumAdjust() == SvxAdjust::Center )
         {
             aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
         }
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 1e4efcf..8b8fb43 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -322,25 +322,25 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
             case RTF_QL:
                 if( aPardMap.nAdjust )
                 {
-                    pSet->Put( SvxAdjustItem( SVX_ADJUST_LEFT, aPardMap.nAdjust ));
+                    pSet->Put( SvxAdjustItem( SvxAdjust::Left, aPardMap.nAdjust ));
                 }
                 break;
             case RTF_QR:
                 if( aPardMap.nAdjust )
                 {
-                    pSet->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, aPardMap.nAdjust ));
+                    pSet->Put( SvxAdjustItem( SvxAdjust::Right, aPardMap.nAdjust ));
                 }
                 break;
             case RTF_QJ:
                 if( aPardMap.nAdjust )
                 {
-                    pSet->Put( SvxAdjustItem( SVX_ADJUST_BLOCK, aPardMap.nAdjust ));
+                    pSet->Put( SvxAdjustItem( SvxAdjust::Block, aPardMap.nAdjust ));
                 }
                 break;
             case RTF_QC:
                 if( aPardMap.nAdjust )
                 {
-                    pSet->Put( SvxAdjustItem( SVX_ADJUST_CENTER, aPardMap.nAdjust ));
+                    pSet->Put( SvxAdjustItem( SvxAdjust::Center, aPardMap.nAdjust ));
                 }
                 break;
 
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 07a7703..e9b9877 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -38,6 +38,7 @@
 #include <editeng/unonrule.hxx>
 #include <editeng/editids.hrc>
 #include <editeng/numdef.hxx>
+#include <o3tl/enumarray.hxx>
 #include <memory>
 
 using ::com::sun::star::util::XCloneable;
@@ -52,16 +53,16 @@ using namespace ::com::sun::star::container;
 
 const SvxAdjust aUnoToSvxAdjust[] =
 {
-    SVX_ADJUST_LEFT,
-    SVX_ADJUST_RIGHT,
-    SVX_ADJUST_CENTER,
-    SVX_ADJUST_LEFT,
-    SVX_ADJUST_LEFT,
-    SVX_ADJUST_LEFT,
-    SVX_ADJUST_BLOCK
+    SvxAdjust::Left,
+    SvxAdjust::Right,
+    SvxAdjust::Center,
+    SvxAdjust::Left,
+    SvxAdjust::Left,
+    SvxAdjust::Left,
+    SvxAdjust::Block
 };
 
-const unsigned short aSvxToUnoAdjust[] =
+const o3tl::enumarray<SvxAdjust, unsigned short> aSvxToUnoAdjust
 {
     text::HoriOrientation::LEFT,
     text::HoriOrientation::RIGHT,
@@ -79,7 +80,7 @@ SvxAdjust ConvertUnoAdjust( unsigned short nAdjust )
 
 unsigned short ConvertUnoAdjust( SvxAdjust eAdjust )
 {
-    DBG_ASSERT( eAdjust <= 6, "Enum hat sich geaendert! [CL]" );
+    DBG_ASSERT( (int)eAdjust <= 6, "Enum hat sich geaendert! [CL]" );
     return aSvxToUnoAdjust[eAdjust];
 }
 
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 5cb4caf..45730ab 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6235,7 +6235,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet,  boost::optional< sal_Int16 >&
     {
         if ( nVal <= 3 )
         {   // paragraph adjustment
-            static SvxAdjust const aAdj[ 4 ] = { SVX_ADJUST_LEFT, SVX_ADJUST_CENTER, SVX_ADJUST_RIGHT, SVX_ADJUST_BLOCK };
+            static SvxAdjust const aAdj[ 4 ] = { SvxAdjust::Left, SvxAdjust::Center, SvxAdjust::Right, SvxAdjust::Block };
             rSet.Put( SvxAdjustItem( aAdj[ nVal ], EE_PARA_JUST ) );
         }
     }
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 19eaa93..baedb90 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -166,14 +166,14 @@ namespace frm
 
     ParaAlignmentHandler::ParaAlignmentHandler( AttributeId _nAttributeId )
         :AttributeHandler( _nAttributeId, EE_PARA_JUST )
-        ,m_eAdjust( SVX_ADJUST_CENTER )
+        ,m_eAdjust( SvxAdjust::Center )
     {
         switch ( getAttribute() )
         {
-            case SID_ATTR_PARA_ADJUST_LEFT  : m_eAdjust = SVX_ADJUST_LEFT;    break;
-            case SID_ATTR_PARA_ADJUST_CENTER: m_eAdjust = SVX_ADJUST_CENTER;  break;
-            case SID_ATTR_PARA_ADJUST_RIGHT : m_eAdjust = SVX_ADJUST_RIGHT;   break;
-            case SID_ATTR_PARA_ADJUST_BLOCK : m_eAdjust = SVX_ADJUST_BLOCK;   break;
+            case SID_ATTR_PARA_ADJUST_LEFT  : m_eAdjust = SvxAdjust::Left;    break;
+            case SID_ATTR_PARA_ADJUST_CENTER: m_eAdjust = SvxAdjust::Center;  break;
+            case SID_ATTR_PARA_ADJUST_RIGHT : m_eAdjust = SvxAdjust::Right;   break;
+            case SID_ATTR_PARA_ADJUST_BLOCK : m_eAdjust = SvxAdjust::Block;   break;
             default:
                 OSL_FAIL( "ParaAlignmentHandler::ParaAlignmentHandler: invalid slot!" );
                 break;
@@ -376,21 +376,21 @@ namespace frm
     ParagraphDirectionHandler::ParagraphDirectionHandler( AttributeId _nAttributeId )
         :AttributeHandler( _nAttributeId, EE_PARA_WRITINGDIR )
         ,m_eParagraphDirection( FRMDIR_HORI_LEFT_TOP )
-        ,m_eDefaultAdjustment( SVX_ADJUST_RIGHT )
-        ,m_eOppositeDefaultAdjustment( SVX_ADJUST_LEFT )
+        ,m_eDefaultAdjustment( SvxAdjust::Right )
+        ,m_eOppositeDefaultAdjustment( SvxAdjust::Left )
     {
         switch ( getAttributeId() )
         {
-            case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = FRMDIR_HORI_LEFT_TOP; m_eDefaultAdjustment = SVX_ADJUST_LEFT; break;
-            case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = FRMDIR_HORI_RIGHT_TOP; m_eDefaultAdjustment = SVX_ADJUST_RIGHT; break;
+            case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = FRMDIR_HORI_LEFT_TOP; m_eDefaultAdjustment = SvxAdjust::Left; break;
+            case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = FRMDIR_HORI_RIGHT_TOP; m_eDefaultAdjustment = SvxAdjust::Right; break;
             default:
                 OSL_FAIL( "ParagraphDirectionHandler::ParagraphDirectionHandler: invalid attribute id!" );
         }
 
-        if ( SVX_ADJUST_RIGHT == m_eDefaultAdjustment )
-            m_eOppositeDefaultAdjustment = SVX_ADJUST_LEFT;
+        if ( SvxAdjust::Right == m_eDefaultAdjustment )
+            m_eOppositeDefaultAdjustment = SvxAdjust::Left;
         else
-            m_eOppositeDefaultAdjustment = SVX_ADJUST_RIGHT;
+            m_eOppositeDefaultAdjustment = SvxAdjust::Right;
     }
 
 
@@ -408,7 +408,7 @@ namespace frm
 
         // if the current adjustment of the was the default adjustment for the *previous* text direction,
         // then we toggle the adjustment, too
-        SvxAdjust eCurrentAdjustment = SVX_ADJUST_LEFT;
+        SvxAdjust eCurrentAdjustment = SvxAdjust::Left;
         const SfxPoolItem* pCurrentAdjustment = nullptr;
         if ( SfxItemState::SET == _rCurrentAttribs.GetItemState( EE_PARA_JUST, true, &pCurrentAdjustment ) )
             eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust();
diff --git a/include/editeng/adjustitem.hxx b/include/editeng/adjustitem.hxx
index 04a04ff..8c71878 100644
--- a/include/editeng/adjustitem.hxx
+++ b/include/editeng/adjustitem.hxx
@@ -49,7 +49,7 @@ class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface
 public:
     static SfxPoolItem* CreateDefault();
 
-    SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/,
+    SvxAdjustItem( const SvxAdjust eAdjst /*= SvxAdjust::Left*/,
                    const sal_uInt16 nId );
 
     // "pure virtual Methods" from SfxPoolItem
@@ -73,53 +73,53 @@ public:
 
     void SetOneWord( const SvxAdjust eType )
     {
-        bOneBlock  = eType == SVX_ADJUST_BLOCK;
+        bOneBlock  = eType == SvxAdjust::Block;
     }
 
     void SetLastBlock( const SvxAdjust eType )
     {
-        bLastBlock = eType == SVX_ADJUST_BLOCK;
-        bLastCenter = eType == SVX_ADJUST_CENTER;
+        bLastBlock = eType == SvxAdjust::Block;
+        bLastCenter = eType == SvxAdjust::Center;
     }
 
     void SetAdjust( const SvxAdjust eType )
     {
-        bLeft = eType == SVX_ADJUST_LEFT;
-        bRight = eType == SVX_ADJUST_RIGHT;
-        bCenter = eType == SVX_ADJUST_CENTER;
-        bBlock = eType == SVX_ADJUST_BLOCK;
+        bLeft = eType == SvxAdjust::Left;
+        bRight = eType == SvxAdjust::Right;
+        bCenter = eType == SvxAdjust::Center;
+        bBlock = eType == SvxAdjust::Block;
     }
 
     SvxAdjust GetLastBlock() const
     {
-        SvxAdjust eRet = SVX_ADJUST_LEFT;
+        SvxAdjust eRet = SvxAdjust::Left;
 
         if ( bLastBlock )
-            eRet = SVX_ADJUST_BLOCK;
+            eRet = SvxAdjust::Block;
         else if( bLastCenter )
-            eRet = SVX_ADJUST_CENTER;
+            eRet = SvxAdjust::Center;
         return eRet;
     }
 
     SvxAdjust GetOneWord() const
     {
-        SvxAdjust eRet = SVX_ADJUST_LEFT;
+        SvxAdjust eRet = SvxAdjust::Left;
 
         if ( bBlock && bOneBlock )
-            eRet = SVX_ADJUST_BLOCK;
+            eRet = SvxAdjust::Block;
         return eRet;
     }
 
     SvxAdjust GetAdjust() const
     {
-        SvxAdjust eRet = SVX_ADJUST_LEFT;
+        SvxAdjust eRet = SvxAdjust::Left;
 
         if ( bRight )
-            eRet = SVX_ADJUST_RIGHT;
+            eRet = SvxAdjust::Right;
         else if ( bCenter )
-            eRet = SVX_ADJUST_CENTER;
+            eRet = SvxAdjust::Center;
         else if ( bBlock )
-            eRet = SVX_ADJUST_BLOCK;
+            eRet = SvxAdjust::Block;
         return eRet;
     }
 };
diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index 670c360..12b1f4b 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -73,14 +73,15 @@ enum class SvxInterLineSpaceRule
     Fix
 };
 
-enum SvxAdjust
+enum class SvxAdjust
 {
-    SVX_ADJUST_LEFT,
-    SVX_ADJUST_RIGHT,
-    SVX_ADJUST_BLOCK,
-    SVX_ADJUST_CENTER,
-    SVX_ADJUST_BLOCKLINE,
-    SVX_ADJUST_END
+    Left,
+    Right,
+    Block,
+    Center,
+    BlockLine,
+    End,
+    LAST = End
 };
 
 enum class SvxBreak
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 992bd83..52285b1 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -63,7 +63,7 @@ class  SVX_DLLPUBLIC NumSettings_Impl
             , nParentNumbering(0)
             , eLabelFollowedBy(SvxNumberFormat::NOTHING)
             , nTabValue (0)
-            , eNumAlign(SVX_ADJUST_LEFT)
+            , eNumAlign(SvxAdjust::Left)
             , nNumAlignAt(0)
             , nNumIndentAt(0)
             , pBrushItem(nullptr)
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 8693298..b05a85a 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -639,7 +639,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj)
     }
     if ( !bAttributesAppliedFromGallery )
     {
-        _pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER ,ITEMID_ADJUST) );
+        _pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center ,ITEMID_ADJUST) );
         _pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         _pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
         _pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 133b980..40ac772 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -912,24 +912,24 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet&
         SvxCellHorJustify eVal;
         switch ( static_cast<const SvxAdjustItem*>(pItem)->GetAdjust() )
         {
-            case SVX_ADJUST_LEFT:
+            case SvxAdjust::Left:
                 // EditEngine Default is always set in the GetAttribs() ItemSet !
                 // whether left or right, is decided in text / number
                 eVal = SVX_HOR_JUSTIFY_STANDARD;
                 break;
-            case SVX_ADJUST_RIGHT:
+            case SvxAdjust::Right:
                 eVal = SVX_HOR_JUSTIFY_RIGHT;
                 break;
-            case SVX_ADJUST_BLOCK:
+            case SvxAdjust::Block:
                 eVal = SVX_HOR_JUSTIFY_BLOCK;
                 break;
-            case SVX_ADJUST_CENTER:
+            case SvxAdjust::Center:
                 eVal = SVX_HOR_JUSTIFY_CENTER;
                 break;
-            case SVX_ADJUST_BLOCKLINE:
+            case SvxAdjust::BlockLine:
                 eVal = SVX_HOR_JUSTIFY_BLOCK;
                 break;
-            case SVX_ADJUST_END:
+            case SvxAdjust::End:
                 eVal = SVX_HOR_JUSTIFY_RIGHT;
                 break;
             default:
@@ -959,10 +959,10 @@ void ScPatternAttr::FillEditParaItems( SfxItemSet* pEditSet ) const
     SvxAdjust eSvxAdjust;
     switch (eHorJust)
     {
-        case SVX_HOR_JUSTIFY_RIGHT:  eSvxAdjust = SVX_ADJUST_RIGHT;  break;
-        case SVX_HOR_JUSTIFY_CENTER: eSvxAdjust = SVX_ADJUST_CENTER; break;
-        case SVX_HOR_JUSTIFY_BLOCK:  eSvxAdjust = SVX_ADJUST_BLOCK;  break;
-        default:                     eSvxAdjust = SVX_ADJUST_LEFT;   break;
+        case SVX_HOR_JUSTIFY_RIGHT:  eSvxAdjust = SvxAdjust::Right;  break;
+        case SVX_HOR_JUSTIFY_CENTER: eSvxAdjust = SvxAdjust::Center; break;
+        case SVX_HOR_JUSTIFY_BLOCK:  eSvxAdjust = SvxAdjust::Block;  break;
+        default:                     eSvxAdjust = SvxAdjust::Left;   break;
     }
     pEditSet->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
 }
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 6d48398..935041e 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -188,7 +188,7 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion)
     rStream.WriteUInt16( SvxLineItem(SID_FRAME_LINESTYLE).GetVersion(fileVersion) );
     rStream.WriteUInt16( SvxBrushItem(ATTR_BACKGROUND).GetVersion(fileVersion) );
 
-    rStream.WriteUInt16( SvxAdjustItem(SVX_ADJUST_LEFT, 0).GetVersion(fileVersion) );
+    rStream.WriteUInt16( SvxAdjustItem(SvxAdjust::Left, 0).GetVersion(fileVersion) );
     if (fileVersion >= SOFFICE_FILEFORMAT_50)
         WriteAutoFormatSwBlob( rStream, swVersions );
 
@@ -229,7 +229,7 @@ ScAutoFormatDataField::ScAutoFormatDataField() :
     aTLBR( ATTR_BORDER_TLBR ),
     aBLTR( ATTR_BORDER_BLTR ),
     aBackground( ATTR_BACKGROUND ),
-    aAdjust( SVX_ADJUST_LEFT, 0 ),
+    aAdjust( SvxAdjust::Left, 0 ),
     aHorJustify( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ),
     aVerJustify( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY ),
     aMargin( ATTR_MARGIN ),
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index b70b3b9..227cdea 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1464,7 +1464,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                 (with no content) while exporting to XLS, which can cause a
                 corrupted exported document. */
 
-            SvxAdjust eHorAlign = SVX_ADJUST_LEFT;
+            SvxAdjust eHorAlign = SvxAdjust::Left;
             SdrTextVertAdjust eVerAlign = SDRTEXTVERTADJUST_TOP;
 
             // orientation (this is only a fake, drawing does not support real text orientation)
@@ -1478,10 +1478,10 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                     eWriteMode = csst::WritingMode_LR_TB;
                     switch( maTextData.maData.GetHorAlign() )
                     {
-                        case EXC_OBJ_HOR_LEFT:      eHorAlign = SVX_ADJUST_LEFT;    break;
-                        case EXC_OBJ_HOR_CENTER:    eHorAlign = SVX_ADJUST_CENTER;  break;
-                        case EXC_OBJ_HOR_RIGHT:     eHorAlign = SVX_ADJUST_RIGHT;   break;
-                        case EXC_OBJ_HOR_JUSTIFY:   eHorAlign = SVX_ADJUST_BLOCK;   break;
+                        case EXC_OBJ_HOR_LEFT:      eHorAlign = SvxAdjust::Left;    break;
+                        case EXC_OBJ_HOR_CENTER:    eHorAlign = SvxAdjust::Center;  break;
+                        case EXC_OBJ_HOR_RIGHT:     eHorAlign = SvxAdjust::Right;   break;
+                        case EXC_OBJ_HOR_JUSTIFY:   eHorAlign = SvxAdjust::Block;   break;
                     }
                     switch( maTextData.maData.GetVerAlign() )
                     {
@@ -1520,7 +1520,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                         case mso_anchorMiddleCentered :
                         case mso_anchorBottomCentered :
                         {
-                            eHorAlign = SVX_ADJUST_CENTER;
+                            eHorAlign = SvxAdjust::Center;
                         }
                         break;
 
@@ -1528,10 +1528,10 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                         {
                             switch( maTextData.maData.GetVerAlign() )
                             {
-                                case EXC_OBJ_VER_TOP:       eHorAlign = SVX_ADJUST_RIGHT;   break;
-                                case EXC_OBJ_VER_CENTER:    eHorAlign = SVX_ADJUST_CENTER;  break;
-                                case EXC_OBJ_VER_BOTTOM:    eHorAlign = SVX_ADJUST_LEFT;    break;
-                                case EXC_OBJ_VER_JUSTIFY:   eHorAlign = SVX_ADJUST_BLOCK;   break;
+                                case EXC_OBJ_VER_TOP:       eHorAlign = SvxAdjust::Right;   break;
+                                case EXC_OBJ_VER_CENTER:    eHorAlign = SvxAdjust::Center;  break;
+                                case EXC_OBJ_VER_BOTTOM:    eHorAlign = SvxAdjust::Left;    break;
+                                case EXC_OBJ_VER_JUSTIFY:   eHorAlign = SvxAdjust::Block;   break;
                             }
                         }
                     }
@@ -1560,7 +1560,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                         case mso_anchorMiddleCentered :
                         case mso_anchorBottomCentered :
                         {
-                            eHorAlign = SVX_ADJUST_CENTER;
+                            eHorAlign = SvxAdjust::Center;
                         }
                         break;
 
@@ -1568,10 +1568,10 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                         {
                             switch( maTextData.maData.GetVerAlign() )
                             {
-                                case EXC_OBJ_VER_TOP:       eHorAlign = SVX_ADJUST_LEFT;   break;
-                                case EXC_OBJ_VER_CENTER:    eHorAlign = SVX_ADJUST_CENTER;  break;
-                                case EXC_OBJ_VER_BOTTOM:    eHorAlign = SVX_ADJUST_RIGHT;   break;
-                                case EXC_OBJ_VER_JUSTIFY:   eHorAlign = SVX_ADJUST_BLOCK;   break;
+                                case EXC_OBJ_VER_TOP:       eHorAlign = SvxAdjust::Left;   break;
+                                case EXC_OBJ_VER_CENTER:    eHorAlign = SvxAdjust::Center;  break;
+                                case EXC_OBJ_VER_BOTTOM:    eHorAlign = SvxAdjust::Right;   break;
+                                case EXC_OBJ_VER_JUSTIFY:   eHorAlign = SvxAdjust::Block;   break;
                             }
                         }
                     }
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 4b0ad2b..15fce02 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -165,7 +165,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
             // EditView.GetAttribs always returns complete Set filled with
             // defaults
             const SfxPoolItem& rItem = aSet.Get( EE_PARA_JUST );
-            if ( static_cast<const SvxAdjustItem&>(rItem).GetAdjust() == SVX_ADJUST_LEFT )
+            if ( static_cast<const SvxAdjustItem&>(rItem).GetAdjust() == SvxAdjust::Left )
                 aSet.ClearItem( EE_PARA_JUST );
 
             // Test whether simple String without mixed attributes
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 0af2465..6a7ca5c 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -738,10 +738,10 @@ static sal_uInt8 lcl_GetHorAlignFromItemSet( const SfxItemSet& rItemSet )
 
     switch( static_cast< const SvxAdjustItem& >( rItemSet.Get( EE_PARA_JUST ) ).GetAdjust() )
     {
-        case SVX_ADJUST_LEFT:   nHorAlign = EXC_OBJ_HOR_LEFT;      break;
-        case SVX_ADJUST_CENTER: nHorAlign = EXC_OBJ_HOR_CENTER;    break;
-        case SVX_ADJUST_RIGHT:  nHorAlign = EXC_OBJ_HOR_RIGHT;     break;
-        case SVX_ADJUST_BLOCK:  nHorAlign = EXC_OBJ_HOR_JUSTIFY;   break;
+        case SvxAdjust::Left:   nHorAlign = EXC_OBJ_HOR_LEFT;      break;
+        case SvxAdjust::Center: nHorAlign = EXC_OBJ_HOR_CENTER;    break;
+        case SvxAdjust::Right:  nHorAlign = EXC_OBJ_HOR_RIGHT;     break;
+        case SvxAdjust::Block:  nHorAlign = EXC_OBJ_HOR_JUSTIFY;   break;
         default:;
     }
     return nHorAlign;
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 85bc9c3..aa7015c 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -206,9 +206,9 @@ sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount()
                 nPageWhichId = mpViewShell->GetLocationData().IsFooterLeft() ? ATTR_PAGE_FOOTERLEFT : ATTR_PAGE_FOOTERRIGHT;
 
             const ScPageHFItem& rPageItem = static_cast<const ScPageHFItem&>(pStyle->GetItemSet().Get(nPageWhichId));
-            AddChild(rPageItem.GetLeftArea(), 0, SVX_ADJUST_LEFT);
-            AddChild(rPageItem.GetCenterArea(), 1, SVX_ADJUST_CENTER);
-            AddChild(rPageItem.GetRightArea(), 2, SVX_ADJUST_RIGHT);
+            AddChild(rPageItem.GetLeftArea(), 0, SvxAdjust::Left);
+            AddChild(rPageItem.GetCenterArea(), 1, SvxAdjust::Center);
+            AddChild(rPageItem.GetRightArea(), 2, SvxAdjust::Right);
         }
     }
 
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 7931dc5..2671550 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -206,13 +206,13 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleDescription()
     OUString sDesc;
     switch (meAdjust)
     {
-    case SVX_ADJUST_LEFT :
+    case SvxAdjust::Left :
         sDesc = OUString(ScResId(STR_ACC_LEFTAREA_DESCR));
         break;
-    case SVX_ADJUST_RIGHT:
+    case SvxAdjust::Right:
         sDesc = OUString(ScResId(STR_ACC_RIGHTAREA_DESCR));
         break;
-    case SVX_ADJUST_CENTER:
+    case SvxAdjust::Center:
         sDesc = OUString(ScResId(STR_ACC_CENTERAREA_DESCR));
         break;
     default:
@@ -227,13 +227,13 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName()
     OUString sName;
     switch (meAdjust)
     {
-    case SVX_ADJUST_LEFT :
+    case SvxAdjust::Left :
         sName = OUString(ScResId(STR_ACC_LEFTAREA_NAME));
         break;
-    case SVX_ADJUST_RIGHT:
+    case SvxAdjust::Right:
         sName = OUString(ScResId(STR_ACC_RIGHTAREA_NAME));
         break;
-    case SVX_ADJUST_CENTER:
+    case SvxAdjust::Center:
         sName = OUString(ScResId(STR_ACC_CENTERAREA_NAME));
         break;
     default:
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 11346e1..6f4fb2d 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -779,7 +779,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
         // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
         if ( eHorJust == SVX_HOR_JUSTIFY_STANDARD && rDoc.HasValueData( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab() ) )
         {
-            pEditEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+            pEditEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
         }
 
         Size aTextSize;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5cb6017..751fe84 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1953,20 +1953,20 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
                     ScDocument& rDoc = pActiveViewSh->GetViewData().GetDocShell()->GetDocument();
                     bNumber = ( rDoc.GetCellType( aCursorPos ) == CELLTYPE_VALUE );
                 }
-                eSvxAdjust = bNumber ? SVX_ADJUST_RIGHT : SVX_ADJUST_LEFT;
+                eSvxAdjust = bNumber ? SvxAdjust::Right : SvxAdjust::Left;
             }
             break;
         case SVX_HOR_JUSTIFY_BLOCK:
-            eSvxAdjust = SVX_ADJUST_BLOCK;
+            eSvxAdjust = SvxAdjust::Block;
             break;
         case SVX_HOR_JUSTIFY_CENTER:
-            eSvxAdjust = SVX_ADJUST_CENTER;
+            eSvxAdjust = SvxAdjust::Center;
             break;
         case SVX_HOR_JUSTIFY_RIGHT:
-            eSvxAdjust = SVX_ADJUST_RIGHT;
+            eSvxAdjust = SvxAdjust::Right;
             break;
         default:    // SVX_HOR_JUSTIFY_LEFT
-            eSvxAdjust = SVX_ADJUST_LEFT;
+            eSvxAdjust = SvxAdjust::Left;
             break;
     }
 
@@ -1976,7 +1976,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
     if ( bAsianVertical )
     {
         // Always edit at top of cell -> LEFT when editing vertically
-        eSvxAdjust = SVX_ADJUST_LEFT;
+        eSvxAdjust = SvxAdjust::Left;
     }
 
     pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
@@ -2329,7 +2329,7 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified )
     {
         ScViewData& rViewData = pActiveViewSh->GetViewData();
 
-        bool bNeedGrow = ( rViewData.GetEditAdjust() != SVX_ADJUST_LEFT ); // Always right-aligned
+        bool bNeedGrow = ( rViewData.GetEditAdjust() != SvxAdjust::Left ); // Always right-aligned
         if (!bNeedGrow)
         {
             // Cursor before the end?
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3d503b4..b320ba7 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1135,7 +1135,7 @@ static void lcl_ExtendEditFontAttribs( SfxItemSet& rSet )
 
 static void lcl_ModifyRTLDefaults( SfxItemSet& rSet )
 {
-    rSet.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+    rSet.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
 
     // always using rtl writing direction would break formulas
     //rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 7d35de7..5e08e62 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -674,25 +674,25 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
         case SID_ALIGNLEFT:
         case SID_ALIGN_ANY_LEFT:
         case SID_ATTR_PARA_ADJUST_LEFT:
-            aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+            aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
             break;
 
         case SID_ALIGNCENTERHOR:
         case SID_ALIGN_ANY_HCENTER:
         case SID_ATTR_PARA_ADJUST_CENTER:
-            aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+            aNewAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
             break;
 
         case SID_ALIGNRIGHT:
         case SID_ALIGN_ANY_RIGHT:
         case SID_ATTR_PARA_ADJUST_RIGHT:
-            aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+            aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
             break;
 
         case SID_ALIGNBLOCK:
         case SID_ALIGN_ANY_JUSTIFIED:
         case SID_ATTR_PARA_ADJUST_BLOCK:
-            aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+            aNewAttr.Put( SvxAdjustItem( SvxAdjust::Block, EE_PARA_JUST ) );
             break;
 
         case SID_ATTR_PARA_LINESPACE_10:
@@ -1007,25 +1007,25 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
     SvxAdjust eAdj = static_cast<const SvxAdjustItem&>(aAttrSet.Get(EE_PARA_JUST)).GetAdjust();
     switch( eAdj )
     {
-    case SVX_ADJUST_LEFT:
+    case SvxAdjust::Left:
         {
             rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, true ) );
             rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
         }
         break;
-    case SVX_ADJUST_CENTER:
+    case SvxAdjust::Center:
         {
             rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, true ) );
             rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
         }
         break;
-    case SVX_ADJUST_RIGHT:
+    case SvxAdjust::Right:
         {
             rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, true ) );
             rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
         }
         break;
-    case SVX_ADJUST_BLOCK:
+    case SvxAdjust::Block:
         {
             rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, true ) );
             rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
@@ -1037,10 +1037,10 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
         }
     }
     // pseudo slots for Format menu
-    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_LEFT,      eAdj == SVX_ADJUST_LEFT ) );
-    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_HCENTER,   eAdj == SVX_ADJUST_CENTER ) );
-    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_RIGHT,     eAdj == SVX_ADJUST_RIGHT ) );
-    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_JUSTIFIED, eAdj == SVX_ADJUST_BLOCK ) );
+    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_LEFT,      eAdj == SvxAdjust::Left ) );
+    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_HCENTER,   eAdj == SvxAdjust::Center ) );
+    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_RIGHT,     eAdj == SvxAdjust::Right ) );
+    rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_JUSTIFIED, eAdj == SvxAdjust::Block ) );
 
         SvxLRSpaceItem aLR = static_cast<const SvxLRSpaceItem&>(aAttrSet.Get( EE_PARA_LRSPACE ));
     aLR.SetWhich(SID_ATTR_PARA_LRSPACE);
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index a7eb77a..9cf130a 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -171,7 +171,7 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
                                 bLeft ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP,
                                 EE_PARA_WRITINGDIR ) );
                 aAttr.Put( SvxAdjustItem(
-                                bLeft ? SVX_ADJUST_LEFT : SVX_ADJUST_RIGHT,
+                                bLeft ? SvxAdjust::Left : SvxAdjust::Right,
                                 EE_PARA_JUST ) );
                 pView->SetAttributes( aAttr );
                 pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index eb484b9..2992369 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -235,7 +235,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
     }
     if ( !bAttributesAppliedFromGallery )
     {
-        pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
+        pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, 0 ) );
         pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
         pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 3585996..6232b14 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -167,7 +167,7 @@ void ScEditWindow::SetFont( const ScPatternAttr& rPattern )
     pNewItem.reset(rPattern.GetItem(ATTR_CTL_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL));
     pSet->Put( *pNewItem );
     if (mbRTL)
-        pSet->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+        pSet->Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
     pEdEngine->SetDefaults( pSet );
 }
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 54ad1b0..8debb68 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4978,22 +4978,22 @@ SvxAdjust toSvxAdjust( const ScPatternAttr& rPat )
         static_cast<SvxCellHorJustify>(
             static_cast<const SvxHorJustifyItem&>(rPat.GetItem(ATTR_HOR_JUSTIFY)).GetValue());
 
-    SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+    SvxAdjust eSvxAdjust = SvxAdjust::Left;
     switch (eHorJust)
     {
         case SVX_HOR_JUSTIFY_LEFT:
         case SVX_HOR_JUSTIFY_REPEAT:            // not implemented
         case SVX_HOR_JUSTIFY_STANDARD:          // always Text if an EditCell type
-                eSvxAdjust = SVX_ADJUST_LEFT;
+                eSvxAdjust = SvxAdjust::Left;
                 break;
         case SVX_HOR_JUSTIFY_RIGHT:
-                eSvxAdjust = SVX_ADJUST_RIGHT;
+                eSvxAdjust = SvxAdjust::Right;
                 break;
         case SVX_HOR_JUSTIFY_CENTER:
-                eSvxAdjust = SVX_ADJUST_CENTER;
+                eSvxAdjust = SvxAdjust::Center;
                 break;
         case SVX_HOR_JUSTIFY_BLOCK:
-                eSvxAdjust = SVX_ADJUST_BLOCK;
+                eSvxAdjust = SvxAdjust::Block;
                 break;
     }
 
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 0e55697..b689f3c 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2587,23 +2587,23 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
 {
     if (isVerticallyOriented() || mbAsianVertical)
     {
-        SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+        SvxAdjust eSvxAdjust = SvxAdjust::Left;
         switch (meVerJust)
         {
             case SVX_VER_JUSTIFY_TOP:
                 eSvxAdjust = (meOrient == SVX_ORIENTATION_TOPBOTTOM || mbAsianVertical) ?
-                            SVX_ADJUST_LEFT : SVX_ADJUST_RIGHT;
+                            SvxAdjust::Left : SvxAdjust::Right;
                 break;
             case SVX_VER_JUSTIFY_CENTER:
-                eSvxAdjust = SVX_ADJUST_CENTER;
+                eSvxAdjust = SvxAdjust::Center;
                 break;
             case SVX_VER_JUSTIFY_BOTTOM:
             case SVX_VER_JUSTIFY_STANDARD:
                 eSvxAdjust = (meOrient == SVX_ORIENTATION_TOPBOTTOM || mbAsianVertical) ?
-                            SVX_ADJUST_RIGHT : SVX_ADJUST_LEFT;
+                            SvxAdjust::Right : SvxAdjust::Left;
                 break;
             case SVX_VER_JUSTIFY_BLOCK:
-                eSvxAdjust = SVX_ADJUST_BLOCK;
+                eSvxAdjust = SvxAdjust::Block;
                 break;
         }
 
@@ -2619,9 +2619,9 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
         //  (for values with number formats with mixed script types)
         //  -> always set adjustment
 
-        SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+        SvxAdjust eSvxAdjust = SvxAdjust::Left;
         if (meOrient == SVX_ORIENTATION_STACKED)
-            eSvxAdjust = SVX_ADJUST_CENTER;
+            eSvxAdjust = SvxAdjust::Center;
         else if (mbBreak)
         {
             if (meOrient == SVX_ORIENTATION_STANDARD)
@@ -2632,33 +2632,33 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
                         SAL_WARN("sc.ui","meHorJustResult does not match getAlignmentFromContext()");
                         SAL_FALLTHROUGH;
                     case SVX_HOR_JUSTIFY_LEFT:
-                        eSvxAdjust = SVX_ADJUST_LEFT;
+                        eSvxAdjust = SvxAdjust::Left;
                         break;
                     case SVX_HOR_JUSTIFY_CENTER:
-                        eSvxAdjust = SVX_ADJUST_CENTER;
+                        eSvxAdjust = SvxAdjust::Center;
                         break;
                     case SVX_HOR_JUSTIFY_RIGHT:
-                        eSvxAdjust = SVX_ADJUST_RIGHT;
+                        eSvxAdjust = SvxAdjust::Right;
                         break;
                     case SVX_HOR_JUSTIFY_BLOCK:
-                        eSvxAdjust = SVX_ADJUST_BLOCK;
+                        eSvxAdjust = SvxAdjust::Block;
                         break;
                 }
             else
                 switch (meVerJust)
                 {
                     case SVX_VER_JUSTIFY_TOP:
-                        eSvxAdjust = SVX_ADJUST_RIGHT;
+                        eSvxAdjust = SvxAdjust::Right;
                         break;
                     case SVX_VER_JUSTIFY_CENTER:
-                        eSvxAdjust = SVX_ADJUST_CENTER;
+                        eSvxAdjust = SvxAdjust::Center;
                         break;
                     case SVX_VER_JUSTIFY_BOTTOM:
                     case SVX_VER_JUSTIFY_STANDARD:
-                        eSvxAdjust = SVX_ADJUST_LEFT;
+                        eSvxAdjust = SvxAdjust::Left;
                         break;
                     case SVX_VER_JUSTIFY_BLOCK:
-                        eSvxAdjust = SVX_ADJUST_BLOCK;
+                        eSvxAdjust = SvxAdjust::Block;
                         break;
                 }
         }
@@ -2696,7 +2696,7 @@ bool ScOutputData::DrawEditParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
     if (meHorJustResult == SVX_HOR_JUSTIFY_RIGHT || meHorJustResult == SVX_HOR_JUSTIFY_CENTER)
     {
         SvxAdjust eEditAdjust = (meHorJustResult == SVX_HOR_JUSTIFY_CENTER) ?
-            SVX_ADJUST_CENTER : SVX_ADJUST_RIGHT;
+            SvxAdjust::Center : SvxAdjust::Right;
 
         pEngine->SetUpdateMode(false);
         pEngine->SetDefaultItem( SvxAdjustItem(eEditAdjust, EE_PARA_JUST) );
@@ -4791,9 +4791,9 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
                                 pPattern->FillEditItemSet( pSet, pCondSet );
 
                                                                     // adjustment for EditEngine
-                                SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+                                SvxAdjust eSvxAdjust = SvxAdjust::Left;
                                 if (eOrient==SVX_ORIENTATION_STACKED)
-                                    eSvxAdjust = SVX_ADJUST_CENTER;
+                                    eSvxAdjust = SvxAdjust::Center;
                                 // adjustment for bBreak is omitted here
                                 pSet->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
 
@@ -5160,7 +5160,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
 
                                             SvxAdjust eSvxAdjust =
                                                 (eHorJust==SVX_HOR_JUSTIFY_RIGHT) ?
-                                                    SVX_ADJUST_RIGHT : SVX_ADJUST_CENTER;
+                                                    SvxAdjust::Right : SvxAdjust::Center;
                                             pEngine->SetDefaultItem(
                                                 SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
 
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index def4e2a..569e0c0 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1801,7 +1801,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
         const EditTextObject* pObject = pHFItem->GetLeftArea();
         if (pObject)
         {
-            pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+            pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
             pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
             Point aDraw = aStart;
             long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
@@ -1815,7 +1815,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
         pObject = pHFItem->GetCenterArea();
         if (pObject)
         {
-            pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+            pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
             pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
             Point aDraw = aStart;
             long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
@@ -1829,7 +1829,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
         pObject = pHFItem->GetRightArea();
         if (pObject)
         {
-            pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+            pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
             pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
             Point aDraw = aStart;
             long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
@@ -1854,7 +1854,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData
         pDev->SetMapMode(aTwipMode);
 
     MakeEditEngine();
-    pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+    pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
     pEditEngine->SetDefaults( *pEditDefaults );
 
     vcl::Font aMarkFont;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 93c9a4a..f2253f4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -349,7 +349,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
         nPasteFlags ( ScPasteFlags::NONE ),
         eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
         nFillMode   ( ScFillMode::NONE ),
-        eEditAdjust ( SVX_ADJUST_LEFT ),
+        eEditAdjust ( SvxAdjust::Left ),
         bActive     ( true ),                   // how to initialize?
         bIsRefMode  ( false ),
         bDelMarkValid( false ),
@@ -1052,7 +1052,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
 
     //  when right-aligned, leave space for the cursor
     //  in vertical mode, editing is always right-aligned
-    if ( GetEditAdjust() == SVX_ADJUST_RIGHT || bAsianVertical )
+    if ( GetEditAdjust() == SvxAdjust::Right || bAsianVertical )
         aPixRect.Right() += 1;
 
     Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() );
@@ -1128,12 +1128,12 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
         Size aPaper = pNewEngine->GetPaperSize();
         Rectangle aVis = pEditView[eWhich]->GetVisArea();
         long nDiff = aVis.Right() - aVis.Left();
-        if ( GetEditAdjust() == SVX_ADJUST_RIGHT )
+        if ( GetEditAdjust() == SvxAdjust::Right )
         {
             aVis.Right() = aPaper.Width() - 1;
             bMoveArea = !bLayoutRTL;
         }
-        else if ( GetEditAdjust() == SVX_ADJUST_CENTER )
+        else if ( GetEditAdjust() == SvxAdjust::Center )
         {
             aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2;
             bMoveArea = true;   // always
@@ -1347,7 +1347,7 @@ void ScViewData::EditGrowX()
             {
                 //  switch to center-aligned (undo?) and reset VisArea to center
 
-                pEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+                pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
 
                 long nCenter = aSize.Width() / 2;
                 long nVisSize = aArea.GetWidth();
@@ -1358,7 +1358,7 @@ void ScViewData::EditGrowX()
             {
                 //  switch to right-aligned (undo?) and reset VisArea to the right
 
-                pEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+                pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
 
                 aVis.Right() = aSize.Width() - 1;
                 aVis.Left() = aSize.Width() - aArea.GetWidth();     // with the new, increased area
@@ -1367,7 +1367,7 @@ void ScViewData::EditGrowX()
             {
                 //  switch to left-aligned (undo?) and reset VisArea to the left
 
-                pEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+                pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
 
                 long nMove = aVis.Left();
                 aVis.Left() = 0;
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 2a1620c..87c6beb 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -73,6 +73,12 @@ private:
     sd::DrawDocShellRef Load(const OUString& rURL, sal_Int32 nFormat);
 };
 
+std::ostream& operator<<(std::ostream& s, SvxAdjust n)
+{
+    s << (int)n;
+    return s;
+}
+
 sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat)
 {
     uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext());
@@ -204,7 +210,7 @@ void SdMiscTest::testTdf99396TextEdit()
         SfxItemSet aEditAttr(xDocSh->GetDoc()->GetPool());
         pView->GetAttributes(aEditAttr);
         SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges());
-        aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_RIGHT, EE_PARA_JUST));
+        aNewAttr.Put(SvxAdjustItem(SvxAdjust::Right, EE_PARA_JUST));
         aRequest.Done(aNewAttr);
         const SfxItemSet* pArgs = aRequest.GetArgs();
         pView->SetAttributes(*pArgs);
@@ -228,7 +234,7 @@ void SdMiscTest::testTdf99396TextEdit()
         const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject();
         const SfxItemSet& rParaAttribs = rEdit.GetParaAttribs(0);
         auto pAdjust = static_cast<const SvxAdjustItem*>(rParaAttribs.GetItem(EE_PARA_JUST));
-        CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, pAdjust->GetAdjust());
+        CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, pAdjust->GetAdjust());
     }
 
     // Now undo.
@@ -246,7 +252,7 @@ void SdMiscTest::testTdf99396TextEdit()
         const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject();
         const SfxItemSet& rParaAttribs = rEdit.GetParaAttribs(0);
         auto pAdjust = static_cast<const SvxAdjustItem*>(rParaAttribs.GetItem(EE_PARA_JUST));
-        CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_CENTER, pAdjust->GetAdjust());
+        CPPUNIT_ASSERT_EQUAL(SvxAdjust::Center, pAdjust->GetAdjust());
     }
 
 
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 306f339..3afd771 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -340,7 +340,7 @@ void SdDrawDocument::CreateLayoutTemplates()
     pISet->Put(XLineStyleItem(drawing::LineStyle_NONE));
     pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
 
-    pISet->Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST ));
+    pISet->Put(SvxAdjustItem(SvxAdjust::Block, EE_PARA_JUST ));
 
     // Text body, indented
     aName = SD_RESSTR(STR_POOLSHEET_TEXTBODY_INDENT);
@@ -387,7 +387,7 @@ void SdDrawDocument::CreateLayoutTemplates()
 
     pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT ));       // 24 pt
 
-    pISet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
+    pISet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
 
     // Title2
 
@@ -416,7 +416,7 @@ void SdDrawDocument::CreateLayoutTemplates()
 
     pISet->Put(SvxULSpaceItem(100, 100, EE_PARA_ULSPACE ));      // Paragraph margin above/below: 1 mm
 
-    pISet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
+    pISet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
 
     // Headline
 
@@ -1210,7 +1210,7 @@ void SdDrawDocument::SetTextDefaults() const
     aNumberFormat.SetBulletRelSize(45);
     aNumberFormat.SetBulletColor(Color(COL_AUTO));
     aNumberFormat.SetStart(1);
-    aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
+    aNumberFormat.SetNumAdjust(SvxAdjust::Left);
 
     SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
 
@@ -1270,10 +1270,10 @@ void SdDrawDocument::SetDefaultWritingMode(css::text::WritingMode eMode )
         SvxFrameDirectionItem aModeItem( nVal, EE_PARA_WRITINGDIR );
         pItemPool->SetPoolDefaultItem( aModeItem );
 
-        SvxAdjustItem aAdjust( SVX_ADJUST_LEFT, EE_PARA_JUST );
+        SvxAdjustItem aAdjust( SvxAdjust::Left, EE_PARA_JUST );
 
         if( eMode == css::text::WritingMode_RL_TB )
-            aAdjust.SetEnumValue( SVX_ADJUST_RIGHT );
+            aAdjust.SetAdjust( SvxAdjust::Right );
 
         pItemPool->SetPoolDefaultItem( aAdjust );
 
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 70326ea..d74dccf 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -478,22 +478,22 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
             aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CTL ) );
             aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CJK ) );
 
-            SvxAdjust eH = SVX_ADJUST_LEFT;
+            SvxAdjust eH = SvxAdjust::Left;
 
             if( (eObjKind == PRESOBJ_DATETIME) && (mePageKind != PageKind::Standard ) )
             {
-                eH = SVX_ADJUST_RIGHT;
+                eH = SvxAdjust::Right;
             }
             else if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind == PageKind::Standard ) )
             {
-                eH = SVX_ADJUST_CENTER;
+                eH = SvxAdjust::Center;
             }
             else if( eObjKind == PRESOBJ_SLIDENUMBER )
             {
-                eH = SVX_ADJUST_RIGHT;
+                eH = SvxAdjust::Right;
             }
 
-            if( eH != SVX_ADJUST_LEFT )
+            if( eH != SvxAdjust::Left )
                 aTempAttr.Put(SvxAdjustItem(eH, EE_PARA_JUST ));
 
             pSdrObj->SetMergedItemSet(aTempAttr);
@@ -537,7 +537,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
         {
             SfxItemSet aSet( static_cast<SdDrawDocument*>(pModel)->GetPool() );
             aSet.Put( makeSdrTextContourFrameItem( true ) );
-            aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+            aSet.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
 
             pSdrObj->SetMergedItemSet(aSet);
         }
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 29afb37..d16e2fb 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -364,7 +364,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
         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 ));
+        rTitleSet.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
         rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         // #i16874# enable kerning by default but only for new documents
         rTitleSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
@@ -410,7 +410,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
         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 ));
+        rSubtitleSet.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
         rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         // #i16874# enable kerning by default but only for new documents
         rSubtitleSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
@@ -1097,7 +1097,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
             aNumberFormat.SetBulletRelSize(45);
             aNumberFormat.SetBulletColor(Color(COL_AUTO));
             aNumberFormat.SetStart(1);
-            aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
+            aNumberFormat.SetNumAdjust(SvxAdjust::Left);
 
             SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
 
@@ -1154,7 +1154,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
             SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
             aNumberFormat.SetBulletColor(Color(COL_AUTO));
             aNumberFormat.SetStart(1);
-            aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
+            aNumberFormat.SetNumAdjust(SvxAdjust::Left);
 
             SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR |
                                  SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 95eaad9..51d7307 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -224,7 +224,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
     }
     if ( !bAttributesAppliedFromGallery )
     {
-        pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+        pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
         pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
         pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
         pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 4551bc7..ea54683 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -466,7 +466,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
         else
             rAttr.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_BLOCK ) );
 
-        rAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+        rAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
         rAttr.Put( makeSdrTextLeftDistItem( 100 ) );
         rAttr.Put( makeSdrTextRightDistItem( 100 ) );
         rAttr.Put( makeSdrTextUpperDistItem( 100 ) );
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index ef19262..17015f8 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -481,16 +481,16 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
         SvxAdjust eAdj = static_cast<const SvxAdjustItem&>( aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
         switch( eAdj )
         {
-            case SVX_ADJUST_LEFT:
+            case SvxAdjust::Left:
                 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
             break;
-            case SVX_ADJUST_CENTER:
+            case SvxAdjust::Center:
                 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
             break;
-            case SVX_ADJUST_RIGHT:
+            case SvxAdjust::Right:
                 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
             break;
-            case SVX_ADJUST_BLOCK:
+            case SvxAdjust::Block:
                 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
             break;
             default:
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 00d2434..801664d 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -491,22 +491,22 @@ void TextObjectBar::Execute( SfxRequest &rReq )
 
                     case SID_ATTR_PARA_ADJUST_LEFT:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
                     }
                     break;
                     case SID_ATTR_PARA_ADJUST_CENTER:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
                     }
                     break;
                     case SID_ATTR_PARA_ADJUST_RIGHT:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
                     }
                     break;
                     case SID_ATTR_PARA_ADJUST_BLOCK:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Block, EE_PARA_JUST ) );
                     }
                     break;
                     case SID_ATTR_PARA_LINESPACE_10:
@@ -579,21 +579,21 @@ void TextObjectBar::Execute( SfxRequest &rReq )
             {
                 bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
 
-                sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+                SvxAdjust nAdjust = SvxAdjust::Left;
                 if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
-                    nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetEnumValue();
+                    nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetAdjust();
 
                 if( bLeftToRight )
                 {
                     aNewAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
-                    if( nAdjust == SVX_ADJUST_RIGHT )
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+                    if( nAdjust == SvxAdjust::Right )
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
                 }
                 else
                 {
                     aNewAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
-                    if( nAdjust == SVX_ADJUST_LEFT )
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+                    if( nAdjust == SvxAdjust::Left )
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
                 }
 
                 rReq.Done( aNewAttr );
@@ -627,22 +627,22 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                 {
                 case SID_ATTR_PARA_ADJUST_LEFT:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
                     }
                     break;
                 case SID_ATTR_PARA_ADJUST_CENTER:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
                     }
                     break;
                 case SID_ATTR_PARA_ADJUST_RIGHT:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
                     }
                     break;
                 case SID_ATTR_PARA_ADJUST_BLOCK:
                     {
-                        aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+                        aNewAttr.Put( SvxAdjustItem( SvxAdjust::Block, EE_PARA_JUST ) );
                     }
                     break;
                 }
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index ea73c94..99220ac 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -685,7 +685,7 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         break;
         case SID_ATTR_PARA_ADJUST_LEFT:
         {
-            SvxAdjustItem aItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+            SvxAdjustItem aItem( SvxAdjust::Left, EE_PARA_JUST );
             SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
 
             aEditAttr.Put( aItem );
@@ -696,7 +696,7 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         break;
         case SID_ATTR_PARA_ADJUST_CENTER:
         {
-            SvxAdjustItem aItem( SVX_ADJUST_CENTER, EE_PARA_JUST );
+            SvxAdjustItem aItem( SvxAdjust::Center, EE_PARA_JUST );
             SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
 
             aEditAttr.Put( aItem );
@@ -707,7 +707,7 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         break;
         case SID_ATTR_PARA_ADJUST_RIGHT:
         {
-            SvxAdjustItem aItem( SVX_ADJUST_RIGHT, EE_PARA_JUST );
+            SvxAdjustItem aItem( SvxAdjust::Right, EE_PARA_JUST );
             SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
 
             aEditAttr.Put( aItem );
@@ -718,7 +718,7 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         break;
         case SID_ATTR_PARA_ADJUST_BLOCK:
         {
-            SvxAdjustItem aItem( SVX_ADJUST_BLOCK, EE_PARA_JUST );
+            SvxAdjustItem aItem( SvxAdjust::Block, EE_PARA_JUST );
             SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
 
             aEditAttr.Put( aItem );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 0a7c7e0..e07c835 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -291,7 +291,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 
                 SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
-                if ( eAdj == SVX_ADJUST_LEFT)
+                if ( eAdj == SvxAdjust::Left)
                 {
                     rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
                 }
@@ -308,7 +308,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 
                 SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
-                if ( eAdj == SVX_ADJUST_CENTER)
+                if ( eAdj == SvxAdjust::Center)
                 {
                     rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
                 }
@@ -325,7 +325,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 
                 SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
-                if ( eAdj == SVX_ADJUST_RIGHT)
+                if ( eAdj == SvxAdjust::Right)
                 {
                     rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
                 }
@@ -342,7 +342,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 
                 SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
-                if ( eAdj == SVX_ADJUST_BLOCK)
+                if ( eAdj == SvxAdjust::Block)
                 {
                     rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
                 }
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index ef7013c..4a9da50 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -29,8 +29,8 @@ SvxParaPrevWindow::SvxParaPrevWindow( vcl::Window* pParent,  WinBits nBits) :
     nFirstLineOfst  ( 0 ),
     nUpper          ( 0 ),
     nLower          ( 0 ),
-    eAdjust         ( SVX_ADJUST_LEFT ),
-    eLastLine       ( SVX_ADJUST_LEFT ),
+    eAdjust         ( SvxAdjust::Left ),
+    eLastLine       ( SvxAdjust::Left ),
     eLine           ( SvxPrevLineSpace::N1 ),
     nLineVal        ( 0 )
 
@@ -156,31 +156,31 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
 
             switch (eAdjust)
             {
-                case SVX_ADJUST_LEFT:
+                case SvxAdjust::Left:
                     break;
-                case SVX_ADJUST_RIGHT:
+                case SvxAdjust::Right:
                     aPnt.X() += ( aSiz.Width() - nLW );
                     break;
-                case SVX_ADJUST_CENTER:
+                case SvxAdjust::Center:
                     aPnt.X() += ( aSiz.Width() - nLW ) / 2;
                     break;
                 default: ; //prevent warning
             }
-            if (SVX_ADJUST_BLOCK == eAdjust)
+            if (SvxAdjust::Block == eAdjust)
             {
                 if(5 == i)
                 {
                     switch( eLastLine )
                     {
-                        case SVX_ADJUST_LEFT:
+                        case SvxAdjust::Left:
                             break;
-                        case SVX_ADJUST_RIGHT:
+                        case SvxAdjust::Right:
                             aPnt.X() += ( aSiz.Width() - nLW );
                             break;
-                        case SVX_ADJUST_CENTER:
+                        case SvxAdjust::Center:
                             aPnt.X() += ( aSiz.Width() - nLW ) / 2;
                             break;
-                        case SVX_ADJUST_BLOCK:
+                        case SvxAdjust::Block:
                             nLW = aSiz.Width();
                             break;
                         default: ; //prevent warning
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 884f9be..cdb03d6 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -381,7 +381,7 @@ namespace sdr
             }
             else
             {
-                mpItemSet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST));
+                mpItemSet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
                 mpItemSet->Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
                 mpItemSet->Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
             }
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index ce9d893..926ae34 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1026,9 +1026,9 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
                 SvxAdjust eAdjust = static_cast<const SvxAdjustItem&>(GetObjectItemSet().Get(EE_PARA_JUST)).GetAdjust();
                 switch(eAdjust)
                 {
-                    case SVX_ADJUST_LEFT:   eHAdj = SDRTEXTHORZADJUST_LEFT; break;
-                    case SVX_ADJUST_RIGHT:  eHAdj = SDRTEXTHORZADJUST_RIGHT; break;
-                    case SVX_ADJUST_CENTER: eHAdj = SDRTEXTHORZADJUST_CENTER; break;
+                    case SvxAdjust::Left:   eHAdj = SDRTEXTHORZADJUST_LEFT; break;
+                    case SvxAdjust::Right:  eHAdj = SDRTEXTHORZADJUST_RIGHT; break;
+                    case SvxAdjust::Center: eHAdj = SDRTEXTHORZADJUST_CENTER; break;
                     default: break;
                 }
             }
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a48caad..562bfd1 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -359,6 +359,12 @@ private:
     SwDoc* createDoc(const char* pName = nullptr);
 };
 
+std::ostream& operator<<(std::ostream& s, SvxAdjust n)
+{
+    s << (int)n;
+    return s;
+}
+
 SwDoc* SwUiWriterTest::createDoc(const char* pName)
 {
     if (!pName)
@@ -1567,12 +1573,12 @@ void SwUiWriterTest::testTdf79236()
     SvxAdjustItem AdjustItem = rAttrSet.GetAdjust();
     SvxAdjust initialAdjust = AdjustItem.GetAdjust();
     //By default the adjust is LEFT
-    CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, initialAdjust);
+    CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, initialAdjust);
     //Changing the adjust to RIGHT
-    AdjustItem.SetAdjust(SVX_ADJUST_RIGHT);
+    AdjustItem.SetAdjust(SvxAdjust::Right);
     //Checking whether the change is made or not
     SvxAdjust modifiedAdjust = AdjustItem.GetAdjust();
-    CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, modifiedAdjust);
+    CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, modifiedAdjust);
     //Modifying the itemset, putting *one* item
     pNewSet->Put(AdjustItem);
     //The count should increment by 1
@@ -1586,7 +1592,7 @@ void SwUiWriterTest::testTdf79236()
     const SvxAdjustItem& rAdjustItem2 = rAttrSet2.GetAdjust();
     SvxAdjust Adjust2 = rAdjustItem2.GetAdjust();
     //The adjust should be RIGHT as per the modifications made
-    CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, Adjust2);
+    CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust2);
     //Undo the changes
     rUndoManager.Undo();
     SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName("Text Body");
@@ -1594,7 +1600,7 @@ void SwUiWriterTest::testTdf79236()
     const SvxAdjustItem& rAdjustItem3 = rAttrSet3.GetAdjust();
     SvxAdjust Adjust3 = rAdjustItem3.GetAdjust();
     //The adjust should be back to default, LEFT
-    CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, Adjust3);
+    CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust3);
     //Redo the changes
     rUndoManager.Redo();
     SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName("Text Body");
@@ -1602,7 +1608,7 @@ void SwUiWriterTest::testTdf79236()
     const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust();
     SvxAdjust Adjust4 = rAdjustItem4.GetAdjust();
     //The adjust should be RIGHT as per the modifications made
-    CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, Adjust4);
+    CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust4);
     //Undo the changes
     rUndoManager.Undo();
     SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName("Text Body");
@@ -1610,7 +1616,7 @@ void SwUiWriterTest::testTdf79236()
     const SvxAdjustItem& rAdjustItem5 = rAttrSet5.GetAdjust();
     SvxAdjust Adjust5 = rAdjustItem5.GetAdjust();
     //The adjust should be back to default, LEFT
-    CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, Adjust5);
+    CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust5);
 }
 
 void SwUiWriterTest::testTextSearch()
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 45500bf..59764a4 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -536,7 +536,7 @@ void InitCore()
     aAttrTab[ RES_TXTATR_DUMMY3 - POOLATTR_BEGIN ] =        new SfxBoolItem( RES_TXTATR_DUMMY3 );
 
     aAttrTab[ RES_PARATR_LINESPACING- POOLATTR_BEGIN ] =    new SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
-    aAttrTab[ RES_PARATR_ADJUST- POOLATTR_BEGIN ] =         new SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST );
+    aAttrTab[ RES_PARATR_ADJUST- POOLATTR_BEGIN ] =         new SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST );
     aAttrTab[ RES_PARATR_SPLIT- POOLATTR_BEGIN ] =          new SvxFormatSplitItem( true, RES_PARATR_SPLIT );
     aAttrTab[ RES_PARATR_WIDOWS- POOLATTR_BEGIN ] =         new SvxWidowsItem( 0, RES_PARATR_WIDOWS );
     aAttrTab[ RES_PARATR_ORPHANS- POOLATTR_BEGIN ] =        new SvxOrphansItem( 0, RES_PARATR_ORPHANS );
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index ea71014..d756d99 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1922,8 +1922,8 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
 
                     const SvxAdjustItem& rAdj = static_cast<const SvxAdjustItem&>(pCNd->
                                         GetAttr( RES_PARATR_ADJUST ));
-                    if( SVX_ADJUST_LEFT != rAdj.GetAdjust() )
-                        aSet.Put( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
+                    if( SvxAdjust::Left != rAdj.GetAdjust() )
+                        aSet.Put( SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST ) );
 
                     GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurrentCursor, aSet );
                 }
@@ -1947,14 +1947,14 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
             case FILL_MARGIN:
                 if( text::HoriOrientation::NONE != aFPos.eOrient )
                 {
-                    SvxAdjustItem aAdj( SVX_ADJUST_LEFT, RES_PARATR_ADJUST );
+                    SvxAdjustItem aAdj( SvxAdjust::Left, RES_PARATR_ADJUST );
                     switch( aFPos.eOrient )
                     {
                     case text::HoriOrientation::CENTER:
-                        aAdj.SetAdjust( SVX_ADJUST_CENTER );
+                        aAdj.SetAdjust( SvxAdjust::Center );
                         break;
                     case text::HoriOrientation::RIGHT:
-                        aAdj.SetAdjust( SVX_ADJUST_RIGHT );
+                        aAdj.SetAdjust( SvxAdjust::Right );
                         break;
                     default:
                         break;
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index c5d8fa0..7da1a12 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -358,7 +358,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
                 if (GetDefaultFrameDirection(nAppLanguage) ==
                     FRMDIR_HORI_RIGHT_TOP)
                 {
-                    SvxAdjustItem aAdjust(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST );
+                    SvxAdjustItem aAdjust(SvxAdjust::Right, RES_PARATR_ADJUST );
                     aSet.Put(aAdjust);
                 }
                 if (nAppLanguage == LANGUAGE_KOREAN)
@@ -592,7 +592,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
         case RES_POOLCOLL_TABLE_HDLN:
             {
                 SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
-                aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
+                aSet.Put( SvxAdjustItem( SvxAdjust::Center, RES_PARATR_ADJUST ) );
                 SwFormatLineNumber aLN;
                 aLN.SetCountLines( false );
                 aSet.Put( aLN );
@@ -977,7 +977,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
                 SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
                 SetAllScriptItem( aSet, SvxFontHeightItem( PT_28, 100, RES_CHRATR_FONTSIZE ) );
 
-                aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
+                aSet.Put( SvxAdjustItem( SvxAdjust::Center, RES_PARATR_ADJUST ) );
 
                 pNewColl->SetNextTextFormatColl( *GetTextCollFromPool( RES_POOLCOLL_TEXT ));
             }
@@ -989,7 +989,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
                 aSet.Put( aUL );
                 SetAllScriptItem( aSet, SvxFontHeightItem( PT_18, 100, RES_CHRATR_FONTSIZE ));
 
-                aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ));

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list