mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Implement InsetLayout::requiresPackage()
This commit is contained in:
parent
a185642746
commit
f1742ee269
@ -1247,7 +1247,7 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
|
||||
// Both a layout tag and a dedicated inset seem too much effort for this.
|
||||
string const hr_url_escape_chars = "\\#%";
|
||||
if (contains(hr_url_escape_chars, c) && runparams.use_hyperref && il.latexname() == "url"
|
||||
&& il.required().find("url") != il.required().end()) {
|
||||
&& il.requiresPackage("url")) {
|
||||
os << "\\";
|
||||
os.put(c);
|
||||
return;
|
||||
|
@ -998,4 +998,10 @@ int InsetLayout::requiredArgs() const
|
||||
}
|
||||
|
||||
|
||||
bool InsetLayout::requiresPackage(string const pkg) const
|
||||
{
|
||||
return required_.find(pkg) != required_.end();
|
||||
}
|
||||
|
||||
|
||||
} //namespace lyx
|
||||
|
@ -202,6 +202,8 @@ public:
|
||||
///
|
||||
std::set<std::string> const & required() const { return required_; }
|
||||
///
|
||||
bool requiresPackage(std::string const pkg) const;
|
||||
///
|
||||
bool isMultiPar() const { return multipar_; }
|
||||
///
|
||||
bool forcePlainLayout() const { return forceplain_; }
|
||||
|
Loading…
Reference in New Issue
Block a user