tabular->GetAdditionalWidth(actcell - 1));
#else
// Jürgen, you should check that this is correct. (Lgb)
+#warning Jürgen, please check. (Lgb)
for (; !tabular->IsLastCellInRow(actcell) && lx < x; ++actcell) {
lx += tabular->GetWidthOfColumn(actcell + 1)
+ tabular->GetAdditionalWidth(actcell);
}
-bool InsetTabular::Delete()
+bool InsetTabular::deletable()
{
-#warning Is this func correctly named? Or should it be "deletable"? (Lgb?)
-#warning I guess this could be 'deletable'! (Jug)
return true;
}
const_cast<InsetTabular *>(this));
}
+
//
// functions returns:
// 0 ... disabled
if (!hasSelection())
return false;
- //int sel_col_start;
- //int sel_col_end;
- //int sel_row_start;
- //int sel_row_end;
-
int sel_col_start = tabular->column_of_cell(sel_cell_start);
int sel_col_end = tabular->column_of_cell(sel_cell_end);
if (sel_col_start > sel_col_end) {
int sel_row_start = tabular->row_of_cell(sel_cell_start);
int sel_row_end = tabular->row_of_cell(sel_cell_end);
if (sel_row_start > sel_row_end) {
- //int tmp = sel_row_start;
- //sel_row_start = sel_row_end;
- //sel_row_end = tmp;
swap(sel_row_start, sel_row_end);
}
if (sel_cell_start > sel_cell_end) {
- //int tmp = sel_cell_start;
- //sel_cell_start = sel_cell_end;
- //sel_cell_end = tmp;
swap(sel_cell_start, sel_cell_end);
}
for (int i = sel_row_start; i <= sel_row_end; ++i) {
ecol = tabular->right_column_of_cell(sel_cell_end);
}
+
Paragraph * InsetTabular::getParFromID(int id) const
{
Paragraph * result;
return 0;
}
+
Paragraph * InsetTabular::firstParagraph() const
{
if (the_locking_inset)
return 0;
}
+
LyXCursor const & InsetTabular::cursor(BufferView * bv) const
{
if (the_locking_inset)
}
-string InsetTabular::selectNextWord(BufferView * bv, float & value) const
+string const InsetTabular::selectNextWord(BufferView * bv, float & value) const
{
if (the_locking_inset) {
- string str;
- str = the_locking_inset->selectNextWord(bv, value);
+ string const str(the_locking_inset->selectNextWord(bv, value));
if (!str.empty())
return str;
if (tabular->IsLastCell(actcell)) {
UpdatableInset * inset =
static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv, 0, 0, 0);
- string str = selectNextWordInt(bv, value);
+ string const str(selectNextWordInt(bv, value));
if (!str.empty())
resetPos(bv);
return str;
}
+
string InsetTabular::selectNextWordInt(BufferView * bv, float & value) const
{
// when entering this function the inset should be ALWAYS locked!
lyx::Assert(the_locking_inset);
- string str;
- str = the_locking_inset->selectNextWord(bv, value);
+ string const str(the_locking_inset->selectNextWord(bv, value));
if (!str.empty())
return str;
return;
}
+
void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection)
{
if (the_locking_inset) {
UpdatableInset * inset =
static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv);
- bool res = searchForward(bv, str, cs, mw);
+ bool const res = searchForward(bv, str, cs, mw);
updateLocal(bv, NONE, false);
nodraw(false);
bv->updateInset(const_cast<InsetTabular *>(this), false);
return res;
}
+
bool InsetTabular::searchBackward(BufferView * bv, string const & str,
bool const & cs, bool const & mw)
{
UpdatableInset * inset =
static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv, false);
- bool res = searchBackward(bv, str, cs, mw);
+ bool const res = searchBackward(bv, str, cs, mw);
nodraw(false);
bv->updateInset(const_cast<InsetTabular *>(this), false);
return res;