diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-01 14:17:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-03 06:44:41 +0000 |
commit | f091259ad2ec1590714645839668580cd7b8c7c4 (patch) | |
tree | 3bf6b328637358365848bc98a18cbf82ccd4b2d0 /include/svx/sdtaitm.hxx | |
parent | d0cc5fcd5bacd8e5e0fa7fe62a78907c2febb867 (diff) |
convert SfxEnumItem to type-safe template class
and drop the SvxChartTextOrientItem class, unused.
Change-Id: I99100837d1beb953450f57b2cda47d165df1620c
Reviewed-on: https://gerrit.libreoffice.org/34747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx/sdtaitm.hxx')
-rw-r--r-- | include/svx/sdtaitm.hxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/svx/sdtaitm.hxx b/include/svx/sdtaitm.hxx index 9c59352de964..7cc9fb84908e 100644 --- a/include/svx/sdtaitm.hxx +++ b/include/svx/sdtaitm.hxx @@ -33,15 +33,14 @@ enum SdrTextVertAdjust {SDRTEXTVERTADJUST_TOP, // aligned to top (normally SDRTEXTVERTADJUST_BLOCK // support vertical full with supported now /*,SDRTEXTVERTADJUST_STRETCH*/}; // also stretch letters in their height (ni) -class SVX_DLLPUBLIC SdrTextVertAdjustItem: public SfxEnumItem { +class SVX_DLLPUBLIC SdrTextVertAdjustItem: public SfxEnumItem<SdrTextVertAdjust> { public: - SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): SfxEnumItem(SDRATTR_TEXT_VERTADJUST,(sal_uInt16)eAdj) {} - SdrTextVertAdjustItem(SdrTextVertAdjust eAdj, sal_uInt16 nWhich): SfxEnumItem(nWhich,(sal_uInt16)eAdj) {} + SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): SfxEnumItem(SDRATTR_TEXT_VERTADJUST, eAdj) {} + SdrTextVertAdjustItem(SdrTextVertAdjust eAdj, sal_uInt16 nWhich): SfxEnumItem(nWhich, eAdj) {} SdrTextVertAdjustItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_VERTADJUST,rIn) {} virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; - virtual sal_uInt16 GetValueCount() const override; // { return 5; } - SdrTextVertAdjust GetValue() const { return (SdrTextVertAdjust)SfxEnumItem::GetValue(); } + virtual sal_uInt16 GetValueCount() const override; // { return 5; } 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; @@ -61,14 +60,13 @@ enum SdrTextHorzAdjust {SDRTEXTHORZADJUST_LEFT, // left adjusted SDRTEXTHORZADJUST_BLOCK // use the whole text frame width /*,SDRTEXTHORZADJUST_STRETCH*/}; // FitToSize in X direction (ni). -class SVX_DLLPUBLIC SdrTextHorzAdjustItem: public SfxEnumItem { +class SVX_DLLPUBLIC SdrTextHorzAdjustItem: public SfxEnumItem<SdrTextHorzAdjust> { public: - SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): SfxEnumItem(SDRATTR_TEXT_HORZADJUST,(sal_uInt16)eAdj) {} - SdrTextHorzAdjustItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_HORZADJUST,rIn) {} + SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): SfxEnumItem(SDRATTR_TEXT_HORZADJUST, eAdj) {} + SdrTextHorzAdjustItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_HORZADJUST, rIn) {} virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; virtual sal_uInt16 GetValueCount() const override; - SdrTextHorzAdjust GetValue() const { return (SdrTextHorzAdjust)SfxEnumItem::GetValue(); } 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; |