Paragraph::Pimpl::Pimpl(Paragraph::Pimpl const & p, Paragraph * owner)
- : owner_(owner)
+ : params(p.params), owner_(owner)
{
inset_owner = p.inset_owner;
text = p.text;
// Update the font table.
FontTable search_font(pos, LyXFont());
- for (FontList::iterator it = lower_bound(fontlist.begin(),
- fontlist.end(),
- search_font, matchFT());
+ for (FontList::iterator it = std::lower_bound(fontlist.begin(),
+ fontlist.end(),
+ search_font, matchFT());
it != fontlist.end(); ++it)
(*it).pos((*it).pos() + 1);
// Update the inset table.
InsetTable search_inset(pos, 0);
- for (InsetList::iterator it = lower_bound(owner_->insetlist.begin(),
- owner_->insetlist.end(),
- search_inset, matchIT());
+ for (InsetList::iterator it = std::lower_bound(owner_->insetlist.begin(),
+ owner_->insetlist.end(),
+ search_inset, matchIT());
it != owner_->insetlist.end(); ++it)
++(*it).pos;
// Add a new entry in the inset table.
InsetTable search_inset(pos, 0);
- InsetList::iterator it = lower_bound(owner_->insetlist.begin(),
- owner_->insetlist.end(),
- search_inset, matchIT());
+ InsetList::iterator it = std::lower_bound(owner_->insetlist.begin(),
+ owner_->insetlist.end(),
+ search_inset, matchIT());
if (it != owner_->insetlist.end() && (*it).pos == pos) {
lyxerr << "ERROR (Paragraph::InsertInset): "
- "there is an inset in position: " << pos << endl;
+ "there is an inset in position: " << pos << std::endl;
} else {
owner_->insetlist.insert(it, InsetTable(pos, inset));
}
// find the entry
InsetTable search_inset(pos, 0);
InsetList::iterator it =
- lower_bound(owner_->insetlist.begin(),
- owner_->insetlist.end(),
- search_inset, matchIT());
+ std::lower_bound(owner_->insetlist.begin(),
+ owner_->insetlist.end(),
+ search_inset, matchIT());
if (it != owner_->insetlist.end() && (*it).pos == pos) {
delete (*it).inset;
owner_->insetlist.erase(it);
FontTable search_font(pos, LyXFont());
FontList::iterator it =
- lower_bound(fontlist.begin(),
+ std::lower_bound(fontlist.begin(),
fontlist.end(),
search_font, matchFT());
if (it != fontlist.end() && (*it).pos() == pos &&
InsetTable search_inset(pos, 0);
InsetList::iterator lend = owner_->insetlist.end();
for (InsetList::iterator it =
- upper_bound(owner_->insetlist.begin(),
- lend,
- search_inset, matchIT());
+ std::upper_bound(owner_->insetlist.begin(),
+ lend,
+ search_inset, matchIT());
it != lend; ++it)
--(*it).pos;
}
-void Paragraph::Pimpl::simpleTeXBlanks(ostream & os, TexRow & texrow,
- Paragraph::size_type const i,
- int & column, LyXFont const & font,
- LyXLayout const & style)
+void Paragraph::Pimpl::simpleTeXBlanks(std::ostream & os, TexRow & texrow,
+ Paragraph::size_type const i,
+ int & column, LyXFont const & font,
+ LyXLayout const & style)
{
if (column > tex_code_break_column
&& i
&& owner_->getChar(i - 1) != ' '
&& (i < owner_->size() - 1)
+#ifndef NO_LATEX
// In LaTeX mode, we don't want to
// break lines since some commands
// do not like this
&& ! (font.latex() == LyXFont::ON)
+#endif
// same in FreeSpacing mode
&& !style.free_spacing
// In typewriter mode, we want to avoid
texrow.newline();
texrow.start(owner_, i + 1);
column = 0;
- } else if (font.latex() == LyXFont::OFF) {
+ } else
+#ifndef NO_LATEX
+ if (font.latex() == LyXFont::OFF) {
+#endif
if (style.free_spacing) {
os << '~';
} else {
os << ' ';
}
+#ifndef NO_LATEX
}
+#endif
}
void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
BufferParams const & bparams,
- ostream & os, TexRow & texrow,
+ std::ostream & os,
+ TexRow & texrow,
bool moving_arg,
LyXFont & font,
LyXFont & running_font,
bool close = false;
int const len = os.tellp();
//ostream::pos_type const len = os.tellp();
- if ((inset->LyxCode() == Inset::GRAPHICS_CODE
- || inset->LyxCode() == Inset::MATH_CODE
- || inset->LyxCode() == Inset::URL_CODE)
+ if ((inset->lyxCode() == Inset::GRAPHICS_CODE
+ || inset->lyxCode() == Inset::MATH_CODE
+ || inset->lyxCode() == Inset::URL_CODE)
&& running_font.isRightToLeft()) {
os << "\\L{";
close = true;
}
- int tmp = inset->Latex(buf, os, moving_arg,
+ int tmp = inset->latex(buf, os, moving_arg,
style.free_spacing);
if (close)
default:
// And now for the special cases within each mode
+#ifndef NO_LATEX
// Are we in LaTeX mode?
if (font.latex() == LyXFont::ON) {
// at present we only have one option
break;
}
} else {
+#endif
// Plain mode (i.e. not LaTeX)
switch (c) {
case '\\':
}
break;
}
+#ifndef NO_LATEX
}
+#endif
}
}
Paragraph * Paragraph::Pimpl::TeXDeeper(Buffer const * buf,
BufferParams const & bparams,
- ostream & os, TexRow & texrow)
+ std::ostream & os, TexRow & texrow)
{
- lyxerr[Debug::LATEX] << "TeXDeeper... " << this << endl;
+ lyxerr[Debug::LATEX] << "TeXDeeper... " << this << std::endl;
Paragraph * par = owner_;
while (par && par->params().depth() == owner_->params().depth()) {
os, texrow, false);
}
}
- lyxerr[Debug::LATEX] << "TeXDeeper...done " << par << endl;
+ lyxerr[Debug::LATEX] << "TeXDeeper...done " << par << std::endl;
return par;
}