support for multirows in tables:

- fileformat change (lyx2lyx code follows the next days)
- the patch is a joint work of Edwin and me

The patch is huge but the major parts work already. I put it in now as the minor known issues can be solved step by step the next days. I think this is the best solution because collaborating with such large patches already lead to copy/paste bugs.

The known issues are listed here:
http://wiki.lyx.org/Devel/Multirow

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33414 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2010-02-11 01:07:54 +00:00
parent 4c9f0eb5e6
commit 8bb69f24b6
15 changed files with 535 additions and 272 deletions

View File

@ -1,6 +1,10 @@
LyX file-format changes LyX file-format changes
----------------------- -----------------------
2010-02-11 Uwe Stöhr <uwestoehr@web.de> and Edwin Leuven <e.leuven@uva.nl>
* Format incremented to 377: support for multirow cells in
tables
2010-01-10 Jürgen Spitzmüller <spitz@lyx.org> 2010-01-10 Jürgen Spitzmüller <spitz@lyx.org>
* Format incremented to 376: new buffer param * Format incremented to 376: new buffer param
\maintain_unincluded_children. If true, the aux files of \maintain_unincluded_children. If true, the aux files of

View File

@ -1517,6 +1517,7 @@ lib_images_files = Split('''
tabular-feature_delete-column.png tabular-feature_delete-column.png
tabular-feature_delete-row.png tabular-feature_delete-row.png
tabular-feature_multicolumn.png tabular-feature_multicolumn.png
tabular-feature_multirow.png
tabular-feature_set-all-lines.png tabular-feature_set-all-lines.png
tabular-feature_set-border-lines.png tabular-feature_set-border-lines.png
tabular-feature_set-longtabular.png tabular-feature_set-longtabular.png

View File

@ -415,6 +415,7 @@ dist_images_DATA = \
images/tabular-feature_delete-column.png \ images/tabular-feature_delete-column.png \
images/tabular-feature_delete-row.png \ images/tabular-feature_delete-row.png \
images/tabular-feature_multicolumn.png \ images/tabular-feature_multicolumn.png \
images/tabular-feature_multirow.png \
images/tabular-feature_set-all-lines.png \ images/tabular-feature_set-all-lines.png \
images/tabular-feature_set-longtabular.png \ images/tabular-feature_set-longtabular.png \
images/tabular-feature_set-rotate-cell.png \ images/tabular-feature_set-rotate-cell.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

View File

@ -1197,10 +1197,12 @@ convert = [[346, []],
[373, [merge_gbrief]], [373, [merge_gbrief]],
[374, []], [374, []],
[375, []], [375, []],
[376, []] [376, []],
[377, []]
] ]
revert = [[375, [revert_includeall]], revert = [[376, []],
[375, [revert_includeall]],
[374, [revert_includeonly]], [374, [revert_includeonly]],
[373, [revert_html_options]], [373, [revert_html_options]],
[372, [revert_gbrief]], [372, [revert_gbrief]],

View File

@ -161,6 +161,7 @@ ToolbarSet
Item "Rotate cell" "tabular-feature toggle-rotate-cell" Item "Rotate cell" "tabular-feature toggle-rotate-cell"
Item "Rotate table" "tabular-feature toggle-rotate-tabular" Item "Rotate table" "tabular-feature toggle-rotate-tabular"
Item "Set multi-column" "tabular-feature multicolumn" Item "Set multi-column" "tabular-feature multicolumn"
Item "Set multi-row" "tabular-feature multirow"
End End
Toolbar "math" "Math" Toolbar "math" "Math"

View File

@ -126,7 +126,7 @@ namespace {
// Do not remove the comment below, so we get merge conflict in // Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own. // independent branches. Instead add your own.
int const LYX_FORMAT = 376; // jspitzm: support for unincluded file maintenance int const LYX_FORMAT = 377; // uwestoehr: support for multirows
typedef map<string, bool> DepClean; typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache; typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;

View File

@ -546,7 +546,8 @@ char const * simplefeatures[] = {
"bm", "bm",
"pdfpages", "pdfpages",
"amscd", "amscd",
"slashed" "slashed",
"multirow"
}; };
int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);

View File

@ -2069,9 +2069,10 @@ void LyXAction::init()
set-rotate-cell|unset-rotate-cell|toggle-rotate-cell|set-usebox|set-lthead| set-rotate-cell|unset-rotate-cell|toggle-rotate-cell|set-usebox|set-lthead|
unset-lthead|set-ltfirsthead|unset-ltfirsthead|set-ltfoot|unset-ltfoot| unset-lthead|set-ltfirsthead|unset-ltfirsthead|set-ltfoot|unset-ltfoot|
set-ltlastfoot|unset-ltlastfoot|set-ltnewpage|toggle-ltcaption| set-ltlastfoot|unset-ltlastfoot|set-ltnewpage|toggle-ltcaption|
set-special-column|set-special-multi|set-booktabs|unset-booktabs| set-special-column|set-special-multicolumn|set-special-multirow|
set-top-space|set-bottom-space|set-interline-space|set-border-lines| set-booktabs|unset-booktabs|set-top-space|set-bottom-space|
tabular-valign-top|tabular-valign-middle|tabular-valign-bottom \n set-interline-space|set-border-lines|tabular-valign-top|
tabular-valign-middle|tabular-valign-bottom \n
<ARG>: additional argument for some commands, use debug mode to explore its values. <ARG>: additional argument for some commands, use debug mode to explore its values.
* \li Origin: Jug, 28 Jul 2000 * \li Origin: Jug, 28 Jul 2000
* \endvar * \endvar

View File

@ -2805,7 +2805,8 @@ void PrefShortcuts::shortcutOkPressed()
// make sure this key isn't already bound---and, if so, not unbound // make sure this key isn't already bound---and, if so, not unbound
FuncCode const unbind = user_unbind_.getBinding(k).action; FuncCode const unbind = user_unbind_.getBinding(k).action;
if (oldBinding.action != LFUN_UNKNOWN_ACTION && unbind == LFUN_UNKNOWN_ACTION) if (oldBinding.action != LFUN_UNKNOWN_ACTION && unbind == LFUN_UNKNOWN_ACTION
&& toqstr(makeCmdString(oldBinding)) != save_lfun_)
{ {
// FIXME Perhaps we should offer to over-write the old shortcut? // FIXME Perhaps we should offer to over-write the old shortcut?
// If so, we'll need to remove it from our list, etc. // If so, we'll need to remove it from our list, etc.
@ -2817,7 +2818,7 @@ void PrefShortcuts::shortcutOkPressed()
return; return;
} }
if (!save_lfun_.isEmpty() && new_lfun == save_lfun_) if (!save_lfun_.isEmpty())
// real modification of the lfun's shortcut, // real modification of the lfun's shortcut,
// so remove the previous one // so remove the previous one
removeShortcut(); removeShortcut();

View File

@ -96,6 +96,8 @@ GuiTabular::GuiTabular(GuiView & lv)
this, SLOT(vAlign_changed(int))); this, SLOT(vAlign_changed(int)));
connect(multicolumnCB, SIGNAL(clicked()), connect(multicolumnCB, SIGNAL(clicked()),
this, SLOT(multicolumn_clicked())); this, SLOT(multicolumn_clicked()));
connect(multirowCB, SIGNAL(clicked()),
this, SLOT(multirow_clicked()));
connect(newpageCB, SIGNAL(clicked()), connect(newpageCB, SIGNAL(clicked()),
this, SLOT(ltNewpage_clicked())); this, SLOT(ltNewpage_clicked()));
connect(headerStatusCB, SIGNAL(clicked()), connect(headerStatusCB, SIGNAL(clicked()),
@ -172,6 +174,7 @@ GuiTabular::GuiTabular(GuiView & lv)
bc().addReadOnly(booktabsRB); bc().addReadOnly(booktabsRB);
bc().addReadOnly(multicolumnCB); bc().addReadOnly(multicolumnCB);
bc().addReadOnly(multirowCB);
bc().addReadOnly(rotateCellCB); bc().addReadOnly(rotateCellCB);
bc().addReadOnly(rotateTabularCB); bc().addReadOnly(rotateTabularCB);
bc().addReadOnly(specialAlignmentED); bc().addReadOnly(specialAlignmentED);
@ -396,6 +399,12 @@ void GuiTabular::multicolumn_clicked()
changed(); changed();
} }
void GuiTabular::multirow_clicked()
{
toggleMultiRow();
changed();
}
void GuiTabular::rotateTabular() void GuiTabular::rotateTabular()
{ {
@ -654,7 +663,7 @@ Length getColumnPWidth(Tabular const & t, size_t cell)
Length getMColumnPWidth(Tabular const & t, size_t cell) Length getMColumnPWidth(Tabular const & t, size_t cell)
{ {
if (t.isMultiColumn(cell)) if (t.isMultiColumn(cell) || t.isMultiRow(cell))
return t.cellInfo(cell).p_width; return t.cellInfo(cell).p_width;
return Length(); return Length();
} }
@ -662,7 +671,8 @@ Length getMColumnPWidth(Tabular const & t, size_t cell)
docstring getAlignSpecial(Tabular const & t, size_t cell, int what) docstring getAlignSpecial(Tabular const & t, size_t cell, int what)
{ {
if (what == Tabular::SET_SPECIAL_MULTI) if (what == Tabular::SET_SPECIAL_MULTICOLUMN
|| what == Tabular::SET_SPECIAL_MULTIROW)
return t.cellInfo(cell).align_special; return t.cellInfo(cell).align_special;
return t.column_info[t.cellColumn(cell)].align_special; return t.column_info[t.cellColumn(cell)].align_special;
} }
@ -670,7 +680,6 @@ docstring getAlignSpecial(Tabular const & t, size_t cell, int what)
} }
void GuiTabular::updateContents() void GuiTabular::updateContents()
{ {
initialiseParams(string()); initialiseParams(string());
@ -684,9 +693,11 @@ void GuiTabular::updateContents()
tabularColumnED->setText(QString::number(col + 1)); tabularColumnED->setText(QString::number(col + 1));
bool const multicol(tabular_.isMultiColumn(cell)); bool const multicol(tabular_.isMultiColumn(cell));
multicolumnCB->setChecked(multicol); multicolumnCB->setChecked(multicol);
bool const multirow(tabular_.isMultiRow(cell));
multirowCB->setChecked(multirow);
rotateCellCB->setChecked(tabular_.getRotateCell(cell)); rotateCellCB->setChecked(tabular_.getRotateCell(cell));
rotateTabularCB->setChecked(tabular_.rotate); rotateTabularCB->setChecked(tabular_.rotate);
@ -699,7 +710,11 @@ void GuiTabular::updateContents()
if (multicol) { if (multicol) {
special = getAlignSpecial(tabular_, cell, special = getAlignSpecial(tabular_, cell,
Tabular::SET_SPECIAL_MULTI); Tabular::SET_SPECIAL_MULTICOLUMN);
pwidth = getMColumnPWidth(tabular_, cell);
} else if (multirow) {
special = getAlignSpecial(tabular_, cell,
Tabular::SET_SPECIAL_MULTIROW);
pwidth = getMColumnPWidth(tabular_, cell); pwidth = getMColumnPWidth(tabular_, cell);
} else { } else {
special = getAlignSpecial(tabular_, cell, special = getAlignSpecial(tabular_, cell,
@ -832,7 +847,8 @@ void GuiTabular::updateContents()
vAlignCB->setCurrentIndex(valign); vAlignCB->setCurrentIndex(valign);
hAlignCB->setEnabled(true); hAlignCB->setEnabled(true);
vAlignCB->setEnabled(!pwidth.zero()); if (!multirow && !pwidth.zero())
vAlignCB->setEnabled(true);
int tableValign = 1; int tableValign = 1;
switch (tabular_.tabular_valignment) { switch (tabular_.tabular_valignment) {
@ -927,6 +943,7 @@ void GuiTabular::updateContents()
// When a row is set as longtable caption, it must not be allowed // When a row is set as longtable caption, it must not be allowed
// to unset that this row is a multicolumn. // to unset that this row is a multicolumn.
multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN)); multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN));
multirowCB->setEnabled(funcEnabled(Tabular::MULTIROW));
Tabular::ltType ltt; Tabular::ltType ltt;
bool use_empty; bool use_empty;
@ -1021,15 +1038,16 @@ void GuiTabular::closeGUI()
// apply the fixed width values // apply the fixed width values
size_t const cell = getActiveCell(); size_t const cell = getActiveCell();
bool const multicol = tabular_.isMultiColumn(cell); bool const multicol = tabular_.isMultiColumn(cell);
bool const multirow = tabular_.isMultiRow(cell);
string width = widgetsToLength(widthED, widthUnitCB); string width = widgetsToLength(widthED, widthUnitCB);
string width2; string width2;
Length llen = getColumnPWidth(tabular_, cell); Length llen = getColumnPWidth(tabular_, cell);
Length llenMulti = getMColumnPWidth(tabular_, cell); Length llenMulti = getMColumnPWidth(tabular_, cell);
if (multicol && !llenMulti.zero()) if (multicol && multirow && !llenMulti.zero())
width2 = llenMulti.asString(); width2 = llenMulti.asString();
else if (!multicol && !llen.zero()) else if (!multicol && !multirow && !llen.zero())
width2 = llen.asString(); width2 = llen.asString();
// apply the special alignment // apply the special alignment
@ -1038,14 +1056,19 @@ void GuiTabular::closeGUI()
if (multicol) if (multicol)
sa2 = getAlignSpecial(tabular_, cell, sa2 = getAlignSpecial(tabular_, cell,
Tabular::SET_SPECIAL_MULTI); Tabular::SET_SPECIAL_MULTICOLUMN);
else if (multirow)
sa2 = getAlignSpecial(tabular_, cell,
Tabular::SET_SPECIAL_MULTIROW);
else else
sa2 = getAlignSpecial(tabular_, cell, sa2 = getAlignSpecial(tabular_, cell,
Tabular::SET_SPECIAL_COLUMN); Tabular::SET_SPECIAL_COLUMN);
if (sa1 != sa2) { if (sa1 != sa2) {
if (multicol) if (multicol)
set(Tabular::SET_SPECIAL_MULTI, to_utf8(sa1)); set(Tabular::SET_SPECIAL_MULTICOLUMN, to_utf8(sa1));
if (multirow)
set(Tabular::SET_SPECIAL_MULTIROW, to_utf8(sa1));
else else
set(Tabular::SET_SPECIAL_COLUMN, to_utf8(sa1)); set(Tabular::SET_SPECIAL_COLUMN, to_utf8(sa1));
} }
@ -1162,7 +1185,9 @@ void GuiTabular::set(Tabular::Feature f, string const & arg)
void GuiTabular::setSpecial(string const & special) void GuiTabular::setSpecial(string const & special)
{ {
if (tabular_.isMultiColumn(getActiveCell())) if (tabular_.isMultiColumn(getActiveCell()))
set(Tabular::SET_SPECIAL_MULTI, special); set(Tabular::SET_SPECIAL_MULTICOLUMN, special);
else if (tabular_.isMultiRow(getActiveCell()))
set(Tabular::SET_SPECIAL_MULTIROW, special);
else else
set(Tabular::SET_SPECIAL_COLUMN, special); set(Tabular::SET_SPECIAL_COLUMN, special);
} }
@ -1186,6 +1211,13 @@ void GuiTabular::toggleMultiColumn()
} }
void GuiTabular::toggleMultiRow()
{
set(Tabular::MULTIROW);
updateView();
}
void GuiTabular::rotateTabular(bool yes) void GuiTabular::rotateTabular(bool yes)
{ {
if (yes) if (yes)
@ -1255,7 +1287,8 @@ void GuiTabular::valign(GuiTabular::VALIGN v)
break; break;
} }
if (tabular_.isMultiColumn(getActiveCell())) if (tabular_.isMultiColumn(getActiveCell())
|| tabular_.isMultiRow(getActiveCell()))
set(multi_num); set(multi_num);
else else
set(num); set(num);

View File

@ -45,6 +45,7 @@ private Q_SLOTS:
void topBorder_changed(); void topBorder_changed();
void bottomBorder_changed(); void bottomBorder_changed();
void multicolumn_clicked(); void multicolumn_clicked();
void multirow_clicked();
void rotateTabular(); void rotateTabular();
void rotateCell(); void rotateCell();
void hAlign_changed(int align); void hAlign_changed(int align);
@ -101,6 +102,7 @@ private:
void setWidth(std::string const & width); void setWidth(std::string const & width);
void toggleMultiColumn(); void toggleMultiColumn();
void toggleMultiRow();
void rotateTabular(bool yes); void rotateTabular(bool yes);
void rotateCell(bool yes); void rotateCell(bool yes);

View File

@ -130,8 +130,8 @@
<attribute name="title"> <attribute name="title">
<string>&amp;Table Settings</string> <string>&amp;Table Settings</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="GroupBox12"> <widget class="QGroupBox" name="GroupBox12">
<property name="title"> <property name="title">
<string>Column settings</string> <string>Column settings</string>
@ -283,7 +283,7 @@
<item row="3" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="multicolumnCB"> <widget class="QCheckBox" name="multicolumnCB">
<property name="toolTip"> <property name="toolTip">
<string>Merge cells</string> <string>Merge cells of different columns</string>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Multicolumn</string> <string>&amp;Multicolumn</string>
@ -296,9 +296,28 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>Cell setting</string> <string>Row setting</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QCheckBox" name="multirowCB">
<property name="toolTip">
<string>Merge cells of different rows</string>
</property>
<property name="text">
<string>M&amp;ultirow</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Cell setting</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="rotateCellCB"> <widget class="QCheckBox" name="rotateCellCB">
<property name="toolTip"> <property name="toolTip">
@ -312,7 +331,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="tabAlignmentGB"> <widget class="QGroupBox" name="tabAlignmentGB">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -388,7 +407,7 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="specialAlignmentLA"> <widget class="QLabel" name="specialAlignmentLA">
@ -409,15 +428,15 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="4" column="0"> <item row="4" column="1">
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>17</width>
<height>68</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@ -1497,6 +1516,7 @@
<tabstop>vAlignCB</tabstop> <tabstop>vAlignCB</tabstop>
<tabstop>multicolumnCB</tabstop> <tabstop>multicolumnCB</tabstop>
<tabstop>rotateTabularCB</tabstop> <tabstop>rotateTabularCB</tabstop>
<tabstop>multirowCB</tabstop>
<tabstop>rotateCellCB</tabstop> <tabstop>rotateCellCB</tabstop>
<tabstop>specialAlignmentED</tabstop> <tabstop>specialAlignmentED</tabstop>
<tabstop>closePB</tabstop> <tabstop>closePB</tabstop>

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,6 @@
* Full author contact details are available in file CREDITS. * Full author contact details are available in file CREDITS.
*/ */
// This is Juergen's rewrite of the tabular (table) support. // This is Juergen's rewrite of the tabular (table) support.
// Things to think of when designing the new tabular support: // Things to think of when designing the new tabular support:
@ -24,14 +23,6 @@
// - multirow // - multirow
// - column styles // - column styles
// This is what I have written about tabular support in the LyX3-Tasks file:
//
// o rewrite of table code. Should probably be written as some
// kind of an inset. [Done]
// o enhance longtable support
// Lgb
#ifndef INSET_TABULAR_H #ifndef INSET_TABULAR_H
#define INSET_TABULAR_H #define INSET_TABULAR_H
@ -120,6 +111,8 @@ public:
/// ///
MULTICOLUMN, MULTICOLUMN,
/// ///
MULTIROW,
///
SET_ALL_LINES, SET_ALL_LINES,
/// ///
UNSET_ALL_LINES, UNSET_ALL_LINES,
@ -164,7 +157,9 @@ public:
/// ///
SET_SPECIAL_COLUMN, SET_SPECIAL_COLUMN,
/// ///
SET_SPECIAL_MULTI, SET_SPECIAL_MULTICOLUMN,
///
SET_SPECIAL_MULTIROW,
/// ///
SET_BOOKTABS, SET_BOOKTABS,
/// ///
@ -199,7 +194,11 @@ public:
/// ///
CELL_BEGIN_OF_MULTICOLUMN, CELL_BEGIN_OF_MULTICOLUMN,
/// ///
CELL_PART_OF_MULTICOLUMN CELL_PART_OF_MULTICOLUMN,
///
CELL_BEGIN_OF_MULTIROW,
///
CELL_PART_OF_MULTIROW
}; };
/// ///
@ -277,14 +276,16 @@ public:
/// return space occupied by the second horizontal line and /// return space occupied by the second horizontal line and
/// interline space above row \p row in pixels /// interline space above row \p row in pixels
int getAdditionalHeight(row_type row) const; int interRowSpace(row_type row) const;
/// ///
int getAdditionalWidth(idx_type cell) const; int interColumnSpace(idx_type cell) const;
/* returns the maximum over all rows */ /* returns the maximum over all rows */
/// ///
int columnWidth(idx_type cell) const; int columnWidth(idx_type cell) const;
/// ///
int rowHeight(idx_type cell) const;
///
int width() const; int width() const;
/// ///
int height() const; int height() const;
@ -340,7 +341,9 @@ public:
/// ///
int cellWidth(idx_type cell) const; int cellWidth(idx_type cell) const;
/// ///
int getBeginningOfTextInCell(idx_type cell) const; int textHOffset(idx_type cell) const;
///
int textVOffset(idx_type cell) const;
/// ///
void appendRow(idx_type cell); void appendRow(idx_type cell);
/// ///
@ -354,8 +357,6 @@ public:
/// ///
void copyColumn(col_type); void copyColumn(col_type);
/// ///
bool isFirstCellInRow(idx_type cell) const;
///
idx_type getFirstCellInRow(row_type row) const; idx_type getFirstCellInRow(row_type row) const;
/// ///
bool isLastCellInRow(idx_type cell) const; bool isLastCellInRow(idx_type cell) const;
@ -384,10 +385,18 @@ public:
/// ///
void setMultiColumn(idx_type cell, idx_type number); void setMultiColumn(idx_type cell, idx_type number);
/// ///
idx_type unsetMultiColumn(idx_type cell); // returns number of new cells void unsetMultiColumn(idx_type cell);
/// ///
bool isPartOfMultiColumn(row_type row, col_type column) const; bool isPartOfMultiColumn(row_type row, col_type column) const;
/// ///
bool isPartOfMultiRow(row_type row, col_type column) const;
///
bool isMultiRow(idx_type cell) const;
///
void setMultiRow(idx_type cell, idx_type number);
///
void unsetMultiRow(idx_type cell);
///
row_type cellRow(idx_type cell) const; row_type cellRow(idx_type cell) const;
/// ///
col_type cellColumn(idx_type cell) const; col_type cellColumn(idx_type cell) const;
@ -482,6 +491,8 @@ public:
/// ///
int multicolumn; int multicolumn;
/// ///
int multirow;
///
LyXAlignment alignment; LyXAlignment alignment;
/// ///
VAlignment valignment; VAlignment valignment;
@ -614,6 +625,8 @@ public:
/// ///
idx_type columnSpan(idx_type cell) const; idx_type columnSpan(idx_type cell) const;
/// ///
idx_type rowSpan(idx_type cell) const;
///
BoxType useParbox(idx_type cell) const; BoxType useParbox(idx_type cell) const;
/// ///
// helper function for Latex returns number of newlines // helper function for Latex returns number of newlines
@ -622,9 +635,9 @@ public:
/// ///
int TeXBottomHLine(odocstream &, row_type row, std::string const lang) const; int TeXBottomHLine(odocstream &, row_type row, std::string const lang) const;
/// ///
int TeXCellPreamble(odocstream &, idx_type cell, bool & ismulticol) const; int TeXCellPreamble(odocstream &, idx_type cell, bool & ismulticol, bool & ismultirow) const;
/// ///
int TeXCellPostamble(odocstream &, idx_type cell, bool ismulticol) const; int TeXCellPostamble(odocstream &, idx_type cell, bool ismulticol, bool ismultirow) const;
/// ///
int TeXLongtableHeaderFooter(odocstream &, OutputParams const &) const; int TeXLongtableHeaderFooter(odocstream &, OutputParams const &) const;
/// ///