[Libreoffice-commits] core.git: cui/source dbaccess/source editeng/source include/editeng sc/qa sc/source sw/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Mar 9 07:26:40 UTC 2017


 cui/source/tabpages/align.cxx                        |   18 +-
 dbaccess/source/ui/misc/HtmlReader.cxx               |   10 -
 dbaccess/source/ui/misc/UITools.cxx                  |   20 +-
 dbaccess/source/ui/tabledesign/FieldDescriptions.cxx |    6 
 dbaccess/source/ui/tabledesign/TableRow.cxx          |    2 
 editeng/source/items/justifyitem.cxx                 |   58 +++---
 include/editeng/justifyitem.hxx                      |    2 
 include/editeng/svxenum.hxx                          |   14 -
 sc/qa/unit/helper/qahelper.cxx                       |   26 +--
 sc/qa/unit/subsequent_filters-test.cxx               |   11 -
 sc/source/core/data/attarray.cxx                     |   10 -
 sc/source/core/data/column2.cxx                      |    8 
 sc/source/core/data/docpool.cxx                      |    2 
 sc/source/core/data/dpoutput.cxx                     |    2 
 sc/source/core/data/patattr.cxx                      |   24 +-
 sc/source/core/data/table1.cxx                       |    4 
 sc/source/core/tool/autoform.cxx                     |    4 
 sc/source/core/tool/editutil.cxx                     |    2 
 sc/source/core/tool/interpr1.cxx                     |   12 -
 sc/source/filter/excel/xestyle.cxx                   |    4 
 sc/source/filter/excel/xlstyle.cxx                   |   26 +--
 sc/source/filter/html/htmlexp.cxx                    |   12 -
 sc/source/filter/html/htmlpars.cxx                   |   24 +-
 sc/source/filter/lotus/lotattr.cxx                   |    2 
 sc/source/filter/lotus/memory.cxx                    |   10 -
 sc/source/filter/lotus/op.cxx                        |   12 -
 sc/source/filter/oox/stylesbuffer.cxx                |   14 -
 sc/source/filter/orcus/interface.cxx                 |   10 -
 sc/source/filter/qpro/qprostyle.cxx                  |   12 -
 sc/source/filter/rtf/rtfexp.cxx                      |   12 -
 sc/source/filter/starcalc/scflt.cxx                  |   12 -
 sc/source/ui/Accessibility/AccessibleText.cxx        |   10 -
 sc/source/ui/app/inputhdl.cxx                        |   16 -
 sc/source/ui/app/transobj.cxx                        |    4 
 sc/source/ui/docshell/docfunc.cxx                    |    2 
 sc/source/ui/docshell/docsh.cxx                      |   10 -
 sc/source/ui/miscdlgs/autofmt.cxx                    |   20 +-
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx      |    8 
 sc/source/ui/undo/undoblk3.cxx                       |    2 
 sc/source/ui/view/formatsh.cxx                       |   44 ++---
 sc/source/ui/view/gridwin.cxx                        |   23 +-
 sc/source/ui/view/output2.cxx                        |  162 +++++++++----------
 sc/source/ui/view/viewdata.cxx                       |   10 -
 sc/source/ui/view/viewfunc.cxx                       |    4 
 sw/source/core/doc/tblafmt.cxx                       |    2 
 45 files changed, 356 insertions(+), 346 deletions(-)

New commits:
commit 9b95093950436caebd45a06008929427869844fa
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 8 12:39:34 2017 +0200

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

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 4a46c38..cae1c68 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -54,14 +54,14 @@ typedef sfx::ListBoxConnection< HorJustItemWrapper > HorJustConnection;
 
 static const HorJustConnection::MapEntryType s_pHorJustMap[] =
 {
-    { ALIGNDLG_HORALIGN_STD,    SVX_HOR_JUSTIFY_STANDARD    },
-    { ALIGNDLG_HORALIGN_LEFT,   SVX_HOR_JUSTIFY_LEFT        },
-    { ALIGNDLG_HORALIGN_CENTER, SVX_HOR_JUSTIFY_CENTER      },
-    { ALIGNDLG_HORALIGN_RIGHT,  SVX_HOR_JUSTIFY_RIGHT       },
-    { ALIGNDLG_HORALIGN_BLOCK,  SVX_HOR_JUSTIFY_BLOCK       },
-    { ALIGNDLG_HORALIGN_FILL,   SVX_HOR_JUSTIFY_REPEAT      },
-    { ALIGNDLG_HORALIGN_DISTRIBUTED, SVX_HOR_JUSTIFY_BLOCK  },
-    { WRAPPER_LISTBOX_ENTRY_NOTFOUND,   SVX_HOR_JUSTIFY_STANDARD    }
+    { ALIGNDLG_HORALIGN_STD,    SvxCellHorJustify::Standard    },
+    { ALIGNDLG_HORALIGN_LEFT,   SvxCellHorJustify::Left        },
+    { ALIGNDLG_HORALIGN_CENTER, SvxCellHorJustify::Center      },
+    { ALIGNDLG_HORALIGN_RIGHT,  SvxCellHorJustify::Right       },
+    { ALIGNDLG_HORALIGN_BLOCK,  SvxCellHorJustify::Block       },
+    { ALIGNDLG_HORALIGN_FILL,   SvxCellHorJustify::Repeat      },
+    { ALIGNDLG_HORALIGN_DISTRIBUTED, SvxCellHorJustify::Block  },
+    { WRAPPER_LISTBOX_ENTRY_NOTFOUND,   SvxCellHorJustify::Standard    }
 };
 
 // vertical alignment ---------------------------------------------------------
@@ -309,7 +309,7 @@ void AlignmentTabPage::Reset( const SfxItemSet* rCoreAttrs )
     lcl_MaybeResetAlignToDistro<SvxCellHorJustify, SvxCellHorJustify>(
         *m_pLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED, *rCoreAttrs,
         GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY), GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD),
-        SVX_HOR_JUSTIFY_BLOCK);
+        SvxCellHorJustify::Block);
 
     lcl_MaybeResetAlignToDistro<SvxCellVerJustify, SvxCellVerJustify>(
         *m_pLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED, *rCoreAttrs,
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 6ab4050..11c36b6 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -316,13 +316,13 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
             {
                 const OUString& rOptVal = rOption.GetString();
                 if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right ))
-                    eVal = SVX_HOR_JUSTIFY_RIGHT;
+                    eVal = SvxCellHorJustify::Right;
                 else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_center ))
-                    eVal = SVX_HOR_JUSTIFY_CENTER;
+                    eVal = SvxCellHorJustify::Center;
                 else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left ))
-                    eVal = SVX_HOR_JUSTIFY_LEFT;
+                    eVal = SvxCellHorJustify::Left;
                 else
-                    eVal = SVX_HOR_JUSTIFY_STANDARD;
+                    eVal = SvxCellHorJustify::Standard;
             }
             break;
             case HTML_O_WIDTH:
@@ -449,7 +449,7 @@ bool OHTMLReader::CreateTable(int nToken)
                     aColumnName.clear();
                     m_sCurrent.clear();
 
-                    eVal = SVX_HOR_JUSTIFY_STANDARD;
+                    eVal = SvxCellHorJustify::Standard;
                     bTableHeader = false;
                 }
                 break;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index e0df88e..51e8f1a 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -723,10 +723,10 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
     sal_Int32 nAlignment = css::awt::TextAlign::LEFT;
     switch (_eAlignment)
     {
-        case SVX_HOR_JUSTIFY_STANDARD:
-        case SVX_HOR_JUSTIFY_LEFT:      nAlignment = css::awt::TextAlign::LEFT;    break;
-        case SVX_HOR_JUSTIFY_CENTER:    nAlignment = css::awt::TextAlign::CENTER;  break;
-        case SVX_HOR_JUSTIFY_RIGHT:     nAlignment = css::awt::TextAlign::RIGHT;   break;
+        case SvxCellHorJustify::Standard:
+        case SvxCellHorJustify::Left:      nAlignment = css::awt::TextAlign::LEFT;    break;
+        case SvxCellHorJustify::Center:    nAlignment = css::awt::TextAlign::CENTER;  break;
+        case SvxCellHorJustify::Right:     nAlignment = css::awt::TextAlign::RIGHT;   break;
         default:
             SAL_WARN("dbaccess.ui", "Invalid TextAlign!");
     }
@@ -735,12 +735,12 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
 
 SvxCellHorJustify mapTextJustify(sal_Int32 _nAlignment)
 {
-    SvxCellHorJustify eJustify = SVX_HOR_JUSTIFY_LEFT;
+    SvxCellHorJustify eJustify = SvxCellHorJustify::Left;
     switch (_nAlignment)
     {
-        case css::awt::TextAlign::LEFT     : eJustify = SVX_HOR_JUSTIFY_LEFT; break;
-        case css::awt::TextAlign::CENTER   : eJustify = SVX_HOR_JUSTIFY_CENTER; break;
-        case css::awt::TextAlign::RIGHT    : eJustify = SVX_HOR_JUSTIFY_RIGHT; break;
+        case css::awt::TextAlign::LEFT     : eJustify = SvxCellHorJustify::Left; break;
+        case css::awt::TextAlign::CENTER   : eJustify = SvxCellHorJustify::Center; break;
+        case css::awt::TextAlign::RIGHT    : eJustify = SvxCellHorJustify::Right; break;
         default:
             SAL_WARN("dbaccess.ui", "Invalid TextAlign!");
     }
@@ -760,7 +760,7 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol,
             bool bHasFormat = xInfo->hasPropertyByName(PROPERTY_FORMATKEY);
             sal_Int32 nDataType = ::comphelper::getINT32(xField->getPropertyValue(PROPERTY_TYPE));
 
-            SvxCellHorJustify eJustify(SVX_HOR_JUSTIFY_STANDARD);
+            SvxCellHorJustify eJustify(SvxCellHorJustify::Standard);
             Any aAlignment = xAffectedCol->getPropertyValue(PROPERTY_ALIGN);
             if (aAlignment.hasValue())
                 eJustify = dbaui::mapTextJustify(::comphelper::getINT16(aAlignment));
@@ -813,7 +813,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
     {
         new SfxRangeItem(SBA_DEF_RANGEFORMAT, SBA_DEF_FMTVALUE, SBA_ATTR_ALIGN_HOR_JUSTIFY),
         new SfxUInt32Item(SBA_DEF_FMTVALUE),
-        new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, SBA_ATTR_ALIGN_HOR_JUSTIFY),
+        new SvxHorJustifyItem(SvxCellHorJustify::Standard, SBA_ATTR_ALIGN_HOR_JUSTIFY),
         new SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, false),
         new SvxNumberInfoItem(SID_ATTR_NUMBERFORMAT_INFO)
     };
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index c96355c..24b50f0 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -47,7 +47,7 @@ OFieldDescription::OFieldDescription()
     ,m_nScale(0)
     ,m_nIsNullable(ColumnValue::NULLABLE)
     ,m_nFormatKey(0)
-    ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD)
+    ,m_eHorJustify(SvxCellHorJustify::Standard)
     ,m_bIsAutoIncrement(false)
     ,m_bIsPrimaryKey(false)
     ,m_bIsCurrency(false)
@@ -91,7 +91,7 @@ OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedC
     ,m_nScale(0)
     ,m_nIsNullable(ColumnValue::NULLABLE)
     ,m_nFormatKey(0)
-    ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD)
+    ,m_eHorJustify(SvxCellHorJustify::Standard)
     ,m_bIsAutoIncrement(false)
     ,m_bIsPrimaryKey(false)
     ,m_bIsCurrency(false)
@@ -628,7 +628,7 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r
 
         if ( GetFormatKey() != NumberFormat::ALL && xInfo->hasPropertyByName(PROPERTY_FORMATKEY) )
             _rxColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(GetFormatKey()));
-        if ( GetHorJustify() != SVX_HOR_JUSTIFY_STANDARD && xInfo->hasPropertyByName(PROPERTY_ALIGN) )
+        if ( GetHorJustify() != SvxCellHorJustify::Standard && xInfo->hasPropertyByName(PROPERTY_ALIGN) )
             _rxColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(GetHorJustify())));
         if ( !GetHelpText().isEmpty() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) )
             _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(GetHelpText()));
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index 28257c1..6512fcb 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -128,7 +128,7 @@ namespace dbaui
             _rStr.WriteInt32( pFieldDesc->GetScale() );
             _rStr.WriteInt32( pFieldDesc->GetIsNullable() );
             _rStr.WriteInt32( pFieldDesc->GetFormatKey() );
