diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-03-14 08:00:33 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-14 07:58:49 +0000 |
commit | 250995d2b8d8ad544110d3daeb2f61089bff0aa5 (patch) | |
tree | e67d3f5685831ec6207d78ab0bcdfc0dab7a4c4a /include | |
parent | a09fc7dd097357b60931739b6ed281a0b931aa73 (diff) |
change SvxFrameDirectionItem base to SfxEnumItem
Change-Id: I82f01d0e3e4bf15ed6ba435406ae63b7c9110091
Reviewed-on: https://gerrit.libreoffice.org/35160
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/frmdiritem.hxx | 9 | ||||
-rw-r--r-- | include/svx/frmdirlbox.hxx | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/editeng/frmdiritem.hxx b/include/editeng/frmdiritem.hxx index c1b6b36134fb..949b151d5a62 100644 --- a/include/editeng/frmdiritem.hxx +++ b/include/editeng/frmdiritem.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_EDITENG_FRMDIRITEM_HXX #define INCLUDED_EDITENG_FRMDIRITEM_HXX -#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include <editeng/frmdir.hxx> #include <editeng/editengdllapi.h> @@ -32,7 +32,7 @@ layout text for Western, CJK and CTL languages. */ -class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item +class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxEnumItem<SvxFrameDirection> { public: SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/, @@ -41,7 +41,6 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override; - virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const override; virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override; virtual bool operator==( const SfxPoolItem& ) const override; @@ -54,6 +53,10 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + virtual sal_uInt16 GetValueCount() const override + { + return FRMDIR_ENVIRONMENT + 1; + } SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem ) { SetValue( rItem.GetValue() ); diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx index 18989a121ca4..8f2a5c191f12 100644 --- a/include/svx/frmdirlbox.hxx +++ b/include/svx/frmdirlbox.hxx @@ -76,7 +76,7 @@ public: }; /** Wrapper for usage of a SvxFrameDirectionItem in item connections. */ -typedef sfx::ValueItemWrapper< SvxFrameDirectionItem, SvxFrameDirection, sal_uInt16 > FrameDirItemWrapper; +typedef sfx::ValueItemWrapper< SvxFrameDirectionItem, SvxFrameDirection > FrameDirItemWrapper; /** An item<->control connection for a FrameDirectionListBox. */ typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirListBoxWrapper > FrameDirListBoxConnection; |