* \author John Levon
* \author André Pönitz
* \author Jürgen Vigna
+ * \author Uwe Stöhr
*
* Full author contact details are available in file CREDITS.
*/
#include "LyXRC.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
-#include "paragraph_funcs.h"
#include "Paragraph.h"
#include "ParagraphParameters.h"
#include "ParIterator.h"
p_width(cs.p_width),
inset(dynamic_cast<InsetTableCell *>(cs.inset->clone()))
{
+ inset->setBuffer(cs.inset->buffer());
}
Tabular::CellData & Tabular::CellData::operator=(CellData cs)
// reset layout
cur.push(*inset);
// undo information has already been recorded
- inset->getText(0)->setLayout(cur.bv().buffer(), 0, cur.lastpit() + 1,
+ inset->getText(0)->setLayout(0, cur.lastpit() + 1,
bp.documentClass().plainLayoutName());
cur.pop();
}
setRightLine(i, false);
} else {
unsetMultiColumn(i);
- // FIXME: when unsetting a caption row, also all existing captions
- // in this row must be dissolved, see (bug 5754)
- // dispatch(FuncRequest(LFUN_INSET_DISSOLVE, "caption-insert"));
+ // When unsetting a caption row, also all existing
+ // captions in this row must be dissolved.
+ lyx::dispatch(FuncRequest(LFUN_INSET_BEGIN));
+ lyx::dispatch(FuncRequest(LFUN_INSET_DISSOLVE, "caption"));
}
row_info[row].caption = what;
return i;
}
-docstring InsetTabular::editMessage() const
-{
- return _("Opened table");
-}
-
-
void InsetTabular::edit(Cursor & cur, bool front, EntryDirection)
{
//lyxerr << "InsetTabular::edit: " << this << endl;
&& cur.pos() == cur.lastpos())
|| (!next_cell && cur.pit() == 0 && cur.pos() == 0));
+ bool const empty_cell = cur.lastpos() == 0 && cur.lastpit() == 0;
+
// ...try to dispatch to the cell's inset.
cell(cur.idx())->dispatch(cur, cmd);
- bool const empty_cell = cur.lastpos() == 0 && cur.lastpit() == 0;
-
// When we already have a selection we want to select the whole cell
// before going to the next cell.
if (select_whole && !empty_cell){
if (cur.selIsMultiCell()) {
cur.recordUndoInset(DELETE_UNDO);
cutSelection(cur);
- }
- else
+ } else
cell(cur.idx())->dispatch(cur, cmd);
break;
}
-void InsetTabular::acceptChanges(BufferParams const & bparams)
+void InsetTabular::acceptChanges()
{
for (idx_type idx = 0; idx < nargs(); ++idx)
- cell(idx)->acceptChanges(bparams);
+ cell(idx)->acceptChanges();
}
-void InsetTabular::rejectChanges(BufferParams const & bparams)
+void InsetTabular::rejectChanges()
{
for (idx_type idx = 0; idx < nargs(); ++idx)
- cell(idx)->rejectChanges(bparams);
+ cell(idx)->rejectChanges();
}