-            _rStr.WriteInt32( pFieldDesc->GetHorJustify() );
+            _rStr.WriteInt32( (sal_Int32)pFieldDesc->GetHorJustify() );
             _rStr.WriteInt32( pFieldDesc->IsAutoIncrement() ? 1 : 0 );
             _rStr.WriteInt32( pFieldDesc->IsPrimaryKey() ? 1 : 0 );
             _rStr.WriteInt32( pFieldDesc->IsCurrency() ? 1 : 0 );
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index 5d63a37..7f37aa8 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -31,14 +31,14 @@
 #include <com/sun/star/style/VerticalAlignment.hpp>
 
 
-SfxPoolItem* SvxHorJustifyItem::CreateDefault() { return new  SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, 0) ;}
+SfxPoolItem* SvxHorJustifyItem::CreateDefault() { return new  SvxHorJustifyItem(SvxCellHorJustify::Standard, 0) ;}
 SfxPoolItem* SvxVerJustifyItem::CreateDefault() { return new  SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, 0) ;}
 
 using namespace ::com::sun::star;
 
 
 SvxHorJustifyItem::SvxHorJustifyItem( const sal_uInt16 nId ) :
-    SfxEnumItem( nId, SVX_HOR_JUSTIFY_STANDARD )
+    SfxEnumItem( nId, SvxCellHorJustify::Standard )
 {
 }
 
@@ -56,7 +56,7 @@ bool SvxHorJustifyItem::GetPresentation
     MapUnit             /*ePresUnit*/,
     OUString&           rText, const IntlWrapper *)    const
 {
-    rText = GetValueText( GetValue() );
+    rText = GetValueText( (sal_uInt16)GetValue() );
     return true;
 }
 
@@ -71,12 +71,12 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
                 table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD;
                 switch ( (SvxCellHorJustify)GetValue() )
                 {
-                    case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break;
-                    case SVX_HOR_JUSTIFY_LEFT:     eUno = table::CellHoriJustify_LEFT;     break;
-                    case SVX_HOR_JUSTIFY_CENTER:   eUno = table::CellHoriJustify_CENTER;   break;
-                    case SVX_HOR_JUSTIFY_RIGHT:    eUno = table::CellHoriJustify_RIGHT;    break;
-                    case SVX_HOR_JUSTIFY_BLOCK:    eUno = table::CellHoriJustify_BLOCK;    break;
-                    case SVX_HOR_JUSTIFY_REPEAT:   eUno = table::CellHoriJustify_REPEAT;   break;
+                    case SvxCellHorJustify::Standard: eUno = table::CellHoriJustify_STANDARD; break;
+                    case SvxCellHorJustify::Left:     eUno = table::CellHoriJustify_LEFT;     break;
+                    case SvxCellHorJustify::Center:   eUno = table::CellHoriJustify_CENTER;   break;
+                    case SvxCellHorJustify::Right:    eUno = table::CellHoriJustify_RIGHT;    break;
+                    case SvxCellHorJustify::Block:    eUno = table::CellHoriJustify_BLOCK;    break;
+                    case SvxCellHorJustify::Repeat:   eUno = table::CellHoriJustify_REPEAT;   break;
                 }
                 rVal <<= eUno;
             }
@@ -90,12 +90,12 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
                 switch ( (SvxCellHorJustify)GetValue() )
                 {
                     // ParagraphAdjust_LEFT is used for STANDARD and REPEAT
-                    case SVX_HOR_JUSTIFY_STANDARD:
-                    case SVX_HOR_JUSTIFY_REPEAT:
-                    case SVX_HOR_JUSTIFY_LEFT:   nAdjust = style::ParagraphAdjust_LEFT;   break;
-                    case SVX_HOR_JUSTIFY_CENTER: nAdjust = style::ParagraphAdjust_CENTER; break;
-                    case SVX_HOR_JUSTIFY_RIGHT:  nAdjust = style::ParagraphAdjust_RIGHT;  break;
-                    case SVX_HOR_JUSTIFY_BLOCK:  nAdjust = style::ParagraphAdjust_BLOCK;  break;
+                    case SvxCellHorJustify::Standard:
+                    case SvxCellHorJustify::Repeat:
+                    case SvxCellHorJustify::Left:   nAdjust = style::ParagraphAdjust_LEFT;   break;
+                    case SvxCellHorJustify::Center: nAdjust = style::ParagraphAdjust_CENTER; break;
+                    case SvxCellHorJustify::Right:  nAdjust = style::ParagraphAdjust_RIGHT;  break;
+                    case SvxCellHorJustify::Block:  nAdjust = style::ParagraphAdjust_BLOCK;  break;
                 }
                 rVal <<= nAdjust;       // as sal_Int16
             }
@@ -119,15 +119,15 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
                         return false;
                     eUno = (table::CellHoriJustify)nValue;
                 }
-                SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+                SvxCellHorJustify eSvx = SvxCellHorJustify::Standard;
                 switch (eUno)
                 {
-                    case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break;
-                    case table::CellHoriJustify_LEFT:     eSvx = SVX_HOR_JUSTIFY_LEFT;     break;
-                    case table::CellHoriJustify_CENTER:   eSvx = SVX_HOR_JUSTIFY_CENTER;   break;
-                    case table::CellHoriJustify_RIGHT:    eSvx = SVX_HOR_JUSTIFY_RIGHT;    break;
-                    case table::CellHoriJustify_BLOCK:    eSvx = SVX_HOR_JUSTIFY_BLOCK;    break;
-                    case table::CellHoriJustify_REPEAT:   eSvx = SVX_HOR_JUSTIFY_REPEAT;   break;
+                    case table::CellHoriJustify_STANDARD: eSvx = SvxCellHorJustify::Standard; break;
+                    case table::CellHoriJustify_LEFT:     eSvx = SvxCellHorJustify::Left;     break;
+                    case table::CellHoriJustify_CENTER:   eSvx = SvxCellHorJustify::Center;   break;
+                    case table::CellHoriJustify_RIGHT:    eSvx = SvxCellHorJustify::Right;    break;
+                    case table::CellHoriJustify_BLOCK:    eSvx = SvxCellHorJustify::Block;    break;
+                    case table::CellHoriJustify_REPEAT:   eSvx = SvxCellHorJustify::Repeat;   break;
                     default: ; //prevent warning
                 }
                 SetValue( eSvx );
@@ -140,15 +140,15 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
                 if(!(rVal >>= nVal))
                     return false;
 
-                SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+                SvxCellHorJustify eSvx = SvxCellHorJustify::Standard;
                 switch (nVal)
                 {
                     //  STRETCH is treated as BLOCK
-                    case style::ParagraphAdjust_LEFT:    eSvx = SVX_HOR_JUSTIFY_LEFT;   break;
-                    case style::ParagraphAdjust_RIGHT:   eSvx = SVX_HOR_JUSTIFY_RIGHT;  break;
+                    case style::ParagraphAdjust_LEFT:    eSvx = SvxCellHorJustify::Left;   break;
+                    case style::ParagraphAdjust_RIGHT:   eSvx = SvxCellHorJustify::Right;  break;
                     case style::ParagraphAdjust_STRETCH:
-                    case style::ParagraphAdjust_BLOCK:   eSvx = SVX_HOR_JUSTIFY_BLOCK;  break;
-                    case style::ParagraphAdjust_CENTER:  eSvx = SVX_HOR_JUSTIFY_CENTER; break;
+                    case style::ParagraphAdjust_BLOCK:   eSvx = SvxCellHorJustify::Block;  break;
+                    case style::ParagraphAdjust_CENTER:  eSvx = SvxCellHorJustify::Center; break;
                 }
                 SetValue( eSvx );
             }
@@ -159,7 +159,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 OUString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal )
 {
-    DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" );
+    DBG_ASSERT( nVal <= (sal_uInt16)SvxCellHorJustify::Repeat, "enum overflow!" );
     return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal);
 }
 
@@ -180,7 +180,7 @@ SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, sal_uInt16 ) const
 
 sal_uInt16 SvxHorJustifyItem::GetValueCount() const
 {
-    return SVX_HOR_JUSTIFY_REPEAT + 1;  // Last Enum value + 1
+    return (sal_uInt16)SvxCellHorJustify::Repeat + 1;  // Last Enum value + 1
 }
 
 
diff --git a/include/editeng/justifyitem.hxx b/include/editeng/justifyitem.hxx
index 1a384c2..3f5633c 100644
--- a/include/editeng/justifyitem.hxx
+++ b/include/editeng/justifyitem.hxx
@@ -33,7 +33,7 @@ public:
     explicit SvxHorJustifyItem( const sal_uInt16 nId );
 
     SvxHorJustifyItem(
-        const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/,
+        const SvxCellHorJustify eJustify /*= SvxCellHorJustify::Standard*/,
         const sal_uInt16 nId );
 
     virtual bool GetPresentation( SfxItemPresentation ePres,
diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index cfca470..5cf21d8 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -96,14 +96,14 @@ enum class SvxBreak
     End
 };
 
-enum SvxCellHorJustify
+enum class SvxCellHorJustify
 {
-    SVX_HOR_JUSTIFY_STANDARD,
-    SVX_HOR_JUSTIFY_LEFT,
-    SVX_HOR_JUSTIFY_CENTER,
-    SVX_HOR_JUSTIFY_RIGHT,
-    SVX_HOR_JUSTIFY_BLOCK,
-    SVX_HOR_JUSTIFY_REPEAT
+    Standard,
+    Left,
+    Center,
+    Right,
+    Block,
+    Repeat
 };
 
 enum class SvxCellJustifyMethod
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index b0a4847..3c4a42c 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -71,6 +71,12 @@ std::ostream& operator<<(std::ostream& rStrm, const OpCode& rCode)
     return rStrm;
 }
 
+std::ostream& operator<<(std::ostream& rStrm, const SvxCellHorJustify& rCode)
+{
+    rStrm << static_cast<int>(rCode);
+    return rStrm;
+}
+
 const FileFormat ScBootstrapFixture::aFileFormats[] = {
     { "ods" , "calc8", "", ODS_FORMAT_TYPE },
     { "xls" , "MS Excel 97", "calc_MS_EXCEL_97", XLS_FORMAT_TYPE },
@@ -227,15 +233,15 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
     Color aColor = static_cast<const SvxBrushItem&>(pPattern->GetItem(ATTR_BACKGROUND)).GetColor();
     CPPUNIT_ASSERT_EQUAL_MESSAGE("background color should be green", Color(COL_LIGHTGREEN), aColor);
     pPattern = pDoc->GetPattern(2,0,1);
-    SvxCellHorJustify eHorJustify = static_cast<SvxCellHorJustify>(static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue());
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned centre horizontally", SVX_HOR_JUSTIFY_CENTER, eHorJustify);
+    SvxCellHorJustify eHorJustify = static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue();
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned centre horizontally", SvxCellHorJustify::Center, eHorJustify);
     //test alignment
     pPattern = pDoc->GetPattern(2,1,1);
-    eHorJustify = static_cast<SvxCellHorJustify>(static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue());
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned right horizontally", SVX_HOR_JUSTIFY_RIGHT, eHorJustify);
+    eHorJustify = static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue();
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned right horizontally", SvxCellHorJustify::Right, eHorJustify);
     pPattern = pDoc->GetPattern(2,2,1);
-    eHorJustify = static_cast<SvxCellHorJustify>(static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue());
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned block horizontally", SVX_HOR_JUSTIFY_BLOCK, eHorJustify);
+    eHorJustify = static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue();
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned block horizontally", SvxCellHorJustify::Block, eHorJustify);
 
     //test Sheet3 only for ods and xlsx
     if ( nFormat == FORMAT_ODS || nFormat == FORMAT_XLSX )
@@ -253,8 +259,8 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
             CPPUNIT_ASSERT_EQUAL_MESSAGE("parent style for Sheet4.B2 is 'Excel Built-in Date'", sExpected, sResult);
             // check  align of style
             SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
-            eHorJustify = static_cast<SvxCellHorJustify>(static_cast< const SvxHorJustifyItem& >(rItemSet.Get( ATTR_HOR_JUSTIFY ) ).GetValue() );
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("'Excel Built-in Date' style should be aligned centre horizontally", SVX_HOR_JUSTIFY_CENTER, eHorJustify);
+            eHorJustify = static_cast< const SvxHorJustifyItem& >(rItemSet.Get( ATTR_HOR_JUSTIFY ) ).GetValue();
+            CPPUNIT_ASSERT_EQUAL_MESSAGE("'Excel Built-in Date' style should be aligned centre horizontally", SvxCellHorJustify::Center, eHorJustify);
             // check date format ( should be just month e.g. 29 )
             sResult =pDoc->GetString( 1,1,3 );
             sExpected = "29";
@@ -262,8 +268,8 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
 
             // check actual align applied to cell, should be the same as
             // the style
-            eHorJustify = static_cast<SvxCellHorJustify>(static_cast< const SvxHorJustifyItem& >(pPattern->GetItem( ATTR_HOR_JUSTIFY ) ).GetValue() );
-            CPPUNIT_ASSERT_EQUAL_MESSAGE("cell with 'Excel Built-in Date' style should be aligned centre horizontally", SVX_HOR_JUSTIFY_CENTER, eHorJustify);
+            eHorJustify = static_cast< const SvxHorJustifyItem& >(pPattern->GetItem( ATTR_HOR_JUSTIFY ) ).GetValue();
+            CPPUNIT_ASSERT_EQUAL_MESSAGE("cell with 'Excel Built-in Date' style should be aligned centre horizontally", SvxCellHorJustify::Center, eHorJustify);
         }
     }
 
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index a7ce8ee..b2d262d 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -360,6 +360,12 @@ private:
     uno::Reference<uno::XInterface> m_xCalcComponent;
 };
 
