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.

84 lines
1.5KB

  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. #include "damages.h"
  17. #include "kspread_cell.h"
  18. #include "kspread_sheet.h"
  19. namespace KSpread
  20. {
  21. class SheetDamage::Private
  22. {
  23. public:
  24. KSpread::Sheet* sheet;
  25. int action;
  26. };
  27. class CellDamage::Private
  28. {
  29. public:
  30. KSpread::Cell* cell;
  31. };
  32. }
  33. using namespace KSpread;
  34. CellDamage::CellDamage( KSpread::Cell* cell )
  35. {
  36. d = new Private;
  37. d->cell = cell;
  38. }
  39. CellDamage::~CellDamage()
  40. {
  41. delete d;
  42. }
  43. KSpread::Cell* CellDamage::cell()
  44. {
  45. return d->cell;
  46. }
  47. SheetDamage::SheetDamage( KSpread::Sheet* sheet, int action )
  48. {
  49. d = new Private;
  50. d->sheet = sheet;
  51. d->action = action;
  52. }
  53. SheetDamage::~SheetDamage()
  54. {
  55. delete d;
  56. }
  57. KSpread::Sheet* SheetDamage::sheet() const
  58. {
  59. return d->sheet;
  60. }
  61. int SheetDamage::action() const
  62. {
  63. return d->action;
  64. }