1 | /* This file is part of the KDE project |
2 | Copyright 2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net> |
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, or (at your option) any later version. |
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 | #ifndef KSPREAD_CELL_STORAGE_P |
21 | #define KSPREAD_CELL_STORAGE_P |
22 | |
23 | // KSpread |
24 | #include "Binding.h" |
25 | #include "Condition.h" |
26 | #include "Formula.h" |
27 | #include "Style.h" |
28 | #include "Validity.h" |
29 | #include "Value.h" |
30 | |
31 | namespace Calligra |
32 | { |
33 | namespace Sheets |
34 | { |
35 | |
36 | class CellStorageUndoData |
37 | { |
38 | public: |
39 | bool isEmpty() const { |
40 | if (!bindings.isEmpty()) |
41 | return false; |
42 | if (!comments.isEmpty()) |
43 | return false; |
44 | if (!conditions.isEmpty()) |
45 | return false; |
46 | if (!databases.isEmpty()) |
47 | return false; |
48 | if (!formulas.isEmpty()) |
49 | return false; |
50 | if (!fusions.isEmpty()) |
51 | return false; |
52 | if (!links.isEmpty()) |
53 | return false; |
54 | if (!matrices.isEmpty()) |
55 | return false; |
56 | if (!namedAreas.isEmpty()) |
57 | return false; |
58 | if (!styles.isEmpty()) |
59 | return false; |
60 | if (!userInputs.isEmpty()) |
61 | return false; |
62 | if (!validities.isEmpty()) |
63 | return false; |
64 | if (!values.isEmpty()) |
65 | return false; |
66 | if (!richTexts.isEmpty()) |
67 | return false; |
68 | return true; |
69 | } |
70 | |
71 | QList< QPair<QRectF, Binding> > bindings; |
72 | QList< QPair<QRectF, QString> > ; |
73 | QList< QPair<QRectF, Conditions> > conditions; |
74 | QList< QPair<QRectF, Database> > databases; |
75 | QVector< QPair<QPoint, Formula> > formulas; |
76 | QList< QPair<QRectF, bool> > fusions; |
77 | QVector< QPair<QPoint, QString> > links; |
78 | QList< QPair<QRectF, bool> > matrices; |
79 | QList< QPair<QRectF, QString> > namedAreas; |
80 | QList< QPair<QRectF, SharedSubStyle> > styles; |
81 | QVector< QPair<QPoint, QString> > userInputs; |
82 | QList< QPair<QRectF, Validity> > validities; |
83 | QVector< QPair<QPoint, Value> > values; |
84 | QVector< QPair<QPoint, QSharedPointer<QTextDocument> > > richTexts; |
85 | }; |
86 | |
87 | } // namespace Sheets |
88 | } // namespace Calligra |
89 | |
90 | #endif // KSPREAD_CELL_STORAGE_P |
91 | |