#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
// temporary until verified (08/08/2001 Jug)
#define SPECIAL_COLUM_HANDLING 1
}
-LyXTabular::lttype::lttype()
+LyXTabular::ltType::ltType()
{
topDL = false;
bottomDL = false;
LyXTabular & LyXTabular::operator=(LyXTabular const & lt)
{
#if 0
-#warning This while method should look like this: (Lgb)
+#warning This whole method should look like this: (Lgb)
LyXTabular tmp(lt);
tmp.swap(*this);
}
-bool LyXTabular::TopAlreadyDrawed(int cell) const
+bool LyXTabular::topAlreadyDrawn(int cell) const
{
int row = row_of_cell(cell);
if ((row > 0) && !GetAdditionalHeight(row)) {
}
-bool LyXTabular::LeftAlreadyDrawed(int cell) const
+bool LyXTabular::leftAlreadyDrawn(int cell) const
{
int column = column_of_cell(cell);
if (column > 0) {
}
set_row_column_number_info(true);
- Paragraph * par = new Paragraph;
- Paragraph * return_par = 0;
-
- par->layout(bp.getLyXTextClass().defaultLayout());
-
string tmptok;
- int pos = 0;
Paragraph::depth_type depth = 0;
- LyXFont font(LyXFont::ALL_INHERIT);
- font.setLanguage(owner_->bufferOwner()->getLanguage());
+ ParagraphList parlist;
+ ParagraphList::iterator pit = parlist.begin();
+
while (lex.isOK()) {
lex.nextToken();
string const token = lex.getString();
lex.pushToken(token);
break;
}
- if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par,
- return_par,
- token, pos,
- depth, font)) {
- // the_end read
- lex.pushToken(token);
- break;
- }
- if (return_par) {
- lex.printError("New Paragraph allocated! This should not happen!");
+
+ if (token == "\\the_end") {
lex.pushToken(token);
- delete par;
- par = return_par;
break;
}
+
+ owner_->bufferOwner()->readParagraph(lex, token, parlist, pit, depth);
}
+
+ Paragraph * par = &(*parlist.begin());
+
// now we have the par we should fill the insets with this!
int cell = 0;
InsetText * inset = GetCellInset(cell);
}
-void LyXTabular::SetMultiColumn(Buffer const * buffer, int cell, int number)
+void LyXTabular::SetMultiColumn(Buffer * buffer, int cell, int number)
{
cellinfo_of_cell(cell)->multicolumn = CELL_BEGIN_OF_MULTICOLUMN;
cellinfo_of_cell(cell)->alignment = column_info[column_of_cell(cell)].alignment;
#if 1
for (int i = 1; i < number; ++i) {
cellinfo_of_cell(cell+i)->multicolumn = CELL_PART_OF_MULTICOLUMN;
- cellinfo_of_cell(cell)->inset.appendParagraphs(buffer->params,
+ cellinfo_of_cell(cell)->inset.appendParagraphs(buffer,
cellinfo_of_cell(cell+i)->inset.paragraph());
cellinfo_of_cell(cell+i)->inset.clear(false);
}
LyXTabular::BoxType LyXTabular::UseParbox(int cell) const
{
- Paragraph * par = GetCellInset(cell)->paragraph();
+ ParagraphList const & parlist = GetCellInset(cell)->paragraphs;
+ ParagraphList::iterator cit = parlist.begin();
+ ParagraphList::iterator end = parlist.end();
- for (; par; par = par->next()) {
- for (int i = 0; i < par->size(); ++i) {
- if (par->getChar(i) == Paragraph::META_NEWLINE)
+ for (; cit != end; ++cit) {
+ for (int i = 0; i < cit->size(); ++i) {
+ if (cit->isNewline(i))
return BOX_PARBOX;
}
}