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(nVal); -} - - -void SvxLineSpacingItem::SetEnumValue( sal_uInt16 nVal ) -{ - ASSERT_CHANGE_REFCOUNTED_ITEM; - switch ( static_cast(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