KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8KB

  1. /* This file is part of the KDE project
  2. Copyright (C) 2004 Laurent Montel <montel@kde.org>
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public
  5. License as published by the Free Software Foundation; either
  6. version 2 of the License, or (at your option) any later version.
  7. This library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public License
  12. along with this library; see the file COPYING.LIB. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. * Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef KSPRSAVINGINFO_H
  17. #define KSPRSAVINGINFO_H
  18. namespace KSpread
  19. {
  20. class Sheet;
  21. /// Temporary information used only during saving
  22. class KSPRSavingInfo
  23. {
  24. public:
  25. KSPRSavingInfo() {styleNumber = 0;}
  26. ~KSPRSavingInfo() {}
  27. struct sheetDef {
  28. TQString sheetName;
  29. Sheet *sheetIndex;
  30. };
  31. typedef TQMap<TQString, sheetDef> StylePageMap;
  32. void appendMasterPage( const TQString &styleName, const sheetDef &_def ){ m_masterPageStyle.insert( styleName,_def );}
  33. TQString masterPageName( const TQString &name) {
  34. sheetDef _def = m_masterPageStyle[name];
  35. return _def.sheetName;}
  36. sheetDef pageDef( const TQString &name) { return m_masterPageStyle[name]; }
  37. bool findStyleName(const TQString & name) const { return (m_masterPageStyle.find( name ) != m_masterPageStyle.end());}
  38. StylePageMap stylePageMap() const { return m_masterPageStyle;}
  39. int styleNumber;
  40. private:
  41. StylePageMap m_masterPageStyle;
  42. };
  43. } // namespace KSpread
  44. #endif /* KPRSAVINGINFO_H */