kspread

ksprsavinginfo.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Laurent Montel <montel@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, 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 KSPRSAVINGINFO_H
21#define KSPRSAVINGINFO_H
22
23namespace KSpread
24{
25class Sheet;
26
28class KSPRSavingInfo
29{
30public:
31 KSPRSavingInfo() {styleNumber = 0;}
32 ~KSPRSavingInfo() {}
33 struct sheetDef {
34 TQString sheetName;
35 Sheet *sheetIndex;
36 };
37
38 typedef TQMap<TQString, sheetDef> StylePageMap;
39
40 void appendMasterPage( const TQString &styleName, const sheetDef &_def ){ m_masterPageStyle.insert( styleName,_def );}
41
42 TQString masterPageName( const TQString &name) {
43 sheetDef _def = m_masterPageStyle[name];
44 return _def.sheetName;}
45
46 sheetDef pageDef( const TQString &name) { return m_masterPageStyle[name]; }
47
48 bool findStyleName(const TQString & name) const { return (m_masterPageStyle.find( name ) != m_masterPageStyle.end());}
49
50 StylePageMap stylePageMap() const { return m_masterPageStyle;}
51
52 int styleNumber;
53
54private:
55 StylePageMap m_masterPageStyle;
56};
57
58} // namespace KSpread
59
60#endif /* KPRSAVINGINFO_H */
61
The KSpread namespace.
Definition commands.h:39