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.

94 lines
1.8KB

  1. /* This file is part of the KDE project
  2. Copyright 2004 Ariya Hidayat <ariya@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.
  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 KSPREAD_DAMAGES
  17. #define KSPREAD_DAMAGES
  18. namespace KSpread
  19. {
  20. class Cell;
  21. class Sheet;
  22. class Damage
  23. {
  24. public:
  25. typedef enum
  26. {
  27. Nothing = 0,
  28. Document,
  29. Workbook,
  30. Sheet,
  31. Range,
  32. Cell
  33. } Type;
  34. virtual Type type() const { return Nothing; }
  35. };
  36. class CellDamage : public Damage
  37. {
  38. public:
  39. CellDamage( KSpread::Cell* cell );
  40. virtual ~CellDamage();
  41. virtual Type type() const { return Damage::Cell; }
  42. KSpread::Cell* cell();
  43. private:
  44. class Private;
  45. Private *d;
  46. };
  47. class SheetDamage : public Damage
  48. {
  49. public:
  50. enum
  51. {
  52. None = 0,
  53. ContentChanged,
  54. PropertiesChanged,
  55. Hidden,
  56. Shown
  57. };
  58. SheetDamage( KSpread::Sheet* sheet, int action );
  59. virtual ~SheetDamage();
  60. virtual Type type() const { return Damage::Sheet; }
  61. KSpread::Sheet* sheet() const;
  62. int action() const;
  63. private:
  64. class Private;
  65. Private *d;
  66. };
  67. } // namespace KSpread
  68. #endif // KSPREAD_DAMAGES