+std::ostream& operator<<(std::ostream& rStrm, const SvxCellHorJustify& rCode)
+{
+    rStrm << static_cast<int>(rCode);
+    return rStrm;
+}
+
 bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL,
     const OUString &rUserData, SfxFilterFlags nFilterFlags,
         SotClipboardFormatId nClipboardID, unsigned int nFilterVersion)
@@ -3029,7 +3035,7 @@ void ScFiltersTest::testOrcusODSStyleInterface()
         pStyleSheet->GetItemSet().HasItem(ATTR_HOR_JUSTIFY, &pItem));
 
     const SvxHorJustifyItem* pHorJustify = static_cast<const SvxHorJustifyItem*>(pItem);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("Style Name10 :Error with hor justify", SVX_HOR_JUSTIFY_RIGHT, pHorJustify->GetValue());
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Style Name10 :Error with hor justify", SvxCellHorJustify::Right, pHorJustify->GetValue());
 
     pStyleSheet = pStyleSheetPool->FindCaseIns("Name10", SfxStyleFamily::Para);
     CPPUNIT_ASSERT_MESSAGE("Style Name10 : Doesn't have Attribute ver justify, but it should have.",
@@ -3706,8 +3712,7 @@ void ScFiltersTest::testColumnStyle2XLSX()
     {
         const SfxPoolItem& rItem = pAttr->GetItem(ATTR_HOR_JUSTIFY);
         const SvxHorJustifyItem& rJustify = static_cast<const SvxHorJustifyItem&>(rItem);
-        sal_uInt16 nVal = rJustify.GetValue();
-        CPPUNIT_ASSERT_EQUAL((sal_uInt16)SVX_HOR_JUSTIFY_CENTER, nVal);
+        CPPUNIT_ASSERT_EQUAL(SvxCellHorJustify::Center, rJustify.GetValue());
     }
 
     {
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 98f3dc0..d6ea28a 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1404,7 +1404,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) cons
             else if (static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_LINEBREAK )).GetValue())
                 bFound = true;
             else if ((SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
-                        GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK)
+                        GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SvxCellHorJustify::Block)
                 bFound = true;
 
             else if (!static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData().empty())
@@ -1429,7 +1429,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) cons
             //  called only if the sheet is LTR, so physical=logical alignment can be assumed
             SvxCellHorJustify eHorJust = (SvxCellHorJustify)
                     static_cast<const SvxHorJustifyItem&>( pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
-            if ( eHorJust == SVX_HOR_JUSTIFY_RIGHT || eHorJust == SVX_HOR_JUSTIFY_CENTER )
+            if ( eHorJust == SvxCellHorJustify::Right || eHorJust == SvxCellHorJustify::Center )
                 bFound = true;
         }
     }
@@ -1741,8 +1741,8 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement
         const SfxPoolItem* pItem;
 
         bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem ) != SfxItemState::SET
-                           || (static_cast<const SvxHorJustifyItem*>(pItem)->GetValue() != SVX_HOR_JUSTIFY_LEFT &&
-                               static_cast<const SvxHorJustifyItem*>(pItem)->GetValue() != SVX_HOR_JUSTIFY_RIGHT ));
+                           || (static_cast<const SvxHorJustifyItem*>(pItem)->GetValue() != SvxCellHorJustify::Left &&
+                               static_cast<const SvxHorJustifyItem*>(pItem)->GetValue() != SvxCellHorJustify::Right ));
         sal_uInt16 nOldValue = static_cast<const SfxUInt16Item&>(rOldSet.Get( ATTR_INDENT )).GetValue();
         sal_uInt16 nNewValue = nOldValue;
         // To keep Increment indent from running outside the cell1659
@@ -1774,7 +1774,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement
             aNewPattern.GetItemSet().Put( SfxUInt16Item( ATTR_INDENT, nNewValue ) );
             if ( bNeedJust )
                 aNewPattern.GetItemSet().Put(
-                                SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
+                                SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ) );
             SetPatternArea( nThisStart, nAttrRow, &aNewPattern, true );
 
             nThisStart = nThisEnd + 1;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 1fda6e2..c61667c 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -149,7 +149,7 @@ long ScColumn::GetNeededSize(
         eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
                                         pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
     bool bBreak;
-    if ( eHorJust == SVX_HOR_JUSTIFY_BLOCK )
+    if ( eHorJust == SvxCellHorJustify::Block )
         bBreak = true;
     else if ( pCondSet &&
                 pCondSet->GetItemState(ATTR_LINEBREAK, true, &pCondItem) == SfxItemState::SET)
@@ -222,7 +222,7 @@ long ScColumn::GetNeededSize(
         }
     }
 
-    if ( eHorJust == SVX_HOR_JUSTIFY_REPEAT )
+    if ( eHorJust == SvxCellHorJustify::Repeat )
     {
         // ignore orientation/rotation if "repeat" is active
         eOrient = SVX_ORIENTATION_STANDARD;
@@ -237,7 +237,7 @@ long ScColumn::GetNeededSize(
     else
         pMargin = static_cast<const SvxMarginItem*>(&pPattern->GetItem(ATTR_MARGIN));
     sal_uInt16 nIndent = 0;
-    if ( eHorJust == SVX_HOR_JUSTIFY_LEFT )
+    if ( eHorJust == SvxCellHorJustify::Left )
     {
         if (pCondSet &&
                 pCondSet->GetItemState(ATTR_INDENT, true, &pCondItem) == SfxItemState::SET)
@@ -817,7 +817,7 @@ void ScColumn::GetOptimalHeight(
                 bool bBreak = static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
                                 ((SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
                                     GetItem( ATTR_HOR_JUSTIFY )).GetValue() ==
-                                    SVX_HOR_JUSTIFY_BLOCK);
+                                    SvxCellHorJustify::Block);
                 bStdOnly = !bBreak;
 
                 // conditional formatting: loop all cells
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index dbac46b..daabc72 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -253,7 +253,7 @@ ScDocumentPool::ScDocumentPool()
     rPoolDefaults[ ATTR_SCRIPTSPACE     - ATTR_STARTINDEX ] = new SvxScriptSpaceItem( false, ATTR_SCRIPTSPACE);
     rPoolDefaults[ ATTR_HANGPUNCTUATION - ATTR_STARTINDEX ] = new SvxHangingPunctuationItem( false, ATTR_HANGPUNCTUATION);
     rPoolDefaults[ ATTR_FORBIDDEN_RULES - ATTR_STARTINDEX ] = new SvxForbiddenRuleItem( false, ATTR_FORBIDDEN_RULES);
-    rPoolDefaults[ ATTR_HOR_JUSTIFY     - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY);
+    rPoolDefaults[ ATTR_HOR_JUSTIFY     - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY);
     rPoolDefaults[ ATTR_HOR_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, ATTR_HOR_JUSTIFY_METHOD);
     rPoolDefaults[ ATTR_INDENT          - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_INDENT, 0 );
     rPoolDefaults[ ATTR_VER_JUSTIFY     - ATTR_STARTINDEX ] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY);
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 0990485..f22d222 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -303,7 +303,7 @@ void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
         if ( nStrId==STR_PIVOT_STYLE_RESULT || nStrId==STR_PIVOT_STYLE_TITLE )
             rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) );
         if ( nStrId==STR_PIVOT_STYLE_CATEGORY || nStrId==STR_PIVOT_STYLE_TITLE )
-            rSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
+            rSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ) );
     }
 
     pDoc->ApplyStyleAreaTab( nCol1, nRow1, nCol2, nRow2, nTab, *pStyle );
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index bb46e37..3be1e94 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -915,27 +915,27 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet&
             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;
+                eVal = SvxCellHorJustify::Standard;
                 break;
             case SvxAdjust::Right:
-                eVal = SVX_HOR_JUSTIFY_RIGHT;
+                eVal = SvxCellHorJustify::Right;
                 break;
             case SvxAdjust::Block:
-                eVal = SVX_HOR_JUSTIFY_BLOCK;
+                eVal = SvxCellHorJustify::Block;
                 break;
             case SvxAdjust::Center:
-                eVal = SVX_HOR_JUSTIFY_CENTER;
+                eVal = SvxCellHorJustify::Center;
                 break;
             case SvxAdjust::BlockLine:
-                eVal = SVX_HOR_JUSTIFY_BLOCK;
+                eVal = SvxCellHorJustify::Block;
                 break;
             case SvxAdjust::End:
-                eVal = SVX_HOR_JUSTIFY_RIGHT;
+                eVal = SvxCellHorJustify::Right;
                 break;
             default:
-                eVal = SVX_HOR_JUSTIFY_STANDARD;
+                eVal = SvxCellHorJustify::Standard;
         }
-        if ( eVal != SVX_HOR_JUSTIFY_STANDARD )
+        if ( eVal != SvxCellHorJustify::Standard )
             rDestSet.Put( SvxHorJustifyItem( eVal, ATTR_HOR_JUSTIFY) );
     }
 }
@@ -959,9 +959,9 @@ void ScPatternAttr::FillEditParaItems( SfxItemSet* pEditSet ) const
     SvxAdjust eSvxAdjust;
     switch (eHorJust)
     {
-        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;
+        case SvxCellHorJustify::Right:  eSvxAdjust = SvxAdjust::Right;  break;
+        case SvxCellHorJustify::Center: eSvxAdjust = SvxAdjust::Center; break;
+        case SvxCellHorJustify::Block:  eSvxAdjust = SvxAdjust::Block;  break;
         default:                     eSvxAdjust = SvxAdjust::Left;   break;
     }
     pEditSet->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
@@ -1374,7 +1374,7 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
     if ( GetCellOrientation() == SVX_ORIENTATION_STANDARD )
     {
         bool bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
-                            GetValue() == SVX_HOR_JUSTIFY_REPEAT );
+                            GetValue() == SvxCellHorJustify::Repeat );
         // ignore orientation/rotation if "repeat" is active
         if ( !bRepeat )
             nAttrRotate = static_cast<const SfxInt32Item&>(GetItem( ATTR_ROTATE_VALUE, pCondSet )).GetValue();
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 8eb4648..87a1dde 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1905,12 +1905,12 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d
 
         SvxCellHorJustify eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
                         pPattern->GetItem( ATTR_HOR_JUSTIFY, pCondSet )).GetValue();
-        if ( eHorJust == SVX_HOR_JUSTIFY_CENTER )
+        if ( eHorJust == SvxCellHorJustify::Center )
             nMissing /= 2;                          // distributed into both directions
         else
         {
             // STANDARD is LEFT (only text is handled here)
-            bool bRight = ( eHorJust == SVX_HOR_JUSTIFY_RIGHT );
+            bool bRight = ( eHorJust == SvxCellHorJustify::Right );
             if ( IsLayoutRTL() )
                 bRight = !bRight;
             if ( bRight )
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 935041e..7649bc7 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -192,7 +192,7 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion)
     if (fileVersion >= SOFFICE_FILEFORMAT_50)
         WriteAutoFormatSwBlob( rStream, swVersions );
 
-    rStream.WriteUInt16( SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY).GetVersion(fileVersion) );
+    rStream.WriteUInt16( SvxHorJustifyItem(SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY).GetVersion(fileVersion) );
     rStream.WriteUInt16( SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY).GetVersion(fileVersion) );
     rStream.WriteUInt16( SvxOrientationItem(SVX_ORIENTATION_STANDARD, 0).GetVersion(fileVersion) );
     rStream.WriteUInt16( SvxMarginItem(ATTR_MARGIN).GetVersion(fileVersion) );
@@ -230,7 +230,7 @@ ScAutoFormatDataField::ScAutoFormatDataField() :
     aBLTR( ATTR_BORDER_BLTR ),
     aBackground( ATTR_BACKGROUND ),
     aAdjust( SvxAdjust::Left, 0 ),
-    aHorJustify( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ),
+    aHorJustify( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY ),
     aVerJustify( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY ),
     aMargin( ATTR_MARGIN ),
     aLinebreak( ATTR_LINEBREAK ),
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 37dc4e5..8f44941 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -308,7 +308,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT
     const SvxMarginItem* pMargin = static_cast<const SvxMarginItem*>(&pPattern->GetItem(ATTR_MARGIN));
     sal_uInt16 nIndent = 0;
     if ( static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue() ==
-                SVX_HOR_JUSTIFY_LEFT )
+                SvxCellHorJustify::Left )
         nIndent = static_cast<const SfxUInt16Item&>(pPattern->GetItem(ATTR_INDENT)).GetValue();
     long nPixDifX   = (long) ( ( pMargin->GetLeftMargin() + nIndent ) * nPPTX );
     aStartPos.X()   += nPixDifX * nLayoutSign;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 57c1586..d5fb4dc 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2265,12 +2265,12 @@ void ScInterpreter::ScCell()
                         pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_HOR_JUSTIFY ));
                     switch( pJustAttr->GetValue() )
                     {
-                        case SVX_HOR_JUSTIFY_STANDARD:
-                        case SVX_HOR_JUSTIFY_LEFT:
-                        case SVX_HOR_JUSTIFY_BLOCK:     c = '\''; break;
-                        case SVX_HOR_JUSTIFY_CENTER:    c = '^';  break;
-                        case SVX_HOR_JUSTIFY_RIGHT:     c = '"';  break;
-                        case SVX_HOR_JUSTIFY_REPEAT:    c = '\\'; break;
+                        case SvxCellHorJustify::Standard:
+                        case SvxCellHorJustify::Left:
+                        case SvxCellHorJustify::Block:     c = '\''; break;
+                        case SvxCellHorJustify::Center:    c = '^';  break;
+                        case SvxCellHorJustify::Right:     c = '"';  break;
+                        case SvxCellHorJustify::Repeat:    c = '\\'; break;
                     }
                 }
                 PushString( OUString(c) );
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 19e7463..ca90989 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1470,7 +1470,7 @@ bool XclExpCellAlign::FillFromItemSet(
         const SfxItemSet& rItemSet, bool bForceLineBreak, XclBiff eBiff, bool bStyle )
 {
     bool bUsed = false;
-    SvxCellHorJustify eHorAlign = GETITEMVALUE( rItemSet, SvxHorJustifyItem, ATTR_HOR_JUSTIFY, SvxCellHorJustify );
+    SvxCellHorJustify eHorAlign = GETITEM( rItemSet, SvxHorJustifyItem, ATTR_HOR_JUSTIFY ).GetValue();
     SvxCellVerJustify eVerAlign = GETITEMVALUE( rItemSet, SvxVerJustifyItem, ATTR_VER_JUSTIFY, SvxCellVerJustify );
 
     switch( eBiff )
@@ -1543,7 +1543,7 @@ bool XclExpCellAlign::FillFromItemSet(
     if (eBiff == EXC_BIFF8)
     {
         // Adjust for distributed alignments.
-        if (eHorAlign == SVX_HOR_JUSTIFY_BLOCK)
+        if (eHorAlign == SvxCellHorJustify::Block)
         {
             SvxCellJustifyMethod eHorJustMethod =
                 rItemSet.GetItem<SvxJustifyMethodItem>(ATTR_HOR_JUSTIFY_METHOD)->GetValue();
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index eb5341c..ca53689 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -1553,17 +1553,17 @@ XclCellAlign::XclCellAlign() :
 
 SvxCellHorJustify XclCellAlign::GetScHorAlign() const
 {
-    SvxCellHorJustify eHorJust = SVX_HOR_JUSTIFY_STANDARD;
+    SvxCellHorJustify eHorJust = SvxCellHorJustify::Standard;
     switch( mnHorAlign )
     {
-        case EXC_XF_HOR_GENERAL:    eHorJust = SVX_HOR_JUSTIFY_STANDARD;    break;
-        case EXC_XF_HOR_LEFT:       eHorJust = SVX_HOR_JUSTIFY_LEFT;        break;
+        case EXC_XF_HOR_GENERAL:    eHorJust = SvxCellHorJustify::Standard;    break;
+        case EXC_XF_HOR_LEFT:       eHorJust = SvxCellHorJustify::Left;        break;
         case EXC_XF_HOR_CENTER_AS:
-        case EXC_XF_HOR_CENTER:     eHorJust = SVX_HOR_JUSTIFY_CENTER;      break;
-        case EXC_XF_HOR_RIGHT:      eHorJust = SVX_HOR_JUSTIFY_RIGHT;       break;
-        case EXC_XF_HOR_FILL:       eHorJust = SVX_HOR_JUSTIFY_REPEAT;      break;
+        case EXC_XF_HOR_CENTER:     eHorJust = SvxCellHorJustify::Center;      break;
+        case EXC_XF_HOR_RIGHT:      eHorJust = SvxCellHorJustify::Right;       break;
+        case EXC_XF_HOR_FILL:       eHorJust = SvxCellHorJustify::Repeat;      break;
         case EXC_XF_HOR_JUSTIFY:
-        case EXC_XF_HOR_DISTRIB:    eHorJust = SVX_HOR_JUSTIFY_BLOCK;       break;
+        case EXC_XF_HOR_DISTRIB:    eHorJust = SvxCellHorJustify::Block;       break;
         default:    OSL_FAIL( "XclCellAlign::GetScHorAlign - unknown horizontal alignment" );
     }
     return eHorJust;
@@ -1611,12 +1611,12 @@ void XclCellAlign::SetScHorAlign( SvxCellHorJustify eHorJust )
 {
     switch( eHorJust )
     {
-        case SVX_HOR_JUSTIFY_STANDARD:  mnHorAlign = EXC_XF_HOR_GENERAL;    break;
-        case SVX_HOR_JUSTIFY_LEFT:      mnHorAlign = EXC_XF_HOR_LEFT;       break;
-        case SVX_HOR_JUSTIFY_CENTER:    mnHorAlign = EXC_XF_HOR_CENTER;     break;
-        case SVX_HOR_JUSTIFY_RIGHT:     mnHorAlign = EXC_XF_HOR_RIGHT;      break;
-        case SVX_HOR_JUSTIFY_BLOCK:     mnHorAlign = EXC_XF_HOR_JUSTIFY;    break;
-        case SVX_HOR_JUSTIFY_REPEAT:    mnHorAlign = EXC_XF_HOR_FILL;       break;
+        case SvxCellHorJustify::Standard:  mnHorAlign = EXC_XF_HOR_GENERAL;    break;
+        case SvxCellHorJustify::Left:      mnHorAlign = EXC_XF_HOR_LEFT;       break;
+        case SvxCellHorJustify::Center:    mnHorAlign = EXC_XF_HOR_CENTER;     break;
+        case SvxCellHorJustify::Right:     mnHorAlign = EXC_XF_HOR_RIGHT;      break;
+        case SvxCellHorJustify::Block:     mnHorAlign = EXC_XF_HOR_JUSTIFY;    break;
+        case SvxCellHorJustify::Repeat:    mnHorAlign = EXC_XF_HOR_FILL;       break;
         default:                        mnHorAlign = EXC_XF_HOR_GENERAL;
             OSL_FAIL( "XclCellAlign::SetScHorAlign - unknown horizontal alignment" );
     }
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 3f2ef7e..f0cccf5 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1015,14 +1015,14 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
 
     switch( rHorJustifyItem.GetValue() )
     {
-        case SVX_HOR_JUSTIFY_STANDARD:
+        case SvxCellHorJustify::Standard:
             pChar = (bValueData ? OOO_STRING_SVTOOLS_HTML_AL_right : OOO_STRING_SVTOOLS_HTML_AL_left);
             break;
-        case SVX_HOR_JUSTIFY_CENTER:    pChar = OOO_STRING_SVTOOLS_HTML_AL_center;  break;
-        case SVX_HOR_JUSTIFY_BLOCK:     pChar = OOO_STRING_SVTOOLS_HTML_AL_justify; break;
-        case SVX_HOR_JUSTIFY_RIGHT:     pChar = OOO_STRING_SVTOOLS_HTML_AL_right;   break;
-        case SVX_HOR_JUSTIFY_LEFT:
-        case SVX_HOR_JUSTIFY_REPEAT:
+        case SvxCellHorJustify::Center:    pChar = OOO_STRING_SVTOOLS_HTML_AL_center;  break;
+        case SvxCellHorJustify::Block:     pChar = OOO_STRING_SVTOOLS_HTML_AL_justify; break;
+        case SvxCellHorJustify::Right:     pChar = OOO_STRING_SVTOOLS_HTML_AL_right;   break;
+        case SvxCellHorJustify::Left:
+        case SvxCellHorJustify::Repeat:
         default:                        pChar = OOO_STRING_SVTOOLS_HTML_AL_left;    break;
     }
 
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 5e31859..f3f3a31 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -976,14 +976,14 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo )
                 SvxCellHorJustify eVal;
                 const OUString& rOptVal = rOption.GetString();
                 if ( rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right )  )
-                    eVal = SVX_HOR_JUSTIFY_RIGHT;
+                    eVal = SvxCellHorJustify::Right;
                 else if ( rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_center ) )
-                    eVal = SVX_HOR_JUSTIFY_CENTER;
+                    eVal = SvxCellHorJustify::Center;
                 else if ( rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left ) )
-                    eVal = SVX_HOR_JUSTIFY_LEFT;
+                    eVal = SvxCellHorJustify::Left;
                 else
-                    eVal = SVX_HOR_JUSTIFY_STANDARD;
-                if ( eVal != SVX_HOR_JUSTIFY_STANDARD )
+                    eVal = SvxCellHorJustify::Standard;
+                if ( eVal != SvxCellHorJustify::Standard )
                     pActEntry->aItemSet.Put( SvxHorJustifyItem( eVal, ATTR_HOR_JUSTIFY) );
             }
             break;
@@ -1033,7 +1033,7 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo )
 
     if ( bHorJustifyCenterTH )
         pActEntry->aItemSet.Put(
-            SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY) );
+            SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY) );
 }
 
 void ScHTMLLayoutParser::TableRowOn( ImportInfo* pInfo )
@@ -2542,7 +2542,7 @@ void ScHTMLTable::ProcessFormatOptions( SfxItemSet& rItemSet, const ImportInfo&
     if( rInfo.nToken == HTML_TABLEHEADER_ON )
     {
         rItemSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) );
-        rItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY ) );
+        rItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY ) );
     }
 
     const HTMLOptions& rOptions = static_cast<HTMLParser*>(rInfo.pParser)->GetOptions();
@@ -2553,15 +2553,15 @@ void ScHTMLTable::ProcessFormatOptions( SfxItemSet& rItemSet, const ImportInfo&
         {
             case HTML_O_ALIGN:
             {
-                SvxCellHorJustify eVal = SVX_HOR_JUSTIFY_STANDARD;
+                SvxCellHorJustify eVal = SvxCellHorJustify::Standard;
                 const OUString& rOptVal = itr->GetString();
                 if( rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right ) )
-                    eVal = SVX_HOR_JUSTIFY_RIGHT;
+                    eVal = SvxCellHorJustify::Right;
                 else if( rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_center ) )
-                    eVal = SVX_HOR_JUSTIFY_CENTER;
+                    eVal = SvxCellHorJustify::Center;
                 else if( rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left ) )
