Am 19.03.2008 um 17:11 schrieb Richard Heck:

So, it seems to me that fixing "our most embarrassing bug" is going to require doing something that maybe ought to have been done before, namely, introducing an InsetTableCell that will contain a pointer (or reference) to the associated CellData. Doing that much is near trivial---InsetTableCell itself will override but a handful of InsetText's methods---but I'm guessing this pointer will need updating whenever the cell is copied or, at least, whenever the CellData is copied. So one possibility here would be to write copy (and assignment?) constructors for CellData. Is there any easier way to do this than manually to copy all of the member data?

Here's another possibility. s/CellData/CellInfo/g, and then:
class CellInfo {
  CellData cell_data_;
  InsetTableCell itc_;
  CellInfo(CellInfo const & ci) {
      cell_data_ = ci.cell_data;
      itc_ = ci.itc_;
      itc_.cellDataPtr = cell_data_;
  }
  etc.
}
A handful of other changes, too, of course, but the idea obviously is to wrap the data and associated inset in the CellInfo class and then deal with the copy constructor more easily.

Will the InsetTableCell show up in the cursor as another slice? Or is it just to get some functionality from InsetText?

Shouldn't there be something like MathData for text instead which is also "between" InsetText and Text? Or in fact Text is the corrsponding class for Text already.

Without knowing the code too well, another InsetText for the cells looks strange compared to what we do in mathed.

Stefan

Reply via email to