>> Besides this code is truly horrific:
>
>Why exactly is this horrific?
>
Because you store things in variables that are not used anywhere.
Constructions with the ? And : operators, without proper spacing and
then a conditional assignment at the end, which value is also assigned
to some magic variable which is never used. Then two lines that seem to
be accidently slipped in ?
> And I don't really understand the following:
>
> + switch (tabular.getVAlignment(tabular.cellIndex(r, c))) {
> + case Tabular::LYX_VALIGN_TOP:
> + tabular.row_info[r].valignment =
> Tabular::LYX_VALIGN_TOP;
> + break;
> + case Tabular::LYX_VALIGN_MIDDLE:
> + tabular.row_info[r].valignment =
> Tabular::LYX_VALIGN_MIDDLE;
> + break;
> + case Tabular::LYX_VALIGN_BOTTOM:
> + tabular.row_info[r].valignment =
> Tabular::LYX_VALIGN_BOTTOM;
> + break;
> + }
>
> Isn't this the same as:
> tabular.row_info[r].valignment =
> tabular.getValignment(tabular.cellIndex(r,c));
>No.
So, what is the difference ? I don't see it.
Switch (x) {
Case 1:
y = 1;
Case 2:
y = 2;
Case 3:
y = 3:
}
Is the same as
Y=x ???
>We need here to know the alignment of the highest cell in the row.
>therefore first determined this cell and stored its alignment as row
>valignment because it determines the baseline for the alignment of
>the other cells in the row. You will see what I mean when playing
>with the valignment in the small LyX file I sent after my commit.
You're not describing the code I didn't understand and show you above ?
Do you ?
Vincent