#include "table.h"
#include "vspace.h"
#include "layout.h"
+#include "support/lstrings.h"
#ifdef __GNUG__
#pragma implementation
cellinfo_of_cell(fvcell)->p_width = width;
} else {
column_info[column_of_cell(fvcell)].p_width = width;
- SetAlignment(cell,LYX_ALIGN_LEFT);
+ if (!width.empty()) // do this only if there is a width
+ SetAlignment(cell,LYX_ALIGN_LEFT);
}
return true;
}
for (i=0; i < NumberOfCellsInRow(fcell); i++){
if (BottomLine(fcell+i)){
file += "\\cline{";
- file += column_of_cell(fcell+i)+1;
+ file += tostr(column_of_cell(fcell+i)+1);
file += '-';
- file += right_column_of_cell(fcell+i)+1;
+ file += tostr(right_column_of_cell(fcell+i)+1);
file += "} ";
tmp = 1;
}
for (i=0; i < NumberOfCellsInRow(fcell); i++){
if (TopLine(fcell+i)){
file += "\\cline{";
- file += column_of_cell(fcell+i)+1;
+ file += tostr(column_of_cell(fcell+i)+1);
file += '-';
- file += right_column_of_cell(fcell+i)+1;
+ file += tostr(right_column_of_cell(fcell+i)+1);
file += "} ";
tmp = 1;
}
for (i=0; i < NumberOfCellsInRow(fcell); i++){
if (BottomLine(fcell+i)){
file += "\\cline{";
- file += column_of_cell(fcell+i)+1;
+ file += tostr(column_of_cell(fcell+i)+1);
file += '-';
- file += right_column_of_cell(fcell+i)+1;
+ file += tostr(right_column_of_cell(fcell+i)+1);
file += "} ";
hline1 += "\\cline{";
- hline1 += column_of_cell(fcell+i)+1;
+ hline1 += tostr(column_of_cell(fcell+i)+1);
hline1 += '-';
- hline1 += right_column_of_cell(fcell+i)+1;
+ hline1 += tostr(right_column_of_cell(fcell+i)+1);
hline1 += "} ";
tmp = 1;
}
if (TopLine(fcell+i)){
if (print_hline) {
file += "\\cline{";
- file += column_of_cell(fcell+i)+1;
+ file += tostr(column_of_cell(fcell+i)+1);
file += '-';
- file += right_column_of_cell(fcell+i)+1;
+ file += tostr(right_column_of_cell(fcell+i)+1);
file += "} ";
}
hline2 += "\\cline{";
- hline2 += column_of_cell(fcell+i)+1;
+ hline2 += tostr(column_of_cell(fcell+i)+1);
hline2 += '-';
- hline2 += right_column_of_cell(fcell+i)+1;
+ hline2 += tostr(right_column_of_cell(fcell+i)+1);
hline2 += "} ";
tmp = 1;
}
}
if (nvcell < numberofcells && IsMultiColumn(nvcell)) {
file += "\\multicolumn{";
- file += cells_in_multicolumn(nvcell);
+ file += tostr(cells_in_multicolumn(nvcell));
file += "}{";
if (!cellinfo_of_cell(cell+1)->align_special.empty()) {
file += cellinfo_of_cell(cell+1)->align_special;
else
file += "<TGROUP ";
file += "COLS='";
- file += columns;
+ file += tostr(columns);
file += "' COLSEP='1' ROWSEP='1'>";
addNewlineAndDepth(file,++depth);
ret++;
file += "<COLSPEC ALIGN='";
file += getDocBookAlign(i, true);
file += "' COLNAME='col";
- file += i+1;
+ file += tostr(i+1);
file += "' COLNUM='";
- file += i+1;
+ file += tostr(i+1);
file += "' COLSEP='";
if (i == (columns-1)) {
file += '1';
file += "'";
if (IsMultiColumn(0)) {
file += " NAMEST='col1' NAMEEND='col";
- file += cells_in_multicolumn(0);
+ file += tostr(cells_in_multicolumn(0));
file += "'";
}
file += ">";
file += "' VALIGN='middle'";
if (IsMultiColumn(cell+1)) {
file += " NAMEST='col";
- file += column_of_cell(cell+1) + 1;
+ file += tostr(column_of_cell(cell+1) + 1);
file += "' NAMEEND='col";
- file += column_of_cell(cell+1) +
- cells_in_multicolumn(cell+1);
+ file += tostr(column_of_cell(cell+1) +
+ cells_in_multicolumn(cell+1));
file += "'";
}
file += ">";
file += "' VALIGN='middle'";
if (IsMultiColumn(cell+1)) {
file += " NAMEST='col";
- file += column_of_cell(cell+1) + 1;
+ file += tostr(column_of_cell(cell+1) + 1);
file += "' NAMEEND='col";
- file += column_of_cell(cell+1) +
- cells_in_multicolumn(cell+1);
+ file += tostr(column_of_cell(cell+1) +
+ cells_in_multicolumn(cell+1));
file += "'";
}
file += ">";