X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetTabular.cpp;h=b12474344606c04db87920a5ca81e3f92c5408a4;hb=4824f7c9db8301550c1bc53c340fbeae916a46f3;hp=b633c492e1b6175180ea4b82c5517821c375ef50;hpb=3cba653a6785b312b0ecacfe3ea2384bc8bf30ae;p=lyx.git diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index b633c492e1..b124743446 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3432,6 +3432,12 @@ docstring InsetTableCell::asString(bool intoInsets) } +void InsetTableCell::addToToc(DocIterator const & di, bool output_active) const +{ + InsetText::iterateForToc(di, output_active); +} + + docstring InsetTableCell::xhtml(XHTMLStream & xs, OutputParams const & rp) const { if (!isFixedWidth) @@ -3897,8 +3903,12 @@ void InsetTabular::updateBuffer(ParIterator const & it, UpdateType utype) // In a longtable, tell captions what the current float is Counters & cnts = buffer().masterBuffer()->params().documentClass().counters(); string const saveflt = cnts.current_float(); - if (tabular.is_long_tabular) + if (tabular.is_long_tabular) { cnts.current_float("table"); + // in longtables, we only step the counter once + cnts.step(from_ascii("table"), utype); + cnts.isLongtable(true); + } ParIterator it2 = it; it2.forwardPos(); @@ -3907,8 +3917,10 @@ void InsetTabular::updateBuffer(ParIterator const & it, UpdateType utype) buffer().updateBuffer(it2, utype); //reset afterwards - if (tabular.is_long_tabular) + if (tabular.is_long_tabular) { cnts.current_float(saveflt); + cnts.isLongtable(false); + } } @@ -4316,8 +4328,16 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) if (cur.selIsMultiCell()) { cur.recordUndoInset(DELETE_UNDO); cutSelection(cur); - } - cell(cur.idx())->dispatch(cur, cmd); + BufferView * bv = &cur.bv(); + docstring::const_iterator cit = cmd.argument().begin(); + docstring::const_iterator const end = cmd.argument().end(); + for (; cit != end; ++cit) + bv->translateAndInsert(*cit, getText(cur.idx()), cur); + + cur.resetAnchor(); + bv->bookmarkEditPosition(); + } else + cell(cur.idx())->dispatch(cur, cmd); break; case LFUN_CHAR_DELETE_BACKWARD: