editeng/source/editeng/editdbg.cxx |    6 +++++-
 editeng/source/items/paraitem.cxx  |   18 +-----------------
 include/editeng/adjustitem.hxx     |    5 +----
 3 files changed, 7 insertions(+), 22 deletions(-)

New commits:
commit 98a6324e64b4baab803f7bec197579127305fd46
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Jun 9 07:41:23 2025 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Jun 9 11:26:00 2025 +0200

    SvxAdjustItem does not need to be an SfxEnumItemInterface
    
    Change-Id: I2913dfa62dc8515925c384f753583ecd6d55ca78
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186277
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/editeng/source/editeng/editdbg.cxx 
b/editeng/source/editeng/editdbg.cxx
index c9b2fd890e08..6c9226d3e056 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -115,6 +115,10 @@ struct DebOutBuffer
         str.append("SB=" + OString::number(rItem.GetUpper())
                    + ", SA=" + OString::number(rItem.GetLower()));
     }
+    void append(const SvxAdjustItem& rItem)
+    {
+        str.append("SvxAdust=" + 
OString::number(static_cast<sal_uInt16>(rItem.GetAdjust())));
+    }
     void append(std::string_view descr, const SvxLineSpacingItem& rItem)
     {
         str.append(descr);
@@ -215,7 +219,7 @@ static OString DbgOutItem(const SfxItemPool& rPool, const 
SfxPoolItem& rItem)
             buffer.append("SBL=", rItem.StaticWhichCast(EE_PARA_SBL));
         break;
         case EE_PARA_JUST:
-            buffer.append("SvxAdust=", rItem.StaticWhichCast(EE_PARA_JUST));
+            buffer.append(rItem.StaticWhichCast(EE_PARA_JUST));
         break;
         case EE_PARA_TABS:
             buffer.append(rItem.StaticWhichCast(EE_PARA_TABS));
diff --git a/editeng/source/items/paraitem.cxx 
b/editeng/source/items/paraitem.cxx
index 54154ab6d75e..7552b9317a07 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -328,7 +328,7 @@ ItemInstanceManager* 
SvxAdjustItem::getItemInstanceManager() const
 }
 
 SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId )
-    : SfxEnumItemInterface( nId ),
+    : SfxPoolItem( nId ),
     bOneBlock( false ), bLastCenter( false ), bLastBlock( false ),
     nPropWordSpacing(100),
     nPropWordSpacingMinimum(100),
@@ -462,11 +462,6 @@ bool SvxAdjustItem::GetPresentation
 }
 
 
-sal_uInt16 SvxAdjustItem::GetValueCount() const
-{
-    return sal_uInt16(SvxAdjust::End);  // SvxAdjust::BlockLine + 1
-}
-
 OUString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos )
 {
     static TranslateId RID_SVXITEMS_ADJUST[] =
@@ -482,17 +477,6 @@ OUString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos 
)
     return EditResId(RID_SVXITEMS_ADJUST[nPos]);
 }
 
-sal_uInt16 SvxAdjustItem::GetEnumValue() const
-{
-    return static_cast<sal_uInt16>(GetAdjust());
-}
-
-
-void SvxAdjustItem::SetEnumValue( sal_uInt16 nVal )
-{
-    SetAdjust( static_cast<SvxAdjust>(nVal) );
-}
-
 
 // class SvxWidowsItem ---------------------------------------------------
 
diff --git a/include/editeng/adjustitem.hxx b/include/editeng/adjustitem.hxx
index 27d29757bb41..94a92815b721 100644
--- a/include/editeng/adjustitem.hxx
+++ b/include/editeng/adjustitem.hxx
@@ -32,7 +32,7 @@ This item describes the row orientation.
 */
 constexpr sal_uInt16 ADJUST_LASTBLOCK_VERSION = 0x0001;
 
-class EDITENG_DLLPUBLIC SvxAdjustItem final : public SfxEnumItemInterface
+class EDITENG_DLLPUBLIC SvxAdjustItem final : public SfxPoolItem
 {
     bool    bLeft      : 1;
     bool    bRight     : 1;
@@ -72,10 +72,7 @@ public:
                                   MapUnit eCoreMetric,
                                   MapUnit ePresMetric,
                                   OUString &rText, const IntlWrapper& ) const 
override;
-    virtual sal_uInt16       GetValueCount() const override;
     static OUString          GetValueTextByPos( sal_uInt16 nPos );
-    virtual sal_uInt16       GetEnumValue() const override;
-    virtual void             SetEnumValue( sal_uInt16 nNewVal ) override;
     virtual SvxAdjustItem*   Clone( SfxItemPool *pPool = nullptr ) const 
override;
 
     void SetOneWord( const SvxAdjust eType )

Reply via email to