OOXMLIntegerValue

This commit is contained in:
Henning Brinkmann 2007-03-08 15:34:13 +00:00
parent b84f99e673
commit 92b505af4b
2 changed files with 49 additions and 4 deletions

View file

@ -4,9 +4,9 @@
*
* $RCSfile: OOXMLPropertySetImpl.cxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: hbrinkm $ $Date: 2007-03-06 13:42:54 $
* last change: $Author: hbrinkm $ $Date: 2007-03-08 16:34:13 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -67,6 +67,8 @@ Value::Pointer_t OOXMLPropertyImpl::getValue()
if (mpValue.get() != NULL)
pResult = Value::Pointer_t(mpValue->clone());
else
pResult = Value::Pointer_t(new OOXMLValue());
return pResult;
}
@ -335,4 +337,35 @@ OOXMLValue * OOXMLPropertySetValue::clone() const
return new OOXMLPropertySetValue(*this);
}
/*
class OOXMLIntegerValue
*/
OOXMLIntegerValue::OOXMLIntegerValue(sal_Int32 nValue)
: mnValue(nValue)
{
}
OOXMLIntegerValue::~OOXMLIntegerValue()
{
}
int OOXMLIntegerValue::getInt() const
{
return mnValue;
}
OOXMLValue * OOXMLIntegerValue::clone() const
{
return new OOXMLIntegerValue(*this);
}
string OOXMLIntegerValue::toString() const
{
char buffer[256];
snprintf(buffer, sizeof(buffer), "%ld", mnValue);
return buffer;
}
}

View file

@ -4,9 +4,9 @@
*
* $RCSfile: OOXMLPropertySetImpl.hxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: hbrinkm $ $Date: 2007-03-06 09:51:37 $
* last change: $Author: hbrinkm $ $Date: 2007-03-08 16:34:13 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -138,6 +138,18 @@ public:
virtual OOXMLValue * clone() const;
};
class OOXMLIntegerValue : public OOXMLValue
{
sal_Int32 mnValue;
public:
OOXMLIntegerValue(sal_Int32 nValue);
virtual ~OOXMLIntegerValue();
virtual int getInt() const;
virtual string toString() const;
virtual OOXMLValue * clone() const;
};
}
#endif // INCLUDED_OOXML_PROPERTY_SET_IMPL_HXX