summaryrefslogtreecommitdiff
path: root/svl/source/items/cenumitm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/items/cenumitm.cxx')
-rw-r--r--svl/source/items/cenumitm.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index 42923fff766b..9e11d7102860 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -119,39 +119,45 @@ void SfxEnumItemInterface::SetBoolValue(sal_Bool)
{}
//
-// class CntEnumItem
+// class SfxEnumItem
//
-DBG_NAME(CntEnumItem)
+DBG_NAME(SfxEnumItem)
-CntEnumItem::CntEnumItem(sal_uInt16 which, SvStream & rStream):
- SfxEnumItemInterface(which)
+SfxEnumItem::SfxEnumItem(sal_uInt16 const nWhich, SvStream & rStream)
+ : SfxEnumItemInterface(nWhich)
{
m_nValue = 0;
rStream >> m_nValue;
}
-TYPEINIT1(CntEnumItem, SfxEnumItemInterface)
+TYPEINIT1(SfxEnumItem, SfxEnumItemInterface)
// virtual
-SvStream & CntEnumItem::Store(SvStream & rStream, sal_uInt16) const
+SvStream & SfxEnumItem::Store(SvStream & rStream, sal_uInt16) const
{
rStream << m_nValue;
return rStream;
}
// virtual
-sal_uInt16 CntEnumItem::GetEnumValue() const
+sal_uInt16 SfxEnumItem::GetEnumValue() const
{
return GetValue();
}
// virtual
-void CntEnumItem::SetEnumValue(sal_uInt16 nTheValue)
+void SfxEnumItem::SetEnumValue(sal_uInt16 const nTheValue)
{
SetValue(nTheValue);
}
+void SfxEnumItem::SetValue(sal_uInt16 const nTheValue)
+{
+ DBG_ASSERT(GetRefCount() == 0, "SfxEnumItem::SetValue(): Pooled item");
+ m_nValue = nTheValue;
+}
+
//
// class SfxBoolItem
//