From: Jean-Marc Lasgouttes Date: Mon, 13 Jan 2020 15:34:38 +0000 (+0100) Subject: Implement isChanged for tabular inset. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3d76f6920fce481a66407c3f987a5869a4330f1a;p=features.git Implement isChanged for tabular inset. --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 1bd757b024..ba9462c38a 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 edd7242d20..a2d2900819 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