void LyXParagraph::validate(LaTeXFeatures & features)
{
// this will be useful later
- LyXLayout const & layout = textclasslist.Style(current_view->buffer()->params.textclass,
- GetLayout());
+ LyXLayout const & layout =
+ textclasslist.Style(current_view->buffer()->params.textclass,
+ GetLayout());
// check the params.
if (line_top || line_bottom)
}
}
+
void LyXParagraph::CutIntoMinibuffer(LyXParagraph::size_type pos)
{
minibuffer_char = GetChar(pos);
}
}
- tmpfont.realize(textclasslist.TextClass(current_view->buffer()->params.textclass).defaultfont());
+ tmpfont.realize(textclasslist
+ .TextClass(current_view->buffer()->params.textclass)
+ .defaultfont());
return tmpfont;
}
if (i == 0 && i == size() &&
!(footnoteflag == LyXParagraph::NO_FOOTNOTE
&& next && next->footnoteflag != LyXParagraph::NO_FOOTNOTE))
- i++; /* the cursor should not jump
+ ++i; /* the cursor should not jump
* to the main body if there
* is nothing in! */
return i;
texrow.start(this, 0);
for (size_type i = 0; i < size(); ++i) {
- column++;
+ ++column;
// First char in paragraph or after label?
if (i == main_body && !IsDummy()) {
if (main_body > 0) {
basefont = getFont(-1); // Now use the layout font
running_font = basefont;
file += ']';
- column++;
+ ++column;
}
if (style.isCommand()) {
file += '{';
- column++;
+ ++column;
} else if (align != LYX_ALIGN_LAYOUT) {
file += "{\\par";
column += 4;
if (open_font && c == ' ' && i <= size() - 2
&& !getFont(i+1).equalExceptLatex(running_font)
&& !getFont(i+1).equalExceptLatex(font)) {
- font = getFont(i+1);
+ font = getFont(i + 1);
}
// We end font definition before blanks
if (!font.equalExceptLatex(running_font) && open_font) {
file += "\\\\\n";
}
texrow.newline();
- texrow.start(this, i+1);
+ texrow.start(this, i + 1);
column = 0;
} else {
SimpleTeXSpecialChars(file, texrow,
bool LyXParagraph::SimpleTeXOneTablePar(string & file, TexRow & texrow)
{
lyxerr[Debug::LATEX] << "SimpleTeXOneTablePar... " << this << endl;
- char c;
- int tmp;
bool return_value = false;
- int current_cell_number = -1;
LyXLayout const & style =
- textclasslist.Style(current_view->buffer()->params.textclass, GetLayout());
- LyXFont basefont = getFont(-1); // Get layout font
- // Which font is currently active?
- LyXFont running_font = basefont;
- // Do we have an open font change?
- bool open_font = false;
+ textclasslist.Style(current_view->buffer()->params.textclass,
+ GetLayout());
int column = 0;
if (!IsDummy()) { // it is dummy if it is in a float!!!
if (style.isCommand()) {
file += '{';
- column++;
+ ++column;
} else if (align != LYX_ALIGN_LAYOUT) {
file += '{';
- column++;
+ ++column;
return_value = true;
}
if (noindent) {
break;
}
}
- current_cell_number = -1;
- tmp = table->TexEndOfCell(file, current_cell_number);
+
+ LyXFont basefont = getFont(-1); // Get layout font
+ // Which font is currently active?
+ LyXFont running_font = basefont;
+ // Do we have an open font change?
+ bool open_font = false;
+ int current_cell_number = -1;
+ int tmp = table->TexEndOfCell(file, current_cell_number);
for (; tmp > 0 ; --tmp)
texrow.newline();
texrow.start(this, 0);
for (size_type i = 0; i < size(); ++i) {
- c = GetChar(i);
+ char c = GetChar(i);
if (table->IsContRow(current_cell_number+1)) {
if (c == LyXParagraph::META_NEWLINE)
current_cell_number++;
char c;
bool return_value = false;
- LyXLayout const & style = textclasslist.Style(current_view->buffer()->params.textclass,
- GetLayout());
- LyXFont basefont;
-
- basefont = getFont(-1); // Get layout font
+ LyXLayout const & style =
+ textclasslist.Style(current_view->buffer()->params.textclass,
+ GetLayout());
+ LyXFont basefont = getFont(-1); // Get layout font
// Which font is currently active?
LyXFont running_font = basefont;
// Do we have an open font change?
string emph = "emphasis";
bool emph_flag = false;
- LyXLayout const & style = textclasslist.Style(current_view->buffer()->params.textclass,
- GetLayout());
+ LyXLayout const & style =
+ textclasslist.Style(current_view->buffer()->params.textclass,
+ GetLayout());
if (style.labeltype != LABEL_MANUAL)
main_body = 0;
// "TeX"-Mode on == > SGML-Mode on.
if (c != '\0')
file += c;
- char_line_count++;
+ ++char_line_count;
} else {
string sgml_string;
if (linuxDocConvertChar(c, sgml_string)
file += "</emphasis>";
}
- current_cell_number++;
+ ++current_cell_number;
tmp = table->DocBookEndOfCell(file, current_cell_number, depth);
// Resets description flag correctly.
switch(desc_on){
lyxerr[Debug::LATEX] << "DocBookContTableRows... " << this << endl;
- int cell;
- LyXFont font1, font2;
+ LyXFont font2;
char c;
Inset * inset;
- size_type main_body;
- size_type lastpos;
string emph= "emphasis";
bool emph_flag= false;
int char_line_count= 0;
- LyXLayout const & style = textclasslist.Style(current_view->buffer()->params.textclass,
- GetLayout());
+ LyXLayout const & style =
+ textclasslist.Style(current_view->buffer()->params.textclass,
+ GetLayout());
+ size_type main_body;
if (style.labeltype != LABEL_MANUAL)
main_body = 0;
else
main_body = BeginningOfMainBody();
// Gets paragraph main font.
+ LyXFont font1;
if (main_body > 0)
font1 = style.labelfont;
else
font1 = style.font;
- lastpos = i;
- cell = table->CellHasContRow(current_cell_number);
+ size_type lastpos = i;
+ int cell = table->CellHasContRow(current_cell_number);
++current_cell_number;
while(cell >= 0) {
// first find the right position
//
// This code needs some explanation:
// Two insets are treated specially
- // label if it is the first element in a command paragraph
+ // label if it is the first element in a
+ // command paragraph
// desc_on == 3
- // graphics inside tables or figure floats can't go on
- // title (the equivalente in latex for this case is caption
- // and title should come first
+ // graphics inside tables or figure floats
+ // can't go on title (the equivalente in
+ // latex for this case is caption and title
+ // should come first
// desc_on == 4
//
if(desc_on != 3 || i != 0) {
// "TeX"-Mode on == > SGML-Mode on.
if (c!= '\0')
file += c;
- char_line_count++;
+ ++char_line_count;
} else {
string sgml_string;
if (linuxDocConvertChar(c, sgml_string)
&& !style.free_spacing) {
- // in freespacing mode, spaces are
- // non-breaking characters
- // char is ' '
+ // in freespacing mode, spaces are
+ // non-breaking characters
+ // char is ' '
if (desc_on == 1) {
char_line_count++;
file += '\n';
LyXParagraph * LyXParagraph::TeXEnvironment(string & file, TexRow & texrow,
- string & foot, TexRow & foot_texrow,
+ string & foot,
+ TexRow & foot_texrow,
int & foot_count)
{
bool eindent_open = false;
if (IsDummy())
lyxerr << "ERROR (LyXParagraph::TeXEnvironment)" << endl;
- LyXLayout const & style = textclasslist.Style(current_view->buffer()->params.textclass,
- layout);
+ LyXLayout const & style =
+ textclasslist.Style(current_view->buffer()->params.textclass,
+ layout);
if (pextra_type == PEXTRA_INDENT) {
if (!pextra_width.empty()) {