+2001-07-18 Juergen Vigna <jug@sad.it>
+
+ * tabular.C (GetCellNumber): put an assert here instead of the check!
+
2001-07-17 Juergen Vigna <jug@sad.it>
* BufferView_pimpl.C (toggleSelection): adapted too.
+2001-07-18 Juergen Vigna <jug@sad.it>
+
+ * insettabular.C (selectNextWord): fixed spellchecking for the
+ first cell of a tabular (wasn't entered!)
+
2001-07-17 Juergen Vigna <jug@sad.it>
* various files: implemented the below functions.
str = the_locking_inset->selectNextWord(bv, value);
if (!str.empty())
return str;
- }
- if (tabular->IsLastCell(actcell)) {
- bv->unlockInset(const_cast<InsetTabular *>(this));
- return string();
+ if (tabular->IsLastCell(actcell)) {
+ bv->unlockInset(const_cast<InsetTabular *>(this));
+ return string();
+ }
+ ++actcell;
}
// otherwise we have to lock the next inset and ask for it's selecttion
UpdatableInset * inset =
- static_cast<UpdatableInset*>(tabular->GetCellInset(++actcell));
+ static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv, 0, 0, 0);
string str = selectNextWordInt(bv, value);
if (!str.empty())
string InsetTabular::selectNextWordInt(BufferView * bv, float & value) const
{
- if (the_locking_inset) {
- string str;
- str = the_locking_inset->selectNextWord(bv, value);
- if (!str.empty())
- return str;
- }
+ // when entering this function the inset should be ALWAYS locked!
+ lyx::Assert(the_locking_inset);
+
+ string str;
+ str = the_locking_inset->selectNextWord(bv, value);
+ if (!str.empty())
+ return str;
+
if (tabular->IsLastCell(actcell)) {
bv->unlockInset(const_cast<InsetTabular *>(this));
return string();
for (int i = 0; i < par->size(); ++i) {
if (par->isNewline(i)) {
++cell;
- if (cell > GetNumberOfCells()) {
+ if (cell > numberofcells) {
lyxerr << "Some error in reading old table format occured!" <<
endl << "Terminating when reading cell[" << cell << "]!" <<
endl;
bool LyXTabular::IsLastCell(int cell) const
{
- if ((cell + 1) < GetNumberOfCells())
+ if ((cell + 1) < numberofcells)
return false;
return true;
}
int LyXTabular::GetCellNumber(int row, int column) const
{
-#if 1
+#if 0
if (column >= columns_)
column = columns_ - 1;
else if (column < 0)
else if (row < 0)
row = 0;
#else
- lyx::Assert(column < 0 || column >= columns_ || row < 0 || row >= rows_);
+ lyx::Assert(column >= 0 || column < columns_ || row >= 0 || row < rows_);
#endif
return cell_info[row][column].cellno;
}