namespace lyx {
-namespace {
-
-/// Inset identifier (above 0x10ffff, for ucs-4)
-char_type const META_INSET = 0x200001;
-
-} // namespace
-
-
/////////////////////////////////////////////////////////////////////
//
// SpellResultRange
Ranges ranges_;
/// the area of the paragraph with pending spell check
FontSpan refresh_;
- bool needs_refresh_;
/// spell state cache version number
SpellChecker::ChangeNumber current_change_number_;
+ bool needs_refresh_;
void correctRangesAfterPos(pos_type pos, int offset)
{
int numskips = 0;
while (it != et && it->first < start) {
- int skip = it->last - it->first + 1;
+ long skip = it->last - it->first + 1;
start += skip;
numskips += skip;
++it;
///
FontList fontlist_;
- ///
- int id_;
-
///
ParagraphParameters params_;
Layout const * layout_;
///
SpellCheckerState speller_state_;
+ ///
+ int id_;
};
Paragraph::Private::Private(Paragraph * owner, Layout const & layout)
- : owner_(owner), inset_owner_(nullptr), id_(-1), begin_of_body_(0), layout_(&layout)
+ : owner_(owner), inset_owner_(nullptr), begin_of_body_(0), layout_(&layout), id_(-1)
{
text_.reserve(100);
}
// LFUN_PARAGRAPH_GOTO to switch to a different buffer, for instance in the
// outliner.
// (thread-safe)
- static atomic_uint next_id(0);
+ static int next_id(0);
return next_id++;
}
Paragraph::Private::Private(Private const & p, Paragraph * owner)
: owner_(owner), inset_owner_(p.inset_owner_), fontlist_(p.fontlist_),
- id_(make_id()),
params_(p.params_), changes_(p.changes_), insetlist_(p.insetlist_),
begin_of_body_(p.begin_of_body_), text_(p.text_), words_(p.words_),
- layout_(p.layout_)
+ layout_(p.layout_), id_(make_id())
{
requestSpellCheck(p.text_.size());
}
Paragraph::Private::Private(Private const & p, Paragraph * owner,
pos_type beg, pos_type end)
- : owner_(owner), inset_owner_(p.inset_owner_), id_(make_id()),
+ : owner_(owner), inset_owner_(p.inset_owner_),
params_(p.params_), changes_(p.changes_),
insetlist_(p.insetlist_, beg, end),
begin_of_body_(p.begin_of_body_), words_(p.words_),
- layout_(p.layout_)
+ layout_(p.layout_), id_(make_id())
{
if (beg >= pos_type(p.text_.size()))
return;
class OptionalFontType {
public:
- bool has_value;
xml::FontTypes ft;
+ bool has_value;
- OptionalFontType(): has_value(false), ft(xml::FT_EMPH) {} // A possible value at random for ft.
- OptionalFontType(xml::FontTypes ft): has_value(true), ft(ft) {}
+ OptionalFontType(): ft(xml::FT_EMPH), has_value(false) {} // A possible value at random for ft.
+ OptionalFontType(xml::FontTypes ft): ft(ft), has_value(true) {}
};
OptionalFontType fontShapeToXml(FontShape fs)
switch (fm) {
case ROMAN_FAMILY:
return {xml::FT_ROMAN};
- break;
case SANS_FAMILY:
return {xml::FT_SANS};
- break;
case TYPEWRITER_FAMILY:
return {xml::FT_TYPE};
- break;
case INHERIT_FAMILY:
return {};
default:
struct DocBookFontState
{
+ FontShape curr_fs = INHERIT_SHAPE;
+ FontFamily curr_fam = INHERIT_FAMILY;
+ FontSize curr_size = INHERIT_SIZE;
+
// track whether we have opened these tags
bool emph_flag = false;
bool bold_flag = false;
bool faml_flag = false;
// size tags
bool size_flag = false;
-
- FontShape curr_fs = INHERIT_SHAPE;
- FontFamily curr_fam = INHERIT_FAMILY;
- FontSize curr_size = INHERIT_SIZE;
};
std::tuple<vector<xml::FontTag>, vector<xml::EndFontTag>> computeDocBookFontSwitch(FontInfo const & font_old,