summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-15 23:26:58 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-16 11:23:36 +0200
commitc8e327092a8419636ae447b3b82052e6aeb724a0 (patch)
treea5224d9f4b2b5f7cc8ea0b9c44435976083cea93 /svl
parent69f686774cfeb803fdd63ed1ef07ff70550930de (diff)
SfxEnumItem: cut out the middle man here too
CntEnumItem, we hardly knew you existed. Change-Id: I54b489f22662f9a3305478d18438b13850444316
Diffstat (limited to 'svl')
-rw-r--r--svl/Library_svl.mk1
-rw-r--r--svl/source/items/cenumitm.cxx22
-rw-r--r--svl/source/items/eitem.cxx27
3 files changed, 14 insertions, 36 deletions
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index fd28a7abe0e2..fbca2668d064 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -70,7 +70,6 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
svl/source/items/ctypeitm \
svl/source/items/custritm \
svl/source/items/dateitem \
- svl/source/items/eitem \
svl/source/items/flagitem \
svl/source/items/globalnameitem \
svl/source/items/grabbagitem \
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
//
diff --git a/svl/source/items/eitem.cxx b/svl/source/items/eitem.cxx
deleted file mode 100644
index 0b37d072731e..000000000000
--- a/svl/source/items/eitem.cxx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svl/eitem.hxx>
-//
-// class SfxEnumItem
-//
-
-TYPEINIT1(SfxEnumItem, CntEnumItem);
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */