mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Simplify InsetQuotes constructors
This commit is contained in:
parent
fe0ea7bff7
commit
8e60182f58
@ -614,18 +614,12 @@ docstring const InsetQuotesParams::getShortGuiLabel(docstring const & str) const
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
InsetQuotes::InsetQuotes(Buffer * buf, string const & str)
|
||||
: Inset(buf),
|
||||
style_(InsetQuotesParams::EnglishQuotes), side_(InsetQuotesParams::OpeningQuote),
|
||||
pass_thru_(false), internal_fontenc_(false), rtl_(false)
|
||||
: Inset(buf)
|
||||
{
|
||||
if (buf) {
|
||||
global_style_ = buf->masterBuffer()->params().quotes_style;
|
||||
fontspec_ = buf->masterBuffer()->params().useNonTeXFonts;
|
||||
}
|
||||
else {
|
||||
global_style_ = InsetQuotesParams::EnglishQuotes;
|
||||
fontspec_ = false;
|
||||
}
|
||||
|
||||
parseString(str);
|
||||
}
|
||||
@ -633,8 +627,7 @@ InsetQuotes::InsetQuotes(Buffer * buf, string const & str)
|
||||
|
||||
InsetQuotes::InsetQuotes(Buffer * buf, char_type c, InsetQuotesParams::QuoteLevel level,
|
||||
string const & side, string const & style)
|
||||
: Inset(buf), level_(level), pass_thru_(false), fontspec_(false),
|
||||
internal_fontenc_(false), rtl_(false)
|
||||
: Inset(buf), level_(level)
|
||||
{
|
||||
bool dynamic = false;
|
||||
if (buf) {
|
||||
@ -643,9 +636,7 @@ InsetQuotes::InsetQuotes(Buffer * buf, char_type c, InsetQuotesParams::QuoteLeve
|
||||
dynamic = buf->masterBuffer()->params().dynamic_quotes;
|
||||
fontspec_ = buf->masterBuffer()->params().useNonTeXFonts;
|
||||
} else {
|
||||
global_style_ = InsetQuotesParams::EnglishQuotes;
|
||||
fontenc_ = "OT1";
|
||||
fontspec_ = false;
|
||||
}
|
||||
if (style.empty())
|
||||
style_ = dynamic ? InsetQuotesParams::DynamicQuotes : global_style_;
|
||||
|
@ -187,25 +187,25 @@ private:
|
||||
InsetQuotesParams::QuoteStyle getStyle(std::string const &);
|
||||
|
||||
///
|
||||
InsetQuotesParams::QuoteStyle style_;
|
||||
InsetQuotesParams::QuoteStyle style_ = InsetQuotesParams::EnglishQuotes;
|
||||
///
|
||||
InsetQuotesParams::QuoteSide side_;
|
||||
InsetQuotesParams::QuoteSide side_ = InsetQuotesParams::OpeningQuote;
|
||||
///
|
||||
InsetQuotesParams::QuoteLevel level_;
|
||||
InsetQuotesParams::QuoteLevel level_ = InsetQuotesParams::PrimaryQuotes;
|
||||
///
|
||||
InsetQuotesParams::QuoteStyle global_style_;
|
||||
InsetQuotesParams::QuoteStyle global_style_ = InsetQuotesParams::EnglishQuotes;
|
||||
/// Current font encoding
|
||||
std::string fontenc_;
|
||||
/// Code of the contextual language
|
||||
std::string context_lang_;
|
||||
/// Is this in a pass-thru context?
|
||||
bool pass_thru_;
|
||||
bool pass_thru_ = false;
|
||||
/// Do we use fontspec?
|
||||
bool fontspec_;
|
||||
bool fontspec_ = false;
|
||||
/// Do we have an internal font encoding?
|
||||
bool internal_fontenc_;
|
||||
bool internal_fontenc_ = false;
|
||||
/// Are we writing RTL?
|
||||
bool rtl_;
|
||||
bool rtl_ = false;
|
||||
///
|
||||
friend class InsetQuotesParams;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user