-                    eVal = SVX_HOR_JUSTIFY_LEFT;
-                if( eVal != SVX_HOR_JUSTIFY_STANDARD )
+                    eVal = SvxCellHorJustify::Left;
+                if( eVal != SvxCellHorJustify::Standard )
                     rItemSet.Put( SvxHorJustifyItem( eVal, ATTR_HOR_JUSTIFY ) );
             }
             break;
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index 3d96c4e..55faff9 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -141,7 +141,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
 
     if( rAttr.nBack & 0x80 )
     {
-        SvxHorJustifyItem   aHorJustify(SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY );
+        SvxHorJustifyItem   aHorJustify(SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY );
         rItemSet.Put( aHorJustify );
     }
 
diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx
index a6b8ee1..51c8dcc 100644
--- a/sc/source/filter/lotus/memory.cxx
+++ b/sc/source/filter/lotus/memory.cxx
@@ -34,11 +34,11 @@ bool MemNew(LotusContext &rContext)
 
     // for tool.cxx::PutFormString()
     rContext.pAttrUnprot = new ScProtectionAttr( true );
-    rContext.pAttrRight = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY );
-    rContext.pAttrLeft = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY );
-    rContext.pAttrCenter = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY );
-    rContext.pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY );
-    rContext.pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
+    rContext.pAttrRight = new SvxHorJustifyItem( SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY );
+    rContext.pAttrLeft = new SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY );
+    rContext.pAttrCenter = new SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY );
+    rContext.pAttrRepeat = new SvxHorJustifyItem( SvxCellHorJustify::Repeat, ATTR_HOR_JUSTIFY );
+    rContext.pAttrStandard = new SvxHorJustifyItem( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY );
 
     return true;
 }
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 7d0b47d..0ce8d66 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -461,22 +461,22 @@ void OP_HorAlign123(LotusContext& /*rContext*/, sal_uInt8 nAlignPattern, SfxItem
     switch (nAlignPattern)
     {
         case 1:
-            rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
+            rPatternItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ) );
             break;
           case 2:
-            rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ) );
+            rPatternItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY ) );
             break;
         case 3:
-            rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY) );
+            rPatternItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY) );
             break;
         case 4:
-            rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ) );
+            rPatternItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY ) );
             break;
         case 6:
-            rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_BLOCK, ATTR_HOR_JUSTIFY ) );
+            rPatternItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Block, ATTR_HOR_JUSTIFY ) );
             break;
         default:
-            rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ) );
+            rPatternItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY ) );
             break;
       }
 }
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 0a83623..4099327 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1217,27 +1217,27 @@ void Alignment::finalizeImport()
 
 ::SvxCellHorJustify Alignment::GetScHorAlign() const
 {
-    ::SvxCellHorJustify nHori = ::SVX_HOR_JUSTIFY_STANDARD;
+    ::SvxCellHorJustify nHori = ::SvxCellHorJustify::Standard;
     switch( maApiData.meHorJustify )
     {
         case css::table::CellHoriJustify_LEFT:
-            nHori = ::SVX_HOR_JUSTIFY_LEFT;
+            nHori = ::SvxCellHorJustify::Left;
             break;
         case css::table::CellHoriJustify_CENTER:
-            nHori = ::SVX_HOR_JUSTIFY_CENTER;
+            nHori = ::SvxCellHorJustify::Center;
             break;
         case css::table::CellHoriJustify_RIGHT:
-            nHori = ::SVX_HOR_JUSTIFY_RIGHT;
+            nHori = ::SvxCellHorJustify::Right;
             break;
         case css::table::CellHoriJustify_BLOCK:
-            nHori = ::SVX_HOR_JUSTIFY_BLOCK;
+            nHori = ::SvxCellHorJustify::Block;
             break;
         case css::table::CellHoriJustify_REPEAT:
-            nHori = ::SVX_HOR_JUSTIFY_REPEAT;
+            nHori = ::SvxCellHorJustify::Repeat;
             break;
         case css::table::CellHoriJustify_STANDARD:
         default:
-            nHori = ::SVX_HOR_JUSTIFY_STANDARD;
+            nHori = ::SvxCellHorJustify::Standard;
             break;
     }
     return nHori;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 2799760..ec785be 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -943,7 +943,7 @@ ScOrcusStyles::xf::xf():
     mnNumberFormatId(0),
     mnStyleXf(0),
     mbAlignment(false),
-    meHor_alignment(SVX_HOR_JUSTIFY_RIGHT),
+    meHor_alignment(SvxCellHorJustify::Right),
     meVer_alignment(SVX_VER_JUSTIFY_BOTTOM)
 {
 }
@@ -1493,16 +1493,16 @@ void ScOrcusStyles::set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignmen
     switch (align)
     {
         case os::hor_alignment_t::left:
-            maCurrentXF.meHor_alignment = SVX_HOR_JUSTIFY_LEFT;
+            maCurrentXF.meHor_alignment = SvxCellHorJustify::Left;
         break;
         case os::hor_alignment_t::right:
-            maCurrentXF.meHor_alignment = SVX_HOR_JUSTIFY_RIGHT;
+            maCurrentXF.meHor_alignment = SvxCellHorJustify::Right;
         break;
         case os::hor_alignment_t::center:
-            maCurrentXF.meHor_alignment = SVX_HOR_JUSTIFY_CENTER;
+            maCurrentXF.meHor_alignment = SvxCellHorJustify::Center;
         break;
         case os::hor_alignment_t::justified:
-            maCurrentXF.meHor_alignment = SVX_HOR_JUSTIFY_STANDARD;
+            maCurrentXF.meHor_alignment = SvxCellHorJustify::Standard;
         break;
         default:
             ;
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 9b88d71..6a3c56d 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -65,27 +65,27 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
     sal_uInt8 nOrient = ( nTmp & 0x60 );
 
     // Horizontal Alignment
-    SvxCellHorJustify eJustify = SVX_HOR_JUSTIFY_STANDARD;
+    SvxCellHorJustify eJustify = SvxCellHorJustify::Standard;
     switch( nHor )
     {
         case 0x00:
-            eJustify = SVX_HOR_JUSTIFY_STANDARD;
+            eJustify = SvxCellHorJustify::Standard;
             break;
 
         case 0x01:
-            eJustify = SVX_HOR_JUSTIFY_LEFT;
+            eJustify = SvxCellHorJustify::Left;
             break;
 
         case 0x02:
-            eJustify = SVX_HOR_JUSTIFY_CENTER;
+            eJustify = SvxCellHorJustify::Center;
             break;
 
         case 0x03:
-            eJustify = SVX_HOR_JUSTIFY_RIGHT;
+            eJustify = SvxCellHorJustify::Right;
             break;
 
         case 0x04:
-            eJustify = SVX_HOR_JUSTIFY_BLOCK;
+            eJustify = SvxCellHorJustify::Block;
             break;
     }
     rItemSet.Put( SvxHorJustifyItem( eJustify, ATTR_HOR_JUSTIFY ) );
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index 3921b58..44e8629 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -200,14 +200,14 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
 
     switch( rHorJustifyItem.GetValue() )
     {
-        case SVX_HOR_JUSTIFY_STANDARD:
+        case SvxCellHorJustify::Standard:
             pChar = (bValueData ? OOO_STRING_SVTOOLS_RTF_QR : OOO_STRING_SVTOOLS_RTF_QL);
             break;
-        case SVX_HOR_JUSTIFY_CENTER:    pChar = OOO_STRING_SVTOOLS_RTF_QC;  break;
-        case SVX_HOR_JUSTIFY_BLOCK:     pChar = OOO_STRING_SVTOOLS_RTF_QJ;  break;
-        case SVX_HOR_JUSTIFY_RIGHT:     pChar = OOO_STRING_SVTOOLS_RTF_QR;  break;
-        case SVX_HOR_JUSTIFY_LEFT:
-        case SVX_HOR_JUSTIFY_REPEAT:
+        case SvxCellHorJustify::Center:    pChar = OOO_STRING_SVTOOLS_RTF_QC;  break;
+        case SvxCellHorJustify::Block:     pChar = OOO_STRING_SVTOOLS_RTF_QJ;  break;
+        case SvxCellHorJustify::Right:     pChar = OOO_STRING_SVTOOLS_RTF_QR;  break;
+        case SvxCellHorJustify::Left:
+        case SvxCellHorJustify::Repeat:
         default:                        pChar = OOO_STRING_SVTOOLS_RTF_QL;  break;
     }
     rStrm.WriteCharPtr( pChar );
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index e167882..44529b1 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1176,13 +1176,13 @@ void Sc10Import::LoadPatternCollection()
                     switch( HorJustify )
                     {
                         case hjLeft:
-                            rItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
+                            rItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ) );
                             break;
                         case hjCenter:
-                            rItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY ) );
+                            rItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY ) );
                             break;
                         case hjRight:
-                            rItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ) );
+                            rItemSet.Put( SvxHorJustifyItem( SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY ) );
                             break;
                     }
                 if( VerJustify != 0 )
@@ -1815,13 +1815,13 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
             switch (HorJustify)
             {
                 case hjLeft:
-                    aScPattern.GetItemSet().Put(SvxHorJustifyItem(SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY));
+                    aScPattern.GetItemSet().Put(SvxHorJustifyItem(SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY));
                     break;
                 case hjCenter:
-                    aScPattern.GetItemSet().Put(SvxHorJustifyItem(SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY));
+                    aScPattern.GetItemSet().Put(SvxHorJustifyItem(SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY));
                     break;
                 case hjRight:
-                    aScPattern.GetItemSet().Put(SvxHorJustifyItem(SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY));
+                    aScPattern.GetItemSet().Put(SvxHorJustifyItem(SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY));
                     break;
             }
 
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 6f4fb2d..2878d60 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -713,8 +713,8 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
         long nIndent = 0;
         const SvxHorJustifyItem* pHorJustifyItem = static_cast< const SvxHorJustifyItem* >(
             rDoc.GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_HOR_JUSTIFY ) );
-        SvxCellHorJustify eHorJust = ( pHorJustifyItem ? static_cast< SvxCellHorJustify >( pHorJustifyItem->GetValue() ) : SVX_HOR_JUSTIFY_STANDARD );
-        if ( eHorJust == SVX_HOR_JUSTIFY_LEFT )
+        SvxCellHorJustify eHorJust = pHorJustifyItem ? pHorJustifyItem->GetValue() : SvxCellHorJustify::Standard;
+        if ( eHorJust == SvxCellHorJustify::Left )
         {
             const SfxUInt16Item* pIndentItem = static_cast< const SfxUInt16Item* >(
                 rDoc.GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_INDENT ) );
@@ -777,7 +777,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
         pEditEngine->SetPaperSize( aSize );
 
         // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
-        if ( eHorJust == SVX_HOR_JUSTIFY_STANDARD && rDoc.HasValueData( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab() ) )
+        if ( eHorJust == SvxCellHorJustify::Standard && rDoc.HasValueData( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab() ) )
         {
             pEditEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
         }
