From 3d76f6920fce481a66407c3f987a5869a4330f1a Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 13 Jan 2020 16:34:38 +0100 Subject: [PATCH] Implement isChanged for tabular inset. --- src/insets/InsetTabular.cpp | 10 ++++++++++ src/insets/InsetTabular.h | 2 ++ 2 files changed, 12 insertions(+) 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 -- 2.39.5