]> git.lyx.org Git - features.git/commitdiff
Make updateMacros() descend into tables. Fixes #6897.
authorRichard Heck <rgheck@comcast.net>
Tue, 19 Oct 2010 15:36:11 +0000 (15:36 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 19 Oct 2010 15:36:11 +0000 (15:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35718 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index b2c3d8ddd8ec5c20a011ed596ba0ab4c847410ce..c9277d642f9f88e2e3c522d66208190382ed4076 100644 (file)
@@ -70,6 +70,7 @@
 #include "insets/InsetBibtex.h"
 #include "insets/InsetBranch.h"
 #include "insets/InsetInclude.h"
+#include "insets/InsetTabular.h"
 #include "insets/InsetText.h"
 
 #include "mathed/InsetMathHull.h"
@@ -2732,6 +2733,17 @@ void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope)
                                it.pop_back();
                                continue;
                        }
+                       
+                       if (iit->inset->asInsetTabular()) {
+                               CursorSlice slice(*iit->inset);
+                               size_t const numcells = slice.nargs();
+                               for (; slice.idx() < numcells; slice.forwardIdx()) {
+                                       it.push_back(slice);
+                                       updateMacros(it, scope);
+                                       it.pop_back();
+                               }
+                               continue;
+                       }
 
                        // is it an external file?
                        if (iit->inset->lyxCode() == INCLUDE_CODE) {