diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kugar/lib/mcalcobject.cpp | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kugar/lib/mcalcobject.cpp')
-rw-r--r-- | kugar/lib/mcalcobject.cpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/kugar/lib/mcalcobject.cpp b/kugar/lib/mcalcobject.cpp new file mode 100644 index 00000000..fbb7345f --- /dev/null +++ b/kugar/lib/mcalcobject.cpp @@ -0,0 +1,66 @@ +/*************************************************************************** + mcalcobject.cpp - Kugar report calculation field object + ------------------- + begin : Thu Sep 2 1999 + copyright : (C) 1999 by Mutiny Bay Software + email : [email protected] +***************************************************************************/ + +#include "mcalcobject.h" + +namespace Kugar +{ + +/** Constructor */ +MCalcObject::MCalcObject() : MFieldObject() +{ + // Set the default calculation type + calcType = MCalcObject::Count; +} + +/** Copy constructor */ +MCalcObject::MCalcObject( const MCalcObject& mCalcObject ) : MFieldObject( ( MFieldObject & ) mCalcObject ) +{ + copy( &mCalcObject ); +} + +/** Assignment operator */ +MCalcObject MCalcObject::operator=( const MCalcObject& mCalcObject ) +{ + if ( &mCalcObject == this ) + return * this; + + // Copy the derived class's data + copy( &mCalcObject ); + + // Copy the base class's data + ( ( MFieldObject & ) * this ) = mCalcObject; + + return *this; +} + +/** Destructor */ +MCalcObject::~MCalcObject() +{} + +/** Sets the field's calculation type */ +void MCalcObject::setCalculationType( int type ) +{ + calcType = type; +} + +/** Returns the field's calculation type */ +int MCalcObject::getCalculationType() +{ + return calcType; +} + +/** Copies member data from one object to another. + Used by the copy constructor and assignment operator */ +void MCalcObject::copy( const MCalcObject* mCalcObject ) +{ + // Copy the fields's calculation type + calcType = mCalcObject->calcType; +} + +} |