kspread

damages.cpp
1/* This file is part of the KDE project
2 Copyright 2004 Ariya Hidayat <ariya@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20
21#include "damages.h"
22
23#include "kspread_cell.h"
24#include "kspread_sheet.h"
25
26namespace KSpread
27{
28
29class SheetDamage::Private
30{
31public:
32 KSpread::Sheet* sheet;
33 int action;
34};
35
36class CellDamage::Private
37{
38public:
39 KSpread::Cell* cell;
40};
41
42}
43
44using namespace KSpread;
45
46
47CellDamage::CellDamage( KSpread::Cell* cell )
48{
49 d = new Private;
50 d->cell = cell;
51}
52
53CellDamage::~CellDamage()
54{
55 delete d;
56}
57
58KSpread::Cell* CellDamage::cell()
59{
60 return d->cell;
61}
62
63SheetDamage::SheetDamage( KSpread::Sheet* sheet, int action )
64{
65 d = new Private;
66 d->sheet = sheet;
67 d->action = action;
68}
69
70SheetDamage::~SheetDamage()
71{
72 delete d;
73}
74
75KSpread::Sheet* SheetDamage::sheet() const
76{
77 return d->sheet;
78}
79
80int SheetDamage::action() const
81{
82 return d->action;
83}
For every cell in the spread sheet there is a Cell object.
Sheet * sheet() const
Returns the worksheet which owns this cell.
The KSpread namespace.
Definition commands.h:39