@@ -796,12 +796,12 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
         {
             switch ( eHorJust )
             {
-                case SVX_HOR_JUSTIFY_RIGHT:
+                case SvxCellHorJustify::Right:
                     {
                         nOffsetX -= nDiffX;
                     }
                     break;
-                case SVX_HOR_JUSTIFY_CENTER:
+                case SvxCellHorJustify::Center:
                     {
                         nOffsetX -= nDiffX / 2;
                     }
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 751fe84..52987d1 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -629,7 +629,7 @@ ScInputHandler::ScInputHandler()
         bLastIsSymbol( false ),
         mbDocumentDisposing(false),
         nValidation( 0 ),
-        eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ),
+        eAttrAdjust( SvxCellHorJustify::Standard ),
         aScaleX( 1,1 ),
         aScaleY( 1,1 ),
         pRefViewSh( nullptr ),
@@ -1943,7 +1943,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
     SvxAdjust eSvxAdjust;
     switch (eAttrAdjust)
     {
-        case SVX_HOR_JUSTIFY_STANDARD:
+        case SvxCellHorJustify::Standard:
             {
                 bool bNumber = false;
                 if (cTyped)                                     // Restarted
@@ -1956,16 +1956,16 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
                 eSvxAdjust = bNumber ? SvxAdjust::Right : SvxAdjust::Left;
             }
             break;
-        case SVX_HOR_JUSTIFY_BLOCK:
+        case SvxCellHorJustify::Block:
             eSvxAdjust = SvxAdjust::Block;
             break;
-        case SVX_HOR_JUSTIFY_CENTER:
+        case SvxCellHorJustify::Center:
             eSvxAdjust = SvxAdjust::Center;
             break;
-        case SVX_HOR_JUSTIFY_RIGHT:
+        case SvxCellHorJustify::Right:
             eSvxAdjust = SvxAdjust::Right;
             break;
-        default:    // SVX_HOR_JUSTIFY_LEFT
+        default:    // SvxCellHorJustify::Left
             eSvxAdjust = SvxAdjust::Left;
             break;
     }
@@ -2133,11 +2133,11 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
                 // Adjustment
                 eAttrAdjust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
                                 GetItem(ATTR_HOR_JUSTIFY)).GetValue();
