kspread
damages.cc
00001 /* This file is part of the KDE project 00002 Copyright 2004 Ariya Hidayat <ariya@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 00021 #include "damages.h" 00022 00023 #include "kspread_cell.h" 00024 #include "kspread_sheet.h" 00025 00026 namespace KSpread 00027 { 00028 00029 class SheetDamage::Private 00030 { 00031 public: 00032 KSpread::Sheet* sheet; 00033 int action; 00034 }; 00035 00036 class CellDamage::Private 00037 { 00038 public: 00039 KSpread::Cell* cell; 00040 }; 00041 00042 } 00043 00044 using namespace KSpread; 00045 00046 00047 CellDamage::CellDamage( KSpread::Cell* cell ) 00048 { 00049 d = new Private; 00050 d->cell = cell; 00051 } 00052 00053 CellDamage::~CellDamage() 00054 { 00055 delete d; 00056 } 00057 00058 KSpread::Cell* CellDamage::cell() 00059 { 00060 return d->cell; 00061 } 00062 00063 SheetDamage::SheetDamage( KSpread::Sheet* sheet, int action ) 00064 { 00065 d = new Private; 00066 d->sheet = sheet; 00067 d->action = action; 00068 } 00069 00070 SheetDamage::~SheetDamage() 00071 { 00072 delete d; 00073 } 00074 00075 KSpread::Sheet* SheetDamage::sheet() const 00076 { 00077 return d->sheet; 00078 } 00079 00080 int SheetDamage::action() const 00081 { 00082 return d->action; 00083 }