insettable = 0;
#endif
footnoteflag = LyXParagraph::NO_FOOTNOTE;
-
+ footnotekind = LyXParagraph::FOOTNOTE; // should not be needed
+
align = LYX_ALIGN_BLOCK;
/* table stuff -- begin*/
os << "\n\\begin_float "
<< string_footnotekinds[footnotekind]
<< " ";
- }
- else {
+ } else {
os << "\n\\end_float ";
}
}
if (depth > dth) {
while (depth > dth) {
os << "\n\\begin_deeper ";
- dth++;
+ ++dth;
}
- }
- else {
+ } else {
while (depth < dth) {
os << "\n\\end_deeper ";
- dth--;
+ --dth;
}
}
}
}
os << '\n';
}
- }
- else {
+ } else {
// Dummy layout. This means that a footnote ended.
os << "\n\\end_float ";
footflag = LyXParagraph::NO_FOOTNOTE;
font1 = LyXFont(LyXFont::ALL_INHERIT);
column = 0;
- for (size_type i = 0; i < size(); i++) {
- if (!i){
+ for (size_type i = 0; i < size(); ++i) {
+ if (!i) {
os << "\n";
column = 0;
}
else
lyxerr << "ERROR (LyXParagraph::writeFile):"
" NULL char in structure." << endl;
- column++;
+ ++column;
break;
}
}
while (insettable) {
tmpinset = insettable;
insettable = insettable->next;
- if (tmpinset->inset)
+ if (tmpinset->inset) // DEL LINE
delete tmpinset->inset;
delete tmpinset;
if (insettable && insettable->next == insettable) {
// somehow this recursion appears occasionally
// but I can't find where. This bandaid
// helps but isn't the best fix. (ARRae)
- if (insettable->inset) {
+ if (insettable->inset) { // DEL LINE
delete insettable->inset;
}
delete insettable;
#endif
/* table stuff -- begin*/
- if (table)
+ if (table) // DEL LINE
delete table;
/* table stuff -- end*/
// ale970302
- if (bibkey)
+ if (bibkey) // DEL LINE
delete bibkey;
}
tmpi = tmpi->next;
}
if (tmpi) { // this should always be true
- if (tmpi->inset) // delete the inset if it exists
+ if (tmpi->inset) // delete the inset if it exists // DEL LINE
delete tmpi->inset;
if (tmpi == insettable)
insettable = tmpi->next;
int firstpos = lastpos;
while ((firstpos >= 0) && !IsLetter(firstpos))
- firstpos--;
+ --firstpos;
// now find the beginning by looking for a nonletter
// to the new paragraph
pos_first = 0;
while (ParFromPos(pos_first) != par)
- pos_first++;
+ ++pos_first;
pos_end = pos_first + par->text.size() - 1;
// The constructor has already reserved 500 elements
//if (pos_end > pos)
// tmp->text.reserve(pos_end - pos);
- for (i = pos; i <= pos_end; i++) {
+ for (i = pos; i <= pos_end; ++i) {
par->CutIntoMinibuffer(i - pos_first);
tmp->InsertFromMinibuffer(i - pos);
}
tmp->text.resize(tmp->text.size());
- for (i = pos_end; i >= pos; i--)
+ for (i = pos_end; i >= pos; --i)
par->Erase(i - pos_first);
par->text.resize(par->text.size());
// copy everything behind the break-position to the new paragraph
- for (size_type i = 0; i < size(); i++) {
+ for (size_type i = 0; i < size(); ++i) {
CopyIntoMinibuffer(i);
result->InsertFromMinibuffer(i);
}
size_type pos_end = the_next->text.size() - 1;
size_type pos_insert = Last();
- size_type i;
// ok, now copy the paragraph
- for (i = 0; i <= pos_end; i++) {
+ for (size_type i = 0; i <= pos_end; ++i) {
the_next->CutIntoMinibuffer(i);
InsertFromMinibuffer(pos_insert + i);
}
tmpi = tmpi->next;
if (tmpi2->inset) {
if (tmpi2->inset->AutoDelete()) {
- i++;
+ ++i;
Erase(tmpi2->pos);
}
} else {
for (InsetList::iterator it = insetlist.begin();
it != insetlist.end(); ++it) {
if ((*it).pos >= pos) {
- if (it2 != insetlist.end() || (*it).pos < (*it2).pos)
+ if (it2 == insetlist.end() || (*it).pos < (*it2).pos)
it2 = it;
}
}
&& !IsDummy()) {
if (style.isCommand()) {
file += '{';
- column++;
+ ++column;
} else if (align != LYX_ALIGN_LAYOUT) {
file += '{';
- column++;
+ ++column;
return_value = true;
}
}
for (size_type i = 0; i < size(); ++i) {
char c = GetChar(i);
- if (table->IsContRow(current_cell_number+1)) {
+ if (table->IsContRow(current_cell_number + 1)) {
if (c == LyXParagraph::META_NEWLINE)
- current_cell_number++;
+ ++current_cell_number;
continue;
}
++column;
}
basefont = getFont(-1);
running_font = basefont;
- current_cell_number++;
+ ++current_cell_number;
if (table->CellHasContRow(current_cell_number) >= 0) {
- TeXContTableRows(file, i+1,
+ TeXContTableRows(file, i + 1,
current_cell_number,
column, texrow);
}
// put the EndOfCell because it is put after the
// for(...)
if (table->ShouldBeVeryLastCell(current_cell_number)) {
- current_cell_number--;
+ --current_cell_number;
break;
}
int tmp = table->TexEndOfCell(file,
current_cell_number);
- if (tmp>0) {
+ if (tmp > 0) {
column = 0;
} else if (tmp < 0) {
tmp = -tmp;
}
- for (;tmp--;) {
+ for (; tmp--;) {
texrow.newline();
}
- texrow.start(this, i+1);
+ texrow.start(this, i + 1);
} else {
SimpleTeXSpecialChars(file, texrow,
font, running_font, basefont,
if (open_font) {
running_font.latexWriteEndChanges(file, basefont);
}
- current_cell_number++;
+ ++current_cell_number;
tmp = table->TexEndOfCell(file, current_cell_number);
for (; tmp > 0; --tmp)
texrow.newline();
for (; (i < size()) && (current_cell_number<cell); ++i) {
c = GetChar(i);
if (c == LyXParagraph::META_NEWLINE)
- current_cell_number++;
+ ++current_cell_number;
}
lastpos = i;
c = GetChar(i);
{
if (!table) return;
lyxerr[Debug::LATEX] << "SimpleDocbookOneTablePar... " << this << endl;
- int column;
+ int column = 0;
LyXFont font1, font2;
char c;
Inset * inset;
emph_flag= false;
}
font1 = font2 = getFont(-1);
- current_cell_number++;
+ ++current_cell_number;
if (table->CellHasContRow(current_cell_number) >= 0) {
DocBookContTableRows(file, extra, desc_on, i+1,
current_cell_number,
// put the EndOfCell because it is put after the
// for(...)
if (table->ShouldBeVeryLastCell(current_cell_number)) {
- current_cell_number--;
+ --current_cell_number;
break;
}
- tmp= table->DocBookEndOfCell(file, current_cell_number,
- depth);
+ tmp = table->DocBookEndOfCell(file,
+ current_cell_number,
+ depth);
if (tmp > 0)
column = 0;
// non-breaking characters
// char is ' '
if (desc_on == 1) {
- char_line_count++;
+ ++char_line_count;
file += '\n';
file += "</term><listitem><para>";
desc_on = 2;
for (; i < size() && current_cell_number < cell; ++i) {
c = GetChar(i);
if (c == LyXParagraph::META_NEWLINE)
- current_cell_number++;
+ ++current_cell_number;
}
lastpos = i;
c = GetChar(i);
// non-breaking characters
// char is ' '
if (desc_on == 1) {
- char_line_count++;
+ ++char_line_count;
file += '\n';
file += "</term><listitem><para>";
desc_on = 2;
} else {
column += file.length() - len;
}
- for (;tmp--;) {
+ for (; tmp--;) {
texrow.newline();
}
}