+2001-12-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * tabular-old.C (getTokenValue):
+ * tabular.C (getTokenValue):
+ (write_attribute): new versions for LyXLength
+ (everywhere): adjust the use of widths
+
+ * tabular.h: change the type of widths from string to LyXLength
+
2001-12-11 Ben Stanley <bds02@uow.edu.au>
* paragraph.C: fixed missing line number count when exporting
+2001-12-11 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * FormTabular.C: use LyXLength instead of string wherever
+ necessary; whitespace changes.
+
2001-12-08 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* forms/form_preferences.fd: use the same name for font sizes
for (std::vector<string>::iterator it = units_vec.begin();
it != units_vec.end(); ++it) {
if (contains(*it, "%"))
- it = units_vec.erase(it, it+1) - 1;
+ it = units_vec.erase(it, it + 1) - 1;
}
string units = getStringFromVector(units_vec, "|");
LyXTabular * tabular = inset_->tabular.get();
int align;
char buf[12];
- string pwidth;
+ LyXLength pwidth;
string special;
int cell = inset_->getActCell();
actCell_ = cell;
- int column = tabular->column_of_cell(cell)+1;
- fl_set_object_label(dialog_->text_warning,"");
+ int column = tabular->column_of_cell(cell) + 1;
+ fl_set_object_label(dialog_->text_warning, "");
fl_activate_object(column_options_->input_special_alignment);
fl_activate_object(cell_options_->input_special_multialign);
fl_activate_object(column_options_->input_column_width);
fl_activate_object(column_options_->choice_value_column_width);
- sprintf(buf,"%d",column);
+ sprintf(buf, "%d", column);
fl_set_input(dialog_->input_tabular_column, buf);
fl_deactivate_object(dialog_->input_tabular_column);
- int row = tabular->row_of_cell(cell)+1;
- sprintf(buf,"%d",row);
+ int row = tabular->row_of_cell(cell) + 1;
+ sprintf(buf, "%d", row);
fl_set_input(dialog_->input_tabular_row, buf);
fl_deactivate_object(dialog_->input_tabular_row);
if (tabular->IsMultiColumn(cell)) {
setEnabled(cell_options_->radio_border_right, true);
pwidth = tabular->GetMColumnPWidth(cell);
align = tabular->GetAlignment(cell);
- if (!pwidth.empty() || (align == LYX_ALIGN_LEFT))
+ if (!pwidth.zero() || (align == LYX_ALIGN_LEFT))
fl_set_button(cell_options_->radio_align_left, 1);
else if (align == LYX_ALIGN_RIGHT)
fl_set_button(cell_options_->radio_align_right, 1);
fl_set_button(cell_options_->radio_valign_top, 0);
fl_set_button(cell_options_->radio_valign_bottom, 0);
fl_set_button(cell_options_->radio_valign_center, 0);
- if (pwidth.empty() || (align == LyXTabular::LYX_VALIGN_CENTER))
+ if (pwidth.zero() || (align == LyXTabular::LYX_VALIGN_CENTER))
fl_set_button(cell_options_->radio_valign_center, 1);
else if (align == LyXTabular::LYX_VALIGN_BOTTOM)
fl_set_button(cell_options_->radio_valign_bottom, 1);
setEnabled(cell_options_->radio_valign_top, true);
setEnabled(cell_options_->radio_valign_bottom, true);
setEnabled(cell_options_->radio_valign_center, true);
- special = tabular->GetAlignSpecial(cell,LyXTabular::SET_SPECIAL_MULTI);
+ special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_MULTI);
fl_set_input(cell_options_->input_special_multialign, special.c_str());
string const default_unit = "cm";
- updateWidgetsFromLengthString(cell_options_->input_mcolumn_width,
- cell_options_->choice_value_mcolumn_width,
- pwidth.c_str(), default_unit);
+ updateWidgetsFromLength(cell_options_->input_mcolumn_width,
+ cell_options_->choice_value_mcolumn_width,
+ pwidth, default_unit);
if (!lv_->buffer()->isReadonly()) {
setEnabled(cell_options_->input_special_multialign, true);
setEnabled(cell_options_->choice_value_mcolumn_width, true);
}
- setEnabled(cell_options_->radio_valign_top, !pwidth.empty());
- setEnabled(cell_options_->radio_valign_bottom, !pwidth.empty());
- setEnabled(cell_options_->radio_valign_center, !pwidth.empty());
+ setEnabled(cell_options_->radio_valign_top, !pwidth.zero());
+ setEnabled(cell_options_->radio_valign_bottom, !pwidth.zero());
+ setEnabled(cell_options_->radio_valign_center, !pwidth.zero());
- setEnabled(cell_options_->radio_align_left, pwidth.empty());
- setEnabled(cell_options_->radio_align_right, pwidth.empty());
- setEnabled(cell_options_->radio_align_center, pwidth.empty());
+ setEnabled(cell_options_->radio_align_left, pwidth.zero());
+ setEnabled(cell_options_->radio_align_right, pwidth.zero());
+ setEnabled(cell_options_->radio_align_center, pwidth.zero());
} else {
fl_set_button(cell_options_->radio_multicolumn, 0);
fl_set_button(column_options_->radio_border_right, 1);
else
fl_set_button(column_options_->radio_border_right, 0);
- special = tabular->GetAlignSpecial(cell,LyXTabular::SET_SPECIAL_COLUMN);
+ special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_COLUMN);
fl_set_input(column_options_->input_special_alignment, special.c_str());
bool const isReadonly = lv_->buffer()->isReadonly();
pwidth = tabular->GetColumnPWidth(cell);
string const default_unit = "cm";
- updateWidgetsFromLengthString(column_options_->input_column_width,
- column_options_->choice_value_column_width,
- pwidth.c_str(), default_unit);
+ updateWidgetsFromLength(column_options_->input_column_width,
+ column_options_->choice_value_column_width,
+ pwidth, default_unit);
setEnabled(column_options_->input_column_width, !isReadonly);
setEnabled(column_options_->choice_value_column_width, !isReadonly);
- setEnabled(cell_options_->radio_useminipage, !pwidth.empty());
- if (!pwidth.empty()) {
+ setEnabled(cell_options_->radio_useminipage, !pwidth.zero());
+ if (!pwidth.zero()) {
if (tabular->GetUsebox(cell) == 2)
fl_set_button(cell_options_->radio_useminipage, 1);
else
fl_set_button(cell_options_->radio_useminipage, 0);
} else {
- fl_set_button(cell_options_->radio_useminipage,0);
+ fl_set_button(cell_options_->radio_useminipage, 0);
}
align = tabular->GetAlignment(cell, true);
fl_set_button(column_options_->radio_align_left, 0);
fl_set_button(column_options_->radio_align_right, 0);
fl_set_button(column_options_->radio_align_center, 0);
- if (!pwidth.empty() || (align == LYX_ALIGN_LEFT))
+ if (!pwidth.zero() || (align == LYX_ALIGN_LEFT))
fl_set_button(column_options_->radio_align_left, 1);
else if (align == LYX_ALIGN_RIGHT)
fl_set_button(column_options_->radio_align_right, 1);
fl_set_button(column_options_->radio_valign_top, 0);
fl_set_button(column_options_->radio_valign_bottom, 0);
fl_set_button(column_options_->radio_valign_center, 0);
- if (pwidth.empty() || (align == LyXTabular::LYX_VALIGN_CENTER))
+ if (pwidth.zero() || (align == LyXTabular::LYX_VALIGN_CENTER))
fl_set_button(column_options_->radio_valign_center, 1);
else if (align == LyXTabular::LYX_VALIGN_BOTTOM)
fl_set_button(column_options_->radio_valign_bottom, 1);
else
fl_set_button(column_options_->radio_valign_top, 1);
- setEnabled(column_options_->radio_align_left, pwidth.empty());
- setEnabled(column_options_->radio_align_right, pwidth.empty());
- setEnabled(column_options_->radio_align_center, pwidth.empty());
+ setEnabled(column_options_->radio_align_left, pwidth.zero());
+ setEnabled(column_options_->radio_align_right, pwidth.zero());
+ setEnabled(column_options_->radio_align_center, pwidth.zero());
- setEnabled(column_options_->radio_valign_top, !pwidth.empty());
- setEnabled(column_options_->radio_valign_bottom, !pwidth.empty());
- setEnabled(column_options_->radio_valign_center, !pwidth.empty());
+ setEnabled(column_options_->radio_valign_top, !pwidth.zero());
+ setEnabled(column_options_->radio_valign_bottom, !pwidth.zero());
+ setEnabled(column_options_->radio_valign_center, !pwidth.zero());
fl_set_button(tabular_options_->radio_longtable,
tabular->IsLongTabular());
if (enable) {
LyXTabular::ltType dummyltt;
fl_set_button(longtable_options_->radio_lt_firsthead,
- tabular->GetRowOfLTFirstHead(row-1, dummyltt));
+ tabular->GetRowOfLTFirstHead(row - 1, dummyltt));
fl_set_button(longtable_options_->radio_lt_head,
- tabular->GetRowOfLTHead(row-1, dummyltt));
+ tabular->GetRowOfLTHead(row - 1, dummyltt));
fl_set_button(longtable_options_->radio_lt_foot,
- tabular->GetRowOfLTFoot(row-1, dummyltt));
+ tabular->GetRowOfLTFoot(row - 1, dummyltt));
fl_set_button(longtable_options_->radio_lt_lastfoot,
- tabular->GetRowOfLTLastFoot(row-1, dummyltt));
+ tabular->GetRowOfLTLastFoot(row - 1, dummyltt));
fl_set_button(longtable_options_->radio_lt_newpage,
tabular->GetLTNewPage(cell));
} else {
- fl_set_button(longtable_options_->radio_lt_firsthead,0);
- fl_set_button(longtable_options_->radio_lt_head,0);
- fl_set_button(longtable_options_->radio_lt_foot,0);
- fl_set_button(longtable_options_->radio_lt_lastfoot,0);
- fl_set_button(longtable_options_->radio_lt_newpage,0);
+ fl_set_button(longtable_options_->radio_lt_firsthead, 0);
+ fl_set_button(longtable_options_->radio_lt_head, 0);
+ fl_set_button(longtable_options_->radio_lt_foot, 0);
+ fl_set_button(longtable_options_->radio_lt_lastfoot, 0);
+ fl_set_button(longtable_options_->radio_lt_newpage, 0);
}
fl_set_button(tabular_options_->radio_rotate_tabular,
tabular->GetRotateTabular());
string const str =
getLengthFromWidgets(column_options_->input_column_width,
column_options_->choice_value_column_width);
- inset_->tabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH,str);
+ inset_->tabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH, str);
update(); // update for alignment
return true;
}
string const str =
getLengthFromWidgets(cell_options_->input_mcolumn_width,
cell_options_->choice_value_mcolumn_width);
- inset_->tabularFeatures(lv_->view(), LyXTabular::SET_MPWIDTH,str);
+ inset_->tabularFeatures(lv_->view(), LyXTabular::SET_MPWIDTH, str);
update(); // update for alignment
return true;
}
tabular->GetLTNewPage(cell));
} else {
num = LyXTabular::UNSET_LONGTABULAR;
- fl_set_button(longtable_options_->radio_lt_firsthead,0);
- fl_set_button(longtable_options_->radio_lt_head,0);
- fl_set_button(longtable_options_->radio_lt_foot,0);
- fl_set_button(longtable_options_->radio_lt_lastfoot,0);
- fl_set_button(longtable_options_->radio_lt_newpage,0);
+ fl_set_button(longtable_options_->radio_lt_firsthead, 0);
+ fl_set_button(longtable_options_->radio_lt_head, 0);
+ fl_set_button(longtable_options_->radio_lt_foot, 0);
+ fl_set_button(longtable_options_->radio_lt_lastfoot, 0);
+ fl_set_button(longtable_options_->radio_lt_newpage, 0);
}
} else if (ob == tabular_options_->radio_rotate_tabular) {
s = fl_get_button(tabular_options_->radio_rotate_tabular);
}
+#if 1
+// this should definitely be the other way around!!!
+void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice,
+ LyXLength const & len,
+ string const & default_unit)
+{
+ if (len.zero())
+ updateWidgetsFromLengthString(input, choice,
+ string(), default_unit);
+ else
+ updateWidgetsFromLengthString(input, choice,
+ len.asString(), default_unit);
+
+}
+
+
+// Most of the code here is a poor duplication of the parser code
+// which is in LyXLength. Use that instead
void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
string const & str,
string const & default_unit)
fl_set_input(input, len.c_str());
fl_set_choice(choice, unitpos);
}
-
+#else
+void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
+ string const & str,
+ string const & default_unit)
+{
+ updateWidgetsFromLength(input, choice,
+ LyXLength(str), default_unit);
+}
+
+
+void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice,
+ LyXLength const & len,
+ string const & default_unit)
+{
+ // Paranoia check
+ lyx::Assert(input && input->objclass == FL_INPUT &&
+ choice && choice->objclass == FL_CHOICE);
+
+ if (len.zero()) {
+ fl_set_input(input, "");
+ fl_set_choice_text(choice, default_unit.c_str());
+ } else {
+ ostringstream buffer;
+ buffer << len.value();
+ fl_set_input(input, buffer.str().c_str());
+ fl_set_choice_text(choice, stringFromUnit(len.unit()));
+ }
+}
+#endif
+
+
// Take a string and add breaks so that it fits into a desired label width, w
string formatted(string const & sin, int w, int size, int style)
{
#include "Color.h"
#include "support/lstrings.h"
+#include "lyxlength.h"
#include <vector>
string const & str,
string const & default_unit);
+/** Given a LyXLength, set the input and choice widgets.
+ If the length is null, the choice will be set to default_unit.
+ */
+void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice,
+ LyXLength const & len,
+ string const & default_unit);
+
/// struct holding xform-specific colors
struct XformsColor : public NamedColor {
int colorID;
2001-12-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
- * insettext.C (draw): re-introduce the calls to width() ascent()
+ * insettabular.C (everywhere): adapt because widths are now real
+ widths and not strings
+
+ * insettext.C (draw): re-introduce the calls to width(), ascent()
and descent() to initialize the caching variables.
2001-12-09 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
continue;
++cell;
inset = tabular->GetCellInset(cell);
- if (!reinit && !tabular->GetPWidth(cell).empty())
+ if (!reinit && !tabular->GetPWidth(cell).zero())
inset->update(bv, font, false);
maxAsc = max(maxAsc, inset->ascent(bv, font));
maxDesc = max(maxDesc, inset->descent(bv, font));
switch (feature) {
case LyXTabular::M_ALIGN_LEFT:
case LyXTabular::ALIGN_LEFT:
- setAlign=LYX_ALIGN_LEFT;
+ setAlign = LYX_ALIGN_LEFT;
break;
case LyXTabular::M_ALIGN_RIGHT:
case LyXTabular::ALIGN_RIGHT:
- setAlign=LYX_ALIGN_RIGHT;
+ setAlign = LYX_ALIGN_RIGHT;
break;
case LyXTabular::M_ALIGN_CENTER:
case LyXTabular::ALIGN_CENTER:
- setAlign=LYX_ALIGN_CENTER;
+ setAlign = LYX_ALIGN_CENTER;
break;
case LyXTabular::M_VALIGN_TOP:
case LyXTabular::VALIGN_TOP:
- setVAlign=LyXTabular::LYX_VALIGN_TOP;
+ setVAlign = LyXTabular::LYX_VALIGN_TOP;
break;
case LyXTabular::M_VALIGN_BOTTOM:
case LyXTabular::VALIGN_BOTTOM:
- setVAlign=LyXTabular::LYX_VALIGN_BOTTOM;
+ setVAlign = LyXTabular::LYX_VALIGN_BOTTOM;
break;
case LyXTabular::M_VALIGN_CENTER:
case LyXTabular::VALIGN_CENTER:
- setVAlign=LyXTabular::LYX_VALIGN_CENTER;
+ setVAlign = LyXTabular::LYX_VALIGN_CENTER;
break;
default:
break;
switch (feature) {
case LyXTabular::SET_PWIDTH:
{
- bool const update = (tabular->GetColumnPWidth(actcell) != value);
- tabular->SetColumnPWidth(actcell,value);
+ LyXLength const vallen = LyXLength(value);
+ bool const update = (tabular->GetColumnPWidth(actcell) != vallen);
+ tabular->SetColumnPWidth(actcell,vallen);
if (update) {
for (int i = 0; i < tabular->rows(); ++i) {
tabular->GetCellInset(tabular->GetCellNumber(i, column))->
break;
case LyXTabular::SET_MPWIDTH:
{
- bool const update = (tabular->GetPWidth(actcell) != value);
- tabular->SetMColumnPWidth(actcell,value);
+ LyXLength const vallen = LyXLength(value);
+ bool const update = (tabular->GetPWidth(actcell) != vallen);
+ tabular->SetMColumnPWidth(actcell,vallen);
if (update) {
for (int i = 0; i < tabular->rows(); ++i) {
tabular->GetCellInset(tabular->GetCellNumber(i, column))->
// in pixels if we have a pwidth for this cell.
int InsetTabular::getMaxWidthOfCell(BufferView * bv, int cell) const
{
- string const s = tabular->GetPWidth(cell);
+ LyXLength const len = tabular->GetPWidth(cell);
- if (s.empty())
+ if (len.zero())
return -1;
- return VSpace(s).inPixels(bv);
+#ifdef WITH_WARNINGS
+#warning Remove use of VSpace as soon as LyXLength::inPixels exists (JMarc)
+#endif
+ return VSpace(len).inPixels(bv);
}
}
+bool getTokenValue(string const & str, const char * token, LyXLength & len)
+{
+ string tmp;
+ if (!getTokenValue(str, token, tmp))
+ return false;
+ return isValidLength(tmp, &len);
+}
+
+
inline
void l_getline(istream & is, string & str)
{
cell_info[row][column+cn-1].right_line;
}
cell_info[row][column].inset.setAutoBreakRows(
- !GetPWidth(GetCellNumber(row, column)).empty());
+ !GetPWidth(GetCellNumber(row, column)).zero());
}
}
}
}
-bool LyXTabular::SetColumnPWidth(int cell, string const & width)
+bool LyXTabular::SetColumnPWidth(int cell, LyXLength const & width)
{
- bool flag = !width.empty();
+ bool flag = !width.zero();
int const j = column_of_cell(cell);
column_info[j].p_width = width;
SetAlignment(cell, LYX_ALIGN_LEFT);
for (int i = 0; i < rows_; ++i) {
int c = GetCellNumber(i, j);
- flag = !GetPWidth(c).empty(); // because of multicolumns!
+ flag = !GetPWidth(c).zero(); // because of multicolumns!
GetCellInset(c)->setAutoBreakRows(flag);
}
return true;
}
-bool LyXTabular::SetMColumnPWidth(int cell, string const & width)
+bool LyXTabular::SetMColumnPWidth(int cell, LyXLength const & width)
{
- bool const flag = !width.empty();
+ bool const flag = !width.zero();
cellinfo_of_cell(cell)->p_width = width;
if (IsMultiColumn(cell)) {
}
-string const LyXTabular::GetPWidth(int cell) const
+LyXLength const LyXTabular::GetPWidth(int cell) const
{
if (IsMultiColumn(cell))
return cellinfo_of_cell(cell)->p_width;
}
-string const LyXTabular::GetColumnPWidth(int cell) const
+LyXLength const LyXTabular::GetColumnPWidth(int cell) const
{
return column_info[column_of_cell(cell)].p_width;
}
-string const LyXTabular::GetMColumnPWidth(int cell) const
+LyXLength const LyXTabular::GetMColumnPWidth(int cell) const
{
if (IsMultiColumn(cell))
return cellinfo_of_cell(cell)->p_width;
- return string();
+ return LyXLength();
}
return write_attribute(name, int(b));
}
+template <>
+string const write_attribute(string const & name, LyXLength const & value)
+{
+ return write_attribute(name, value.asString());
+}
#else
string const write_attribute(string const & name, int value)
string str = " " + name + "=\"" + tostr(static_cast<int>(value)) + "\"";
return str;
}
+
+
+string const write_attribute(string const & name, LyXLength const & value)
+{
+ string str = " " + name + "=\"" + value.asString() + "\"";
+ return str;
+}
#endif
<< write_attribute("valignment", tostr(column_info[j].valignment))
<< write_attribute("leftline", tostr(column_info[j].left_line))
<< write_attribute("rightline", tostr(column_info[j].right_line))
- << write_attribute("width",
- VSpace(column_info[j].p_width)
- .asLyXCommand())
+ << write_attribute("width", column_info[j].p_width.asString())
<< write_attribute("special", column_info[j].align_special)
<< ">\n";
}
}
+bool getTokenValue(string const & str, const char * token, LyXLength & len)
+{
+ string tmp;
+ if (!getTokenValue(str, token, tmp))
+ return false;
+ return isValidLength(tmp, &len);
+}
+
+
inline
void l_getline(istream & is, string & str)
{
column_info[i].alignment = static_cast<LyXAlignment>(a);
column_info[i].left_line = b;
column_info[i].right_line = c;
- column_info[i].p_width = s1;
+ column_info[i].p_width = LyXLength(s1);
column_info[i].align_special = s2;
}
for (i = 0; i < rows_; ++i) {
cell_info[i][j].rotate = static_cast<bool>(f);
cell_info[i][j].usebox = static_cast<BoxType>(g);
cell_info[i][j].align_special = s1;
- cell_info[i][j].p_width = s2;
+ cell_info[i][j].p_width = LyXLength(s2);
}
}
}
LyXTabular::BoxType LyXTabular::GetUsebox(int cell) const
{
- if (column_info[column_of_cell(cell)].p_width.empty() &&
- !(IsMultiColumn(cell) && !cellinfo_of_cell(cell)->p_width.empty()))
+ if (column_info[column_of_cell(cell)].p_width.zero() &&
+ !(IsMultiColumn(cell) && !cellinfo_of_cell(cell)->p_width.zero()))
return BOX_NONE;
if (cellinfo_of_cell(cell)->usebox > 1)
return cellinfo_of_cell(cell)->usebox;
{
os << '|';
}
- if (!GetPWidth(cell).empty()) {
+ if (!GetPWidth(cell).zero()) {
switch (GetVAlignment(cell)) {
case LYX_VALIGN_TOP:
os << "p";
os << "b";
break;
}
- os << "{" << GetPWidth(cell) << '}';
+ os << "{" << GetPWidth(cell).asLatexString() << '}';
} else {
switch (GetAlignment(cell)) {
case LYX_ALIGN_LEFT:
os << "b";
break;
}
- os << "]{" << GetPWidth(cell) << "}{";
+ os << "]{" << GetPWidth(cell).asLatexString() << "}{";
} else if (GetUsebox(cell) == BOX_MINIPAGE) {
os << "\\begin{minipage}[";
switch (GetVAlignment(cell)) {
os << "b";
break;
}
- os << "]{" << GetPWidth(cell) << "}\n";
+ os << "]{" << GetPWidth(cell).asLatexString() << "}\n";
++ret;
}
return ret;
} else {
if (column_info[i].left_line)
os << '|';
- if (!column_info[i].p_width.empty()) {
+ if (!column_info[i].p_width.zero()) {
switch (column_info[i].valignment) {
case LYX_VALIGN_TOP:
os << "p";
break;
}
os << "{"
- << column_info[i].p_width
+ << column_info[i].p_width.asLatexString()
<< '}';
} else {
switch (column_info[i].alignment) {
InsetText * inset = GetCellInset(cell);
bool rtl = inset->paragraph()->isRightToLeftPar(buf->params) &&
- inset->paragraph()->size() > 0 && GetPWidth(cell).empty();
+ inset->paragraph()->size() > 0 && GetPWidth(cell).zero();
if (rtl)
os << "\\R{";
#include "layout.h"
#include "LString.h"
#include "insets/insettext.h"
+#include "lyxlength.h"
class InsetTabular;
class LaTeXFeatures;
bool SetVAlignment(int cell, VAlignment align,
bool onlycolumn = false);
///
- bool SetColumnPWidth(int cell, string const & width);
+ bool SetColumnPWidth(int cell, LyXLength const & width);
///
- bool SetMColumnPWidth(int cell, string const & width);
+ bool SetMColumnPWidth(int cell, LyXLength const & width);
///
bool SetAlignSpecial(int cell, string const & special, Feature what);
///
///
VAlignment GetVAlignment(int cell, bool onlycolumn = false) const;
///
- string const GetPWidth(int cell) const;
+ LyXLength const GetPWidth(int cell) const;
///
- string const GetColumnPWidth(int cell) const;
+ LyXLength const GetColumnPWidth(int cell) const;
///
- string const GetMColumnPWidth(int cell) const;
+ LyXLength const GetMColumnPWidth(int cell) const;
///
string const GetAlignSpecial(int cell, int what) const;
///
///
string align_special;
///
- string p_width; // this is only set for multicolumn!!!
+ LyXLength p_width; // this is only set for multicolumn!!!
///
InsetText inset;
};
///
int width_of_column;
///
- string p_width;
+ LyXLength p_width;
///
string align_special;
};