editeng/source/items/paraitem.cxx |   34 +---------------------------------
 include/editeng/lspcitem.hxx      |    6 +-----
 2 files changed, 2 insertions(+), 38 deletions(-)

New commits:
commit ff055c9e1eb52a3f39938439fe5dcffa2ef455b5
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Jun 9 07:33:36 2025 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Jun 9 09:34:50 2025 +0200

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

diff --git a/editeng/source/items/paraitem.cxx 
b/editeng/source/items/paraitem.cxx
index d23776f43159..54154ab6d75e 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -79,7 +79,7 @@ enum class SvxSpecialLineSpace
 }
 
 SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 
nId )
-    : SfxEnumItemInterface( nId )
+    : SfxPoolItem(nId)
 {
     nPropLineSpace = 100;
     nInterLineSpace = 0;
@@ -319,38 +319,6 @@ bool SvxLineSpacingItem::GetPresentation
     return true;
 }
 
-sal_uInt16 SvxLineSpacingItem::GetValueCount() const
-{
-    return sal_uInt16(SvxSpecialLineSpace::End);   // 
SvxSpecialLineSpace::TwoLines + 1
-}
-
-
-sal_uInt16 SvxLineSpacingItem::GetEnumValue() const
-{
-    SvxSpecialLineSpace nVal;
-    switch ( nPropLineSpace )
-    {
-        case 100:   nVal = SvxSpecialLineSpace::OneLine;            break;
-        case 150:   nVal = SvxSpecialLineSpace::OnePointFiveLines;  break;
-        case 200:   nVal = SvxSpecialLineSpace::TwoLines;           break;
-        default:    nVal = SvxSpecialLineSpace::User;               break;
-    }
-    return static_cast<sal_uInt16>(nVal);
-}
-
-
-void SvxLineSpacingItem::SetEnumValue( sal_uInt16 nVal )
-{
-    ASSERT_CHANGE_REFCOUNTED_ITEM;
-    switch ( static_cast<SvxSpecialLineSpace>(nVal) )
-    {
-        case SvxSpecialLineSpace::OneLine:           nPropLineSpace = 100; 
break;
-        case SvxSpecialLineSpace::OnePointFiveLines: nPropLineSpace = 150; 
break;
-        case SvxSpecialLineSpace::TwoLines:          nPropLineSpace = 200; 
break;
-        default: break;
-    }
-}
-
 // class SvxAdjustItem ---------------------------------------------------
 
 ItemInstanceManager* SvxAdjustItem::getItemInstanceManager() const
diff --git a/include/editeng/lspcitem.hxx b/include/editeng/lspcitem.hxx
index d34db2eaae3a..5f4e5b964367 100644
--- a/include/editeng/lspcitem.hxx
+++ b/include/editeng/lspcitem.hxx
@@ -31,7 +31,7 @@
 */
 
 #define LINE_SPACE_DEFAULT_HEIGHT 200
-class EDITENG_DLLPUBLIC SvxLineSpacingItem final : public SfxEnumItemInterface
+class EDITENG_DLLPUBLIC SvxLineSpacingItem final : public SfxPoolItem
 {
     short                 nInterLineSpace;
     sal_uInt16            nLineHeight;
@@ -96,10 +96,6 @@ public:
 
     void SetInterLineSpaceRule(SvxInterLineSpaceRule e) { 
ASSERT_CHANGE_REFCOUNTED_ITEM; eInterLineSpaceRule = e; }
     SvxInterLineSpaceRule GetInterLineSpaceRule() const { return 
eInterLineSpaceRule; }
-
-    virtual sal_uInt16      GetValueCount() const override;
-    virtual sal_uInt16      GetEnumValue() const override;
-    virtual void            SetEnumValue( sal_uInt16 nNewVal ) override;
 };
 
 #endif

Reply via email to