On 10/19/2010 05:45 PM, Jean-Marc Lasgouttes wrote:
Le 17 oct. 10 à 21:56, Richard Heck a écrit :
Can someone who actually understands that stuff have a look at the attached and tell me if it is OK?

If you tested that it works as expected, it is probably OK.

A remark on the code:

+
+            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;
+            }

It looks like you could push_back the slice outside of the for loop.

I tried something like that, but it seems not to see the cells when you go back through.

Finally, this cries for a Inset::updateMacros virtual method allowing to move this stuff where is belongs.

Yes, well, perhaps that kind of cleanup should wait?

rh

Reply via email to