///
ParagraphParameters params_;
- /// position of the paragraph in the buffer. Only macros from
- /// paragraphs strictly smaller are visible in this paragraph
- unsigned int macrocontext_position_;
-
/// for recording and looking up changes
Changes changes_;
: owner_(owner), inset_owner_(0), begin_of_body_(0)
{
id_ = paragraph_id++;
- macrocontext_position_ = 0;
text_.reserve(100);
}
// then the layouts
features.useLayout(layout.name());
+ if (!layout.requires().empty()) {
+ vector<string> req = layout.requires();
+ for (vector<string>::const_iterator it = req.begin();
+ it != req.end(); ++it) {
+ features.require(*it);
+ }
+ }
// then the fonts
fontlist_.validate(features);
runparams.encoding->package() == Encoding::none &&
font.language()->encoding()->package() == Encoding::none) {
pair<bool, int> const enc_switch = switchEncoding(os, bparams,
- runparams, *(runparams.encoding),
- *(font.language()->encoding()));
+ runparams, *(font.language()->encoding()));
if (enc_switch.first) {
column += enc_switch.second;
runparams.encoding = font.language()->encoding();
texrow, rp, running_font,
basefont, outerfont, open_font,
runningChange, *style, i, column);
- else
- d->latexSpecialChar(os, rp, running_font, runningChange,
- *style, i, column);
+ else {
+ try {
+ d->latexSpecialChar(os, rp, running_font, runningChange,
+ *style, i, column);
+ } catch (EncodingException & e) {
+ if (runparams.dryrun) {
+ os << "<" << _("LyX Warning: ")
+ << _("uncodable character") << " '";
+ os.put(c);
+ os << "'>";
+ } else {
+ // add location information and throw again.
+ e.par_id = id();
+ e.pos = i;
+ throw(e);
+ }
+ }
+ }
// Set the encoding to that returned from simpleTeXSpecialChars (see
// comment for encoding member in OutputParams.h)
}
-unsigned int Paragraph::macrocontextPosition() const
-{
- return d->macrocontext_position_;
-}
-
-
-void Paragraph::setMacrocontextPosition(unsigned int pos)
-{
- d->macrocontext_position_ = pos;
-}
-
-
void Paragraph::checkAuthors(AuthorList const & authorList)
{
d->changes_.checkAuthors(authorList);