summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-24 14:44:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-25 09:10:13 +0200
commit96def52140ddcf7f72afb4362567f60425fa9f16 (patch)
treee842a9b714bf25c0f51952852b8db0a0e53e5aa8 /include/svl
parent857b403f78c3b2428ea357fe2d1c69522087f3f7 (diff)
move GetPosByValue from SfxEnumItemInterface to SfxAllEnumItem
which is it's only use-site Change-Id: I35943282ad4f5fd5ad297831d63e8abee9a2ddff
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/aeitem.hxx12
-rw-r--r--include/svl/cenumitm.hxx12
2 files changed, 5 insertions, 19 deletions
diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx
index 961737922047..fb9125ee1443 100644
--- a/include/svl/aeitem.hxx
+++ b/include/svl/aeitem.hxx
@@ -31,11 +31,11 @@ class SVL_DLLPUBLIC SfxAllEnumItem: public SfxEnumItem
SfxAllEnumValueArr* pValues;
std::vector<sal_uInt16>* pDisabledValues;
-protected:
- sal_uInt16 GetPosByValue_( sal_uInt16 nValue ) const;
+ sal_uInt16 GetPosByValue( sal_uInt16 nValue ) const;
+ sal_uInt16 GetPosByValue_( sal_uInt16 nValue ) const;
public:
- static SfxPoolItem* CreateDefault();
+ static SfxPoolItem* CreateDefault();
SfxAllEnumItem();
explicit SfxAllEnumItem( sal_uInt16 nWhich);
@@ -48,14 +48,12 @@ public:
void InsertValue( sal_uInt16 nValue, const OUString &rText );
void RemoveValue( sal_uInt16 nValue );
- sal_uInt16 GetPosByValue( sal_uInt16 nValue ) const override;
-
virtual sal_uInt16 GetValueCount() const override;
virtual sal_uInt16 GetValueByPos( sal_uInt16 nPos ) const override;
- virtual OUString GetValueTextByPos( sal_uInt16 nPos ) const override;
+ virtual OUString GetValueTextByPos( sal_uInt16 nPos ) const override;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const override;
- virtual bool IsEnabled( sal_uInt16 ) const override;
+ virtual bool IsEnabled( sal_uInt16 ) const override;
void DisableValue( sal_uInt16 );
};
diff --git a/include/svl/cenumitm.hxx b/include/svl/cenumitm.hxx
index 2bbe74036c17..72e6ed65afa0 100644
--- a/include/svl/cenumitm.hxx
+++ b/include/svl/cenumitm.hxx
@@ -49,18 +49,6 @@ public:
virtual sal_uInt16 GetValueByPos(sal_uInt16 nPos) const;
- /// Return the position of some value within this enumeration.
- ///
- /// @descr This method is implemented using GetValueCount() and
- /// GetValueByPos(). Derived classes may replace this with a more
- /// efficient implementation.
- ///
- /// @param nValue Some value.
- ///
- /// @return The position of nValue within this enumeration, or USHRT_MAX
- /// if not included.
- virtual sal_uInt16 GetPosByValue(sal_uInt16 nValue) const;
-
virtual bool IsEnabled(sal_uInt16 nValue) const;
virtual sal_uInt16 GetEnumValue() const = 0;