-                if ( eAttrAdjust == SVX_HOR_JUSTIFY_REPEAT &&
+                if ( eAttrAdjust == SvxCellHorJustify::Repeat &&
                      static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() )
                 {
                     // #i31843# "repeat" with "line breaks" is treated as default alignment
-                    eAttrAdjust = SVX_HOR_JUSTIFY_STANDARD;
+                    eAttrAdjust = SvxCellHorJustify::Standard;
                 }
             }
 
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 3edc86d..990be1b 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -827,9 +827,9 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
             {
                 if ( static_cast<const SvxHorJustifyItem*>(pDestDoc->GetAttr(
                         nCol,nRow,nDestTab, ATTR_HOR_JUSTIFY))->GetValue() ==
-                        SVX_HOR_JUSTIFY_STANDARD )
+                        SvxCellHorJustify::Standard )
                     pDestDoc->ApplyAttr( nCol,nRow,nDestTab,
-                            SvxHorJustifyItem(SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY) );
+                            SvxHorJustifyItem(SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY) );
 
                 ScSetStringParam aParam;
                 aParam.setTextInput();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index f2d85bc..3b8ed04 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4802,7 +4802,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
 
         if (rOption.mbCenter)
         {
-            rDoc.ApplyAttr( nStartCol, nStartRow, nTab, SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY ) );
+            rDoc.ApplyAttr( nStartCol, nStartRow, nTab, SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY ) );
             rDoc.ApplyAttr( nStartCol, nStartRow, nTab, SvxVerJustifyItem( SVX_VER_JUSTIFY_CENTER, ATTR_VER_JUSTIFY ) );
         }
 
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f8baa2e..70faa90 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1771,19 +1771,19 @@ void lcl_ScDocShell_GetFixedWidthString( OUString& rStr, const ScDocument& rDoc,
     }
     if ( nLen > aString.getLength() )
     {
-        if ( bValue && eHorJust == SVX_HOR_JUSTIFY_STANDARD )
-            eHorJust = SVX_HOR_JUSTIFY_RIGHT;
+        if ( bValue && eHorJust == SvxCellHorJustify::Standard )
+            eHorJust = SvxCellHorJustify::Right;
         sal_Int32 nBlanks = nLen - aString.getLength();
         switch ( eHorJust )
         {
-            case SVX_HOR_JUSTIFY_RIGHT:
+            case SvxCellHorJustify::Right:
             {
                 OUStringBuffer aTmp;
                 aTmp = comphelper::string::padToLength( aTmp, nBlanks, ' ' );
                 aString = aTmp.append(aString).makeStringAndClear();
             }
             break;
-            case SVX_HOR_JUSTIFY_CENTER:
+            case SvxCellHorJustify::Center:
             {
                 sal_Int32 nLeftPad = nBlanks / 2;
                 OUStringBuffer aTmp;
@@ -1809,7 +1809,7 @@ void lcl_ScDocShell_WriteEmptyFixedWidthString( SvStream& rStream,
 {
     OUString aString;
     lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, false,
-            SVX_HOR_JUSTIFY_STANDARD );
+            SvxCellHorJustify::Standard );
     rStream.WriteUnicodeOrByteText( aString );
 }
 
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 4eaa250..9d45331 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -260,9 +260,9 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
 
         // Justification:
 
-        eJustification  = mbRTL ? SVX_HOR_JUSTIFY_RIGHT : bJustify ?
+        eJustification  = mbRTL ? SvxCellHorJustify::Right : bJustify ?
             (SvxCellHorJustify) (static_cast<const SvxHorJustifyItem*>(pCurData->GetItem(nFmtIndex, ATTR_HOR_JUSTIFY))->GetValue()) :
-            SVX_HOR_JUSTIFY_STANDARD;
+            SvxCellHorJustify::Standard;
 
         if (pCurData->GetIncludeFont())
         {
@@ -288,7 +288,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
             }
             while((theMaxStrSize.Width() <= aStrSize.Width()) && (cellString.getLength() > 1))
             {
-                if( eJustification == SVX_HOR_JUSTIFY_RIGHT )
+                if( eJustification == SvxCellHorJustify::Right )
                     cellString = cellString.copy(1);
                 else
                     cellString = cellString.copy(0, cellString.getLength() - 1 );
@@ -312,25 +312,25 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
 
         // horizontal
 
-        if (eJustification != SVX_HOR_JUSTIFY_STANDARD)
+        if (eJustification != SvxCellHorJustify::Standard)
         {
             sal_uInt16 nHorPos = sal_uInt16((cellRect.GetWidth()-aStrSize.Width()) / 2);
 
             switch (eJustification)
             {
-                case SVX_HOR_JUSTIFY_LEFT:
+                case SvxCellHorJustify::Left:
                     aPos.X() += FRAME_OFFSET;
                     break;
-                case SVX_HOR_JUSTIFY_RIGHT:
+                case SvxCellHorJustify::Right:
                     aPos.X() += nRightX;
                     break;
-                case SVX_HOR_JUSTIFY_BLOCK:
-                case SVX_HOR_JUSTIFY_REPEAT:
-                case SVX_HOR_JUSTIFY_CENTER:
+                case SvxCellHorJustify::Block:
+                case SvxCellHorJustify::Repeat:
+                case SvxCellHorJustify::Center:
                     aPos.X() += nHorPos;
                     break;
                 // coverity[dead_error_line] - following conditions exist to avoid compiler warning
-                case SVX_HOR_JUSTIFY_STANDARD:
+                case SvxCellHorJustify::Standard:
                 default:
                     // Standard is not handled here
                     break;
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 24f3f95..240434a 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -270,14 +270,14 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
     {
     case SID_H_ALIGNCELL:
         {
-            SvxCellHorJustify meHorAlignState = SVX_HOR_JUSTIFY_STANDARD;
+            SvxCellHorJustify meHorAlignState = SvxCellHorJustify::Standard;
             if(eState >= SfxItemState::DEFAULT && pState && dynamic_cast<const SvxHorJustifyItem*>( pState) !=  nullptr )
             {
                 const SvxHorJustifyItem* pItem = static_cast<const SvxHorJustifyItem*>(pState);
                 meHorAlignState = (SvxCellHorJustify)pItem->GetValue();
             }
 
-            if( meHorAlignState == SVX_HOR_JUSTIFY_REPEAT )
+            if( meHorAlignState == SvxCellHorJustify::Repeat )
             {
                 mpFtRotate->Disable();
                 mpMtrAngle->Disable();
@@ -288,8 +288,8 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
                 mpMtrAngle->Enable(!mbMultiDisable);
             }
 
-            mpFTLeftIndent->Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
-            mpMFLeftIndent->Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
+            mpFTLeftIndent->Enable( meHorAlignState == SvxCellHorJustify::Left );
+            mpMFLeftIndent->Enable( meHorAlignState == SvxCellHorJustify::Left );
         }
         break;
     case SID_ATTR_ALIGN_INDENT:
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index d5690e2..c3057d7 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -688,7 +688,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const
             {
                 rDoc.ApplyAttr( aRange.aStart.Col(), aRange.aStart.Row(),
                                  aRange.aStart.Tab(),
-                                 SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY ) );
+                                 SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY ) );
                 rDoc.ApplyAttr( aRange.aStart.Col(), aRange.aStart.Row(),
                                  aRange.aStart.Tab(),
                                  SvxVerJustifyItem( SVX_VER_JUSTIFY_CENTER, ATTR_VER_JUSTIFY ) );
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index b887210..9102ee6 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -91,14 +91,14 @@ namespace {
 
 SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot )
 {
-    SvxCellHorJustify eHJustify = SVX_HOR_JUSTIFY_STANDARD;
+    SvxCellHorJustify eHJustify = SvxCellHorJustify::Standard;
     switch( nSlot )
     {
-        case SID_ALIGN_ANY_HDEFAULT:    eHJustify = SVX_HOR_JUSTIFY_STANDARD;   break;
-        case SID_ALIGN_ANY_LEFT:        eHJustify = SVX_HOR_JUSTIFY_LEFT;       break;
-        case SID_ALIGN_ANY_HCENTER:     eHJustify = SVX_HOR_JUSTIFY_CENTER;     break;
-        case SID_ALIGN_ANY_RIGHT:       eHJustify = SVX_HOR_JUSTIFY_RIGHT;      break;
-        case SID_ALIGN_ANY_JUSTIFIED:   eHJustify = SVX_HOR_JUSTIFY_BLOCK;      break;
+        case SID_ALIGN_ANY_HDEFAULT:    eHJustify = SvxCellHorJustify::Standard;   break;
+        case SID_ALIGN_ANY_LEFT:        eHJustify = SvxCellHorJustify::Left;       break;
+        case SID_ALIGN_ANY_HCENTER:     eHJustify = SvxCellHorJustify::Center;     break;
+        case SID_ALIGN_ANY_RIGHT:       eHJustify = SvxCellHorJustify::Right;      break;
+        case SID_ALIGN_ANY_JUSTIFIED:   eHJustify = SvxCellHorJustify::Block;      break;
         default:    OSL_FAIL( "lclConvertSlotToHAlign - invalid slot" );
     }
     return eHJustify;
@@ -1541,7 +1541,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
         const SfxPoolItem*       pItem       = nullptr;
         const SvxHorJustifyItem* pHorJustify = nullptr;
         const SvxVerJustifyItem* pVerJustify = nullptr;
-        SvxCellHorJustify        eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
+        SvxCellHorJustify        eHorJustify = SvxCellHorJustify::Standard;
         SvxCellVerJustify        eVerJustify = SVX_VER_JUSTIFY_STANDARD;
 
         if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, true,&pItem ) == SfxItemState::SET)
@@ -1560,32 +1560,32 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
             case SID_ALIGNLEFT:
                 rReq.SetSlot( SID_H_ALIGNCELL );
                 rReq.AppendItem( SvxHorJustifyItem(
-                    !pHorJustify || (eHorJustify != SVX_HOR_JUSTIFY_LEFT) ?
-                    SVX_HOR_JUSTIFY_LEFT : SVX_HOR_JUSTIFY_STANDARD, SID_H_ALIGNCELL ) );
+                    !pHorJustify || (eHorJustify != SvxCellHorJustify::Left) ?
+                    SvxCellHorJustify::Left : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
                 ExecuteSlot( rReq, GetInterface() );
                 return;
 
             case SID_ALIGNRIGHT:
                 rReq.SetSlot( SID_H_ALIGNCELL );
                 rReq.AppendItem( SvxHorJustifyItem(
-                    !pHorJustify || (eHorJustify != SVX_HOR_JUSTIFY_RIGHT) ?
-                    SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_STANDARD, SID_H_ALIGNCELL ) );
+                    !pHorJustify || (eHorJustify != SvxCellHorJustify::Right) ?
+                    SvxCellHorJustify::Right : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
                 ExecuteSlot( rReq, GetInterface() );
                 return;
 
             case SID_ALIGNCENTERHOR:
                 rReq.SetSlot( SID_H_ALIGNCELL );
                 rReq.AppendItem( SvxHorJustifyItem(
-                    !pHorJustify || (eHorJustify != SVX_HOR_JUSTIFY_CENTER) ?
-                    SVX_HOR_JUSTIFY_CENTER : SVX_HOR_JUSTIFY_STANDARD, SID_H_ALIGNCELL ) );
+                    !pHorJustify || (eHorJustify != SvxCellHorJustify::Center) ?
+                    SvxCellHorJustify::Center : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
                 ExecuteSlot( rReq, GetInterface() );
                 return;
 
             case SID_ALIGNBLOCK:
                 rReq.SetSlot( SID_H_ALIGNCELL );
                 rReq.AppendItem( SvxHorJustifyItem(
-                    !pHorJustify || (eHorJustify != SVX_HOR_JUSTIFY_BLOCK) ?
-                    SVX_HOR_JUSTIFY_BLOCK : SVX_HOR_JUSTIFY_STANDARD, SID_H_ALIGNCELL ) );
+                    !pHorJustify || (eHorJustify != SvxCellHorJustify::Block) ?
+                    SvxCellHorJustify::Block : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
                 ExecuteSlot( rReq, GetInterface() );
                 return;
 
@@ -2265,26 +2265,26 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
             {
                 switch ( SvxCellHorJustify( pHorJustify->GetValue() ) )
                 {
-                    case SVX_HOR_JUSTIFY_STANDARD:
+                    case SvxCellHorJustify::Standard:
                         break;
 
-                    case SVX_HOR_JUSTIFY_LEFT:
+                    case SvxCellHorJustify::Left:
                         nWhich = SID_ALIGNLEFT;
                         break;
 
-                    case SVX_HOR_JUSTIFY_RIGHT:
+                    case SvxCellHorJustify::Right:
                         nWhich = SID_ALIGNRIGHT;
                         break;
 
-                    case SVX_HOR_JUSTIFY_CENTER:
+                    case SvxCellHorJustify::Center:
                         nWhich = SID_ALIGNCENTERHOR;
                         break;
 
-                    case SVX_HOR_JUSTIFY_BLOCK:
+                    case SvxCellHorJustify::Block:
                         nWhich = SID_ALIGNBLOCK;
                         break;
 
-                    case SVX_HOR_JUSTIFY_REPEAT:
+                    case SvxCellHorJustify::Repeat:
                     default:
                         bJustifyStd = true;
                         break;
@@ -2401,7 +2401,7 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet )
     SfxWhichIter    aIter(rSet);
     sal_uInt16          nWhich = aIter.FirstWhich();
 
-    SvxCellHorJustify eHAlign = SVX_HOR_JUSTIFY_STANDARD;
+    SvxCellHorJustify eHAlign = SvxCellHorJustify::Standard;
     bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SfxItemState::DONTCARE;
     if( bHasHAlign )
         eHAlign = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(rAttrSet.Get( ATTR_HOR_JUSTIFY )).GetValue();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 8debb68..3640f0b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4975,24 +4975,23 @@ namespace {
 SvxAdjust toSvxAdjust( const ScPatternAttr& rPat )
 {
     SvxCellHorJustify eHorJust =
-        static_cast<SvxCellHorJustify>(
-            static_cast<const SvxHorJustifyItem&>(rPat.GetItem(ATTR_HOR_JUSTIFY)).GetValue());
+            static_cast<const SvxHorJustifyItem&>(rPat.GetItem(ATTR_HOR_JUSTIFY)).GetValue();
 
     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
+        case SvxCellHorJustify::Left:
+        case SvxCellHorJustify::Repeat:            // not implemented
+        case SvxCellHorJustify::Standard:          // always Text if an EditCell type
                 eSvxAdjust = SvxAdjust::Left;
                 break;
-        case SVX_HOR_JUSTIFY_RIGHT:
+        case SvxCellHorJustify::Right:
                 eSvxAdjust = SvxAdjust::Right;
                 break;
-        case SVX_HOR_JUSTIFY_CENTER:
+        case SvxCellHorJustify::Center:
                 eSvxAdjust = SvxAdjust::Center;
                 break;
-        case SVX_HOR_JUSTIFY_BLOCK:
+        case SvxCellHorJustify::Block:
                 eSvxAdjust = SvxAdjust::Block;
                 break;
     }
@@ -5077,7 +5076,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
 
     bool bBreak = static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
                     ((SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
-                        GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK);
+                        GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SvxCellHorJustify::Block);
     SvxCellHorJustify eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
                         GetItem(ATTR_HOR_JUSTIFY)).GetValue();
 
@@ -5127,9 +5126,9 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
     long nTextHeight = pEngine->GetTextHeight();
     if ( nTextWidth < nThisColLogic )
     {
-        if (eHorJust == SVX_HOR_JUSTIFY_RIGHT)
+        if (eHorJust == SvxCellHorJustify::Right)
             nStartX += nThisColLogic - nTextWidth;
-        else if (eHorJust == SVX_HOR_JUSTIFY_CENTER)
+        else if (eHorJust == SvxCellHorJustify::Center)
             nStartX += (nThisColLogic - nTextWidth) / 2;
     }
 
@@ -5141,7 +5140,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
     // the cell content is NUMERIC. This defaults to right aligned and
     // we need to adjust accordingly.
     if (aCell.meType == CELLTYPE_FORMULA && aCell.mpFormula->IsValue() &&
-        eHorJust == SVX_HOR_JUSTIFY_STANDARD)
+        eHorJust == SvxCellHorJustify::Standard)
     {
         aLogicEdit.Right() = aLogicEdit.Left() + nThisColLogic - 1;
         aLogicEdit.Left() =  aLogicEdit.Right() - nTextWidth;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b689f3c..40206ad 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -185,7 +185,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, bool bPTL) :
     pCondSet    ( nullptr ),
     nAscentPixel(0),
     eAttrOrient ( SVX_ORIENTATION_STANDARD ),
-    eAttrHorJust( SVX_HOR_JUSTIFY_STANDARD ),
+    eAttrHorJust( SvxCellHorJustify::Standard ),
     eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ),
     eAttrHorJustMethod( SvxCellJustifyMethod::Auto ),
     eAttrVerJustMethod( SvxCellJustifyMethod::Auto ),
@@ -342,7 +342,7 @@ void ScDrawStringsVars::SetPattern(
 
     //  handle "repeat" alignment
 
-    bRepeat = ( eAttrHorJust == SVX_HOR_JUSTIFY_REPEAT );
+    bRepeat = ( eAttrHorJust == SvxCellHorJustify::Repeat );
     if ( bRepeat )
     {
         // "repeat" disables rotation (before constructing the font)
@@ -350,7 +350,7 @@ void ScDrawStringsVars::SetPattern(
 
         // #i31843# "repeat" with "line breaks" is treated as default alignment (but rotation is still disabled)
         if ( bLineBreak )
-            eAttrHorJust = SVX_HOR_JUSTIFY_STANDARD;
+            eAttrHorJust = SvxCellHorJustify::Standard;
     }
 
     short nRot;
@@ -419,7 +419,7 @@ void ScDrawStringsVars::SetPattern(
 
     // margins
     pMargin = static_cast<const SvxMarginItem*>(&pPattern->GetItem( ATTR_MARGIN, pCondSet ));
-    if ( eAttrHorJust == SVX_HOR_JUSTIFY_LEFT || eAttrHorJust == SVX_HOR_JUSTIFY_RIGHT )
+    if ( eAttrHorJust == SvxCellHorJustify::Left || eAttrHorJust == SvxCellHorJustify::Right )
         nIndent = static_cast<const SfxUInt16Item&>(pPattern->GetItem( ATTR_INDENT, pCondSet )).GetValue();
     else
         nIndent = 0;
@@ -465,7 +465,7 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
 
     pMargin = static_cast<const SvxMarginItem*>(&pPattern->GetItem( ATTR_MARGIN, pCondSet ));
 
-    if ( eAttrHorJust == SVX_HOR_JUSTIFY_LEFT )
+    if ( eAttrHorJust == SvxCellHorJustify::Left )
         nIndent = static_cast<const SfxUInt16Item&>(pPattern->GetItem( ATTR_INDENT, pCondSet )).GetValue();
     else
         nIndent = 0;
@@ -1257,13 +1257,13 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
         long nRightMissing = 0;
         switch ( eHorJust )
         {
-            case SVX_HOR_JUSTIFY_LEFT:
+            case SvxCellHorJustify::Left:
                 nRightMissing = nMissing;
                 break;
-            case SVX_HOR_JUSTIFY_RIGHT:
+            case SvxCellHorJustify::Right:
                 nLeftMissing = nMissing;
                 break;
-            case SVX_HOR_JUSTIFY_CENTER:
+            case SvxCellHorJustify::Center:
                 nLeftMissing = nMissing / 2;
                 nRightMissing = nMissing - nLeftMissing;
                 break;
@@ -1400,39 +1400,39 @@ static SvxCellHorJustify getAlignmentFromContext( SvxCellHorJustify eInHorJust,
 {
     SvxCellHorJustify eHorJustContext = eInHorJust;
     bool bUseWritingDirection = false;
-    if (eInHorJust == SVX_HOR_JUSTIFY_STANDARD)
+    if (eInHorJust == SvxCellHorJustify::Standard)
     {
         // fdo#32530: Default alignment depends on value vs
         // string, and the direction of the 1st letter.
         if (beginsWithRTLCharacter( rText)) //If language is RTL
         {
             if (bCellIsValue)
-               eHorJustContext = bNumberFormatIsText ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT;
+               eHorJustContext = bNumberFormatIsText ? SvxCellHorJustify::Right : SvxCellHorJustify::Left;
             else
-                eHorJustContext = SVX_HOR_JUSTIFY_RIGHT;
+                eHorJustContext = SvxCellHorJustify::Right;
         }
         else if (bCellIsValue) //If language is not RTL
-            eHorJustContext = bNumberFormatIsText ? SVX_HOR_JUSTIFY_LEFT : SVX_HOR_JUSTIFY_RIGHT;
+            eHorJustContext = bNumberFormatIsText ? SvxCellHorJustify::Left : SvxCellHorJustify::Right;
         else
             bUseWritingDirection = true;
     }
 
     if (bUseWritingDirection ||
-            eInHorJust == SVX_HOR_JUSTIFY_BLOCK || eInHorJust == SVX_HOR_JUSTIFY_REPEAT)
+            eInHorJust == SvxCellHorJustify::Block || eInHorJust == SvxCellHorJustify::Repeat)
     {
         sal_uInt16 nDirection = lcl_GetValue<SvxFrameDirectionItem, sal_uInt16>( rPattern, ATTR_WRITINGDIR, pCondSet);
         if (nDirection == FRMDIR_HORI_LEFT_TOP || nDirection == FRMDIR_VERT_TOP_LEFT)
-            eHorJustContext = SVX_HOR_JUSTIFY_LEFT;
+            eHorJustContext = SvxCellHorJustify::Left;
         else if (nDirection == FRMDIR_ENVIRONMENT)
         {
             SAL_WARN_IF( !pDoc, "sc.ui", "getAlignmentFromContext - pDoc==NULL");
             // fdo#73588: The content of the cell must also
             // begin with a RTL character to be right
             // aligned; otherwise, it should be left aligned.
-            eHorJustContext = (pDoc && pDoc->IsLayoutRTL(nTab) && (beginsWithRTLCharacter( rText))) ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT;
+            eHorJustContext = (pDoc && pDoc->IsLayoutRTL(nTab) && (beginsWithRTLCharacter( rText))) ? SvxCellHorJustify::Right : SvxCellHorJustify::Left;
         }
         else
-            eHorJustContext = SVX_HOR_JUSTIFY_RIGHT;
+            eHorJustContext = SvxCellHorJustify::Right;
     }
     return eHorJustContext;
 }
@@ -1692,7 +1692,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
                     bNeedEdit = aVars.HasEditCharacters() || (bFormulaCell && aCell.mpFormula->IsMultilineResult());
                 }
                 long nTotalMargin = 0;
-                SvxCellHorJustify eOutHorJust = SVX_HOR_JUSTIFY_STANDARD;
+                SvxCellHorJustify eOutHorJust = SvxCellHorJustify::Standard;
                 if (bDoCell && !bNeedEdit)
                 {
                     CellType eCellType = aCell.meType;
@@ -1707,7 +1707,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
                     eOutHorJust = getAlignmentFromContext( aVars.GetHorJust(), bCellIsValue, aVars.GetString(),
                             *pPattern, pCondSet, mpDoc, nTab, bNumberFormatIsText );
 
-                    bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK );
+                    bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SvxCellHorJustify::Block );
                     // #i111387# #o11817313# disable automatic line breaks only for "General" number format
                     if (bBreak && bCellIsValue && (aVars.GetResultValueFormat() % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
                         bBreak = false;
@@ -1811,7 +1811,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
                     if (!bNeedEdit)
                     {
                         bNeedEdit =
-                            aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK &&
+                            aVars.GetHorJust() == SvxCellHorJustify::Block &&
                             aVars.GetHorJustMethod() == SvxCellJustifyMethod::Distribute;
                     }
                 }
@@ -1889,15 +1889,15 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
                         bool bRightAdjusted = false;        // to correct text width calculation later
                         switch (eOutHorJust)
                         {
-                            case SVX_HOR_JUSTIFY_LEFT:
+                            case SvxCellHorJustify::Left:
                                 nJustPosX += (long) ( aVars.GetLeftTotal() * mnPPTX );
                                 break;
-                            case SVX_HOR_JUSTIFY_RIGHT:
+                            case SvxCellHorJustify::Right:
                                 nJustPosX += nAvailWidth - aVars.GetTextSize().Width() -
                                             (long) ( aVars.GetRightTotal() * mnPPTX );
                                 bRightAdjusted = true;
                                 break;
-                            case SVX_HOR_JUSTIFY_CENTER:
+                            case SvxCellHorJustify::Center:
                                 nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() +
                                             (long) ( aVars.GetLeftTotal() * mnPPTX ) -
                                             (long) ( aVars.GetMargin()->GetRightMargin() * mnPPTX ) ) / 2;
@@ -2039,7 +2039,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
                                 double fVisibleRatio = 1.0;
                                 double fTextWidth = aVars.GetTextSize().Width();
                                 sal_Int32 nTextLen = aString.getLength();
-                                if (eOutHorJust == SVX_HOR_JUSTIFY_LEFT && aAreaParam.mnRightClipLength > 0)
+                                if (eOutHorJust == SvxCellHorJustify::Left && aAreaParam.mnRightClipLength > 0)
                                 {
                                     fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth;
                                     if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
@@ -2049,7 +2049,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
                                         aShort = aShort.copy(0, nShortLen);
                                     }
                                 }
-                                else if (eOutHorJust == SVX_HOR_JUSTIFY_RIGHT && aAreaParam.mnLeftClipLength > 0)
+                                else if (eOutHorJust == SvxCellHorJustify::Right && aAreaParam.mnLeftClipLength > 0)
                                 {
                                     fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth;
                                     if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
@@ -2340,7 +2340,7 @@ ScOutputData::DrawEditParam::DrawEditParam(const ScPatternAttr* pPattern, const
     mnArrY(0),
     mnX(0), mnY(0), mnCellX(0), mnCellY(0), mnTab(0),
     mnPosX(0), mnPosY(0), mnInitPosX(0),
-    mbBreak( (meHorJustAttr == SVX_HOR_JUSTIFY_BLOCK) || lcl_GetBoolValue(*pPattern, ATTR_LINEBREAK, pCondSet) ),
+    mbBreak( (meHorJustAttr == SvxCellHorJustify::Block) || lcl_GetBoolValue(*pPattern, ATTR_LINEBREAK, pCondSet) ),
     mbCellIsValue(bCellIsValue),
     mbAsianVertical(false),
     mbPixelToLogic(false),
@@ -2472,14 +2472,14 @@ void ScOutputData::DrawEditParam::calcMargins(long& rTopM, long& rLeftM, long& r
         static_cast<const SvxMarginItem&>(mpPattern->GetItem(ATTR_MARGIN, mpCondSet));
 
     sal_uInt16 nIndent = 0;
-    if (meHorJustAttr == SVX_HOR_JUSTIFY_LEFT || meHorJustAttr == SVX_HOR_JUSTIFY_RIGHT)
+    if (meHorJustAttr == SvxCellHorJustify::Left || meHorJustAttr == SvxCellHorJustify::Right)
         nIndent = lcl_GetValue<SfxUInt16Item, sal_uInt16>(*mpPattern, ATTR_INDENT, mpCondSet);
 
     rLeftM   = static_cast<long>(((rMargin.GetLeftMargin() + nIndent) * nPPTX));
     rTopM    = static_cast<long>((rMargin.GetTopMargin() * nPPTY));
     rRightM  = static_cast<long>((rMargin.GetRightMargin() * nPPTX));
     rBottomM = static_cast<long>((rMargin.GetBottomMargin() * nPPTY));
-    if(meHorJustAttr == SVX_HOR_JUSTIFY_RIGHT)
+    if(meHorJustAttr == SvxCellHorJustify::Right)
     {
         rLeftM   = static_cast<long>((rMargin.GetLeftMargin()  * nPPTX));
         rRightM  = static_cast<long>(((rMargin.GetRightMargin() + nIndent) * nPPTX));
@@ -2571,10 +2571,10 @@ void ScOutputData::DrawEditParam::calcStartPosForVertical(
 
         switch (meHorJustResult)
         {
-            case SVX_HOR_JUSTIFY_CENTER:
+            case SvxCellHorJustify::Center:
                 rLogicStart.X() += (nCellWidth - nEngineWidth) / 2;
             break;
-            case SVX_HOR_JUSTIFY_RIGHT:
+            case SvxCellHorJustify::Right:
                 rLogicStart.X() += nCellWidth - nEngineWidth;
             break;
             default:
@@ -2610,7 +2610,7 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
         mpEngine->SetDefaultItem( SvxAdjustItem(eSvxAdjust, EE_PARA_JUST) );
         mpEngine->SetDefaultItem( SvxJustifyMethodItem(meVerJustMethod, EE_PARA_JUST_METHOD) );
 
-        if (meHorJustResult == SVX_HOR_JUSTIFY_BLOCK)
+        if (meHorJustResult == SvxCellHorJustify::Block)
             mpEngine->SetDefaultItem( SvxVerJustifyItem(SVX_VER_JUSTIFY_BLOCK, EE_PARA_VER_JUST) );
     }
     else
@@ -2627,20 +2627,20 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
             if (meOrient == SVX_ORIENTATION_STANDARD)
                 switch (meHorJustResult)
                 {
-                    case SVX_HOR_JUSTIFY_REPEAT:            // repeat is not yet implemented
-                    case SVX_HOR_JUSTIFY_STANDARD:
+                    case SvxCellHorJustify::Repeat:            // repeat is not yet implemented
+                    case SvxCellHorJustify::Standard:
                         SAL_WARN("sc.ui","meHorJustResult does not match getAlignmentFromContext()");
                         SAL_FALLTHROUGH;
-                    case SVX_HOR_JUSTIFY_LEFT:
+                    case SvxCellHorJustify::Left:
                         eSvxAdjust = SvxAdjust::Left;
                         break;
-                    case SVX_HOR_JUSTIFY_CENTER:
+                    case SvxCellHorJustify::Center:
                         eSvxAdjust = SvxAdjust::Center;
                         break;
-                    case SVX_HOR_JUSTIFY_RIGHT:
+                    case SvxCellHorJustify::Right:
                         eSvxAdjust = SvxAdjust::Right;
                         break;
-                    case SVX_HOR_JUSTIFY_BLOCK:
+                    case SvxCellHorJustify::Block:
                         eSvxAdjust = SvxAdjust::Block;
                         break;
                 }
@@ -2668,7 +2668,7 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
         if (mbAsianVertical)
         {
             mpEngine->SetDefaultItem( SvxJustifyMethodItem(meVerJustMethod, EE_PARA_JUST_METHOD) );
-            if (meHorJustResult == SVX_HOR_JUSTIFY_BLOCK)
+            if (meHorJustResult == SvxCellHorJustify::Block)
                 mpEngine->SetDefaultItem( SvxVerJustifyItem(SVX_VER_JUSTIFY_BLOCK, EE_PARA_VER_JUST) );
         }
         else
@@ -2693,9 +2693,9 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
 
 bool ScOutputData::DrawEditParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
 {
-    if (meHorJustResult == SVX_HOR_JUSTIFY_RIGHT || meHorJustResult == SVX_HOR_JUSTIFY_CENTER)
+    if (meHorJustResult == SvxCellHorJustify::Right || meHorJustResult == SvxCellHorJustify::Center)
     {
-        SvxAdjust eEditAdjust = (meHorJustResult == SVX_HOR_JUSTIFY_CENTER) ?
+        SvxAdjust eEditAdjust = (meHorJustResult == SvxCellHorJustify::Center) ?
             SvxAdjust::Center : SvxAdjust::Right;
 
         pEngine->SetUpdateMode(false);
@@ -2758,11 +2758,11 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
     Size aRefOne = mpRefDevice->PixelToLogic(Size(1,1));
 
     bool bHidden = false;
-    bool bRepeat = (rParam.meHorJustAttr == SVX_HOR_JUSTIFY_REPEAT && !rParam.mbBreak);
+    bool bRepeat = (rParam.meHorJustAttr == SvxCellHorJustify::Repeat && !rParam.mbBreak);
     bool bShrink = !rParam.mbBreak && !bRepeat && lcl_GetBoolValue(*rParam.mpPattern, ATTR_SHRINKTOFIT, rParam.mpCondSet);
     long nAttrRotate = lcl_GetValue<SfxInt32Item, long>(*rParam.mpPattern, ATTR_ROTATE_VALUE, rParam.mpCondSet);
 
-    if ( rParam.meHorJustAttr == SVX_HOR_JUSTIFY_REPEAT )
+    if ( rParam.meHorJustAttr == SvxCellHorJustify::Repeat )
     {
         // ignore orientation/rotation if "repeat" is active
         rParam.meOrient = SVX_ORIENTATION_STANDARD;
@@ -2771,7 +2771,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
         // #i31843# "repeat" with "line breaks" is treated as default alignment
         // (but rotation is still disabled).
         // Default again leads to context dependent alignment instead of
-        // SVX_HOR_JUSTIFY_STANDARD.
+        // SvxCellHorJustify::Standard.
         if ( rParam.mbBreak )
             rParam.meHorJustResult = rParam.meHorJustContext;
     }
@@ -2942,7 +2942,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
             //  No clip marks if "###" doesn't fit (same as in DrawStrings)
         }
 
-        if (eOutHorJust != SVX_HOR_JUSTIFY_LEFT)
+        if (eOutHorJust != SvxCellHorJustify::Left)
         {
             aPaperSize.Width() = nNeededPixel + 1;
             if (rParam.mbPixelToLogic)
@@ -2968,9 +2968,9 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
     }
     else
     {
-        if ( eOutHorJust == SVX_HOR_JUSTIFY_RIGHT )
+        if ( eOutHorJust == SvxCellHorJustify::Right )
             nStartX -= nNeededPixel - nCellWidth + nRightM + 1;
-        else if ( eOutHorJust == SVX_HOR_JUSTIFY_CENTER )
+        else if ( eOutHorJust == SvxCellHorJustify::Center )
             nStartX -= ( nNeededPixel - nCellWidth + nRightM + 1 - nLeftM ) / 2;
         else
             nStartX += nLeftM;
@@ -3276,9 +3276,9 @@ bool ScOutputData::Clip( DrawEditParam& rParam, const Size& aCellSize,
 
 void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
 {
-    OSL_ASSERT(rParam.meHorJustAttr != SVX_HOR_JUSTIFY_REPEAT);
+    OSL_ASSERT(rParam.meHorJustAttr != SvxCellHorJustify::Repeat);
 
-    const bool bRepeat = (rParam.meHorJustAttr == SVX_HOR_JUSTIFY_REPEAT && !rParam.mbBreak);
+    const bool bRepeat = (rParam.meHorJustAttr == SvxCellHorJustify::Repeat && !rParam.mbBreak);
     const bool bShrink = !rParam.mbBreak && !bRepeat && lcl_GetBoolValue(*rParam.mpPattern, ATTR_SHRINKTOFIT, rParam.mpCondSet);
 
     SvxCellHorJustify eOutHorJust = rParam.meHorJustContext;
@@ -3440,9 +3440,9 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
     }
     else
     {
-        if ( eOutHorJust == SVX_HOR_JUSTIFY_RIGHT )
+        if ( eOutHorJust == SvxCellHorJustify::Right )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list