}
// First write the layout
- os << "\n\\layout " << layout()->name() << "\n";
+ os << "\n\\layout " << layout()->name() << '\n';
// Maybe some vertical spaces.
if (params().spaceTop().kind() != VSpace::NONE)
os << "\\added_space_top "
- << params().spaceTop().asLyXCommand() << " ";
+ << params().spaceTop().asLyXCommand() << ' ';
if (params().spaceBottom().kind() != VSpace::NONE)
os << "\\added_space_bottom "
- << params().spaceBottom().asLyXCommand() << " ";
+ << params().spaceBottom().asLyXCommand() << ' ';
// Maybe the paragraph has special spacing
params().spacing().writeFile(os, true);
// Do we have a manual left indent?
if (!params().leftIndent().zero())
- os << "\\leftindent " << params().leftIndent().asString() << " ";
+ os << "\\leftindent " << params().leftIndent().asString()
+ << ' ';
// Alignment?
if (params().align() != LYX_ALIGN_LAYOUT) {
case LYX_ALIGN_CENTER: h = 3; break;
default: h = 0; break;
}
- os << "\\align " << string_align[h] << " ";
+ os << "\\align " << string_align[h] << ' ';
}
// bibitem ale970302
int column = 0;
for (pos_type i = 0; i < size(); ++i) {
if (!i) {
- os << "\n";
+ os << '\n';
column = 0;
}
os << ".\n";
column = 0;
} else
- os << ".";
+ os << '.';
break;
default:
if ((column > 70 && c == ' ')
|| column > 79) {
- os << "\n";
+ os << '\n';
column = 0;
}
// this check is to amend a bug. LyX sometimes
if (!params().spacing().isDefault()
&& (!previous() || !previous()->hasSameLayout(this))) {
- os << params().spacing().writeEnvirBegin() << "\n";
+ os << params().spacing().writeEnvirBegin() << '\n';
texrow.newline();
}
language->encoding() != previous_language->encoding()) {
os << "\\inputencoding{"
<< language->encoding()->LatexName()
- << "}" << endl;
+ << "}\n";
texrow.newline();
}
if (style->resfont.size() != font.size() && next_ && !is_command) {
if (!need_par)
- os << "{";
+ os << '{';
os << "\\" << font.latexSize() << " \\par}";
} else if (need_par) {
os << "\\par}";
} else if (is_command)
- os << "}";
+ os << '}';
switch (style->latextype) {
case LATEX_ITEM_ENVIRONMENT:
if (!params().spacing().isDefault()
&& (!next_ || !next_->hasSameLayout(this))) {
- os << params().spacing().writeEnvirEnd() << "\n";
+ os << params().spacing().writeEnvirEnd() << '\n';
texrow.newline();
}
}
running_font = basefont;
if (font.family() ==
LyXFont::TYPEWRITER_FAMILY) {
- os << "~";
+ os << '~';
}
if (moving_arg)
os << "\\protect ";
// Convert the paragraph to a string.
// Used for building the table of contents
-string const Paragraph::asString(Buffer const * buffer, bool label)
+string const Paragraph::asString(Buffer const * buffer, bool label) const
{
BufferParams const & bparams = buffer->params;
string s;
string const Paragraph::asString(Buffer const * buffer,
- pos_type beg, pos_type end, bool label)
+ pos_type beg, pos_type end, bool label) const
{
ostringstream ost;