}
+void InsetTabular::updateMacros(DocIterator const & us, DocIterator const & scope)
+{
+ DocIterator pos = us;
+ size_t const numcells = pos.nargs();
+ for (size_t c = 0; c < numcells; ++c, pos.top().forwardIdx()) {
+ shared_ptr<InsetTableCell> cp = cell(c);
+ // this test should be unnecessary, right?
+ if (cp)
+ cp->updateMacros(pos, scope);
+ }
+}
+
+
void InsetTabular::updateBuffer(ParIterator const & it, UpdateType utype, bool const /*deleted*/)
{
// In a longtable, tell captions what the current float is
/// Update the counters of this inset and of its contents
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
///
+ void updateMacros(DocIterator const & us, DocIterator const & scope) override;
+ ///
void addToToc(DocIterator const & di, bool output_active,
UpdateType utype, TocBackend & backend) const override;
#include "mathed/InsetMathHull.h"
#include "mathed/MacroTable.h"
#include "mathed/InsetMathMacroTemplate.h"
+#include "insets/InsetTabular.h"
#include "support/convert.h"
#include "support/debug.h"
continue;
}
- if (insit.inset->asInsetTabular()) {
- CursorSlice slice(*insit.inset);
- size_t const numcells = slice.nargs();
- for (; slice.idx() < numcells; slice.forwardIdx()) {
- it.push_back(slice);
- updateMacros(it, ourscope);
- it.pop_back();
- }
+ if (InsetTabular * itext = insit.inset->asInsetTabular()) {
+ it.push_back(CursorSlice(*insit.inset));
+ itext->updateMacros(it, ourscope);
+ it.pop_back();
continue;
}