commit 93794d6fea9845a0b6ce7227cf966906a8238215 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Mon Jan 13 16:34:38 2020 +0100
Implement isChanged for tabular inset. --- src/insets/InsetTabular.cpp | 10 ++++++++++ src/insets/InsetTabular.h | 2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 1bd757b..ba9462c 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -7122,6 +7122,16 @@ Text * InsetTabular::getText(int idx) const } +bool InsetTabular::isChanged() const +{ + for (idx_type idx = 0; idx < nargs(); ++idx) + if (cell(idx)->isChanged()) + return true; + // FIXME: shall we look at row/columns changed status? + return false; +} + + void InsetTabular::setChange(Change const & change) { for (idx_type idx = 0; idx < nargs(); ++idx) diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index edd7242..a2d2900 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -1000,6 +1000,8 @@ public: /// Text * getText(int) const; + /// does the inset contain changes ? + bool isChanged() const; /// set the change for the entire inset void setChange(Change const & change); /// accept the changes within the inset -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs