]> git.lyx.org Git - features.git/commitdiff
Implement isChanged for tabular inset.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 13 Jan 2020 15:34:38 +0000 (16:34 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:50 +0000 (15:48 +0200)
src/insets/InsetTabular.cpp
src/insets/InsetTabular.h

index 1bd757b024a14e76f5c942587152ec47e4289842..ba9462c38a8163fe6c54f00cfd68d88a12298d16 100644 (file)
@@ -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)
index edd7242d2003904b93fae15426f2621b66eea6bd..a2d290081943ce97649afdc361c61c47c9fc0520 100644 (file)
@@ -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