mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Compare commits
7 Commits
7946dfacfa
...
8e181e992d
Author | SHA1 | Date | |
---|---|---|---|
|
8e181e992d | ||
|
7a99ef7fbb | ||
|
b743870d71 | ||
|
b1bbf64a28 | ||
|
cc40330e00 | ||
|
91f3f27545 | ||
|
8ea9c2da03 |
@ -590,9 +590,8 @@ Buffer * Buffer::cloneWithChildren() const
|
||||
{
|
||||
BufferMap bufmap;
|
||||
cloned_buffers.emplace_back(new CloneList);
|
||||
CloneList_ptr clones = cloned_buffers.back();
|
||||
|
||||
cloneWithChildren(bufmap, clones);
|
||||
cloneWithChildren(bufmap, cloned_buffers.back());
|
||||
|
||||
// make sure we got cloned
|
||||
BufferMap::const_iterator bit = bufmap.find(this);
|
||||
|
@ -79,9 +79,8 @@ Graph::EdgePath const
|
||||
}
|
||||
|
||||
|
||||
Graph::EdgePath const
|
||||
Graph::getReachable(int from, bool only_viewable,
|
||||
bool clear_visited, set<int> excludes)
|
||||
Graph::EdgePath const Graph::getReachable(int from, bool only_viewable, bool clear_visited,
|
||||
set<int> const & excludes)
|
||||
{
|
||||
EdgePath result;
|
||||
queue<int> Q;
|
||||
|
@ -33,8 +33,8 @@ public:
|
||||
/// \return a vector of the vertices from which "to" can be reached
|
||||
EdgePath const getReachableTo(int to, bool clear_visited);
|
||||
/// \return a vector of the reachable vertices, avoiding all "excludes"
|
||||
EdgePath const getReachable(int from, bool only_viewable,
|
||||
bool clear_visited, std::set<int> excludes = std::set<int>());
|
||||
EdgePath const getReachable(int from, bool only_viewable, bool clear_visited,
|
||||
std::set<int> const & excludes = std::set<int>());
|
||||
/// can "from" be reached from "to"?
|
||||
bool isReachable(int from, int to);
|
||||
/// find a path from "from" to "to". always returns one of the
|
||||
|
@ -176,19 +176,13 @@ tex_accent getkeymod(string const &);
|
||||
|
||||
void Trans::addDeadkey(tex_accent accent, docstring const & keys)
|
||||
{
|
||||
KmodInfo tmp;
|
||||
tmp.data = keys;
|
||||
tmp.accent = accent;
|
||||
kmod_list_[accent] = tmp;
|
||||
kmod_list_[accent] = KmodInfo(keys, accent, KmodException());
|
||||
|
||||
for (char_type key : keys) {
|
||||
// FIXME This is a hack.
|
||||
// tmp is no valid UCS4 string, but misused to store the
|
||||
// accent.
|
||||
docstring tmpd;
|
||||
tmpd += char_type(0);
|
||||
tmpd += char_type(accent);
|
||||
keymap_[key] = tmpd;
|
||||
keymap_[key] = docstring() + char_type(0) + char_type(accent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,6 +112,9 @@ public:
|
||||
///
|
||||
KmodInfo() : accent(TEX_NOACCENT) {}
|
||||
///
|
||||
KmodInfo(docstring const & d, tex_accent a, KmodException const & e)
|
||||
: data(d), accent(a), exception_list(e) {}
|
||||
///
|
||||
docstring data;
|
||||
///
|
||||
tex_accent accent;
|
||||
|
@ -1037,7 +1037,7 @@ bool CompressorProxy::emitCheck(bool isAutoRepeat)
|
||||
}
|
||||
|
||||
|
||||
void CompressorProxy::slot(KeySymbol sym, KeyModifier mod, bool isAutoRepeat)
|
||||
void CompressorProxy::slot(KeySymbol const & sym, KeyModifier mod, bool isAutoRepeat)
|
||||
{
|
||||
if (emitCheck(isAutoRepeat))
|
||||
Q_EMIT signal(sym, mod);
|
||||
|
@ -102,7 +102,7 @@ Q_SIGNALS:
|
||||
///
|
||||
void bufferViewChanged();
|
||||
/// send key event to CompressorProxy
|
||||
void compressKeySym(KeySymbol sym, KeyModifier mod, bool isAutoRepeat);
|
||||
void compressKeySym(KeySymbol const & sym, KeyModifier mod, bool isAutoRepeat);
|
||||
|
||||
private Q_SLOTS:
|
||||
/// Scroll the BufferView.
|
||||
@ -170,9 +170,9 @@ class CompressorProxy : public QObject
|
||||
bool emitCheck(bool isAutoRepeat);
|
||||
bool flag_;
|
||||
// input: event to compress
|
||||
Q_SLOT void slot(KeySymbol sym, KeyModifier mod, bool isAutoRepeat);
|
||||
Q_SLOT void slot(KeySymbol const & sym, KeyModifier mod, bool isAutoRepeat);
|
||||
// output: compressed event
|
||||
Q_SIGNAL void signal(KeySymbol sym, KeyModifier mod);
|
||||
Q_SIGNAL void signal(KeySymbol const & sym, KeyModifier mod);
|
||||
public:
|
||||
// No default constructor, since the proxy must be a child of the
|
||||
// target object.
|
||||
|
@ -1725,10 +1725,6 @@ void MenuDefinition::expandCiteStyles(BufferView const * bv)
|
||||
&& (keys.size() > 1
|
||||
|| !citinset->getParam("pretextlist").empty()
|
||||
|| !citinset->getParam("posttextlist").empty());
|
||||
vector<pair<docstring, docstring>> pres =
|
||||
citinset->getQualifiedLists(citinset->getParam("pretextlist"));
|
||||
vector<pair<docstring, docstring>> posts =
|
||||
citinset->getQualifiedLists(citinset->getParam("posttextlist"));
|
||||
|
||||
CiteItem ci;
|
||||
ci.textBefore = citinset->getParam("before");
|
||||
@ -1738,8 +1734,10 @@ void MenuDefinition::expandCiteStyles(BufferView const * bv)
|
||||
ci.context = CiteItem::Dialog;
|
||||
ci.max_size = 40;
|
||||
ci.isQualified = qualified;
|
||||
ci.pretexts = pres;
|
||||
ci.posttexts = posts;
|
||||
ci.pretexts =
|
||||
citinset->getQualifiedLists(citinset->getParam("pretextlist"));
|
||||
ci.posttexts =
|
||||
citinset->getQualifiedLists(citinset->getParam("posttextlist"));
|
||||
BiblioInfo::CiteStringMap citeStrings =
|
||||
buf->masterBibInfo().getCiteStrings(keys, citeStyleList, bv->buffer(), ci);
|
||||
|
||||
|
@ -476,7 +476,7 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string cite_type = getCmdName();
|
||||
bool const uppercase = isUpperCase(cite_type[0]);
|
||||
if (uppercase)
|
||||
@ -502,8 +502,6 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const
|
||||
&& (keys.size() > 1
|
||||
|| !getParam("pretextlist").empty()
|
||||
|| !getParam("posttextlist").empty());
|
||||
QualifiedList pres = getQualifiedLists(getParam("pretextlist"));
|
||||
QualifiedList posts = getQualifiedLists(getParam("posttextlist"));
|
||||
|
||||
CiteItem ci;
|
||||
ci.textBefore = getParam("before");
|
||||
@ -512,8 +510,8 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const
|
||||
ci.Starred = starred;
|
||||
ci.max_size = UINT_MAX;
|
||||
ci.isQualified = qualified;
|
||||
ci.pretexts = pres;
|
||||
ci.posttexts = posts;
|
||||
ci.pretexts = getQualifiedLists(getParam("pretextlist"));
|
||||
ci.posttexts = getQualifiedLists(getParam("posttextlist"));
|
||||
if (for_xhtml) {
|
||||
ci.max_key_size = UINT_MAX;
|
||||
ci.context = CiteItem::Export;
|
||||
|
@ -32,11 +32,11 @@ public:
|
||||
///
|
||||
docstring const & formattedCounter() const { return formatted_counter_; }
|
||||
///
|
||||
void setCounterValue(docstring cv) { counter_value_ = cv; }
|
||||
void setCounterValue(docstring const & cv) { counter_value_ = cv; }
|
||||
///
|
||||
void setPrettyCounter(docstring pc) { pretty_counter_ = pc; }
|
||||
void setPrettyCounter(docstring const & pc) { pretty_counter_ = pc; }
|
||||
///
|
||||
void setFormattedCounter(docstring fc) { formatted_counter_ = fc; }
|
||||
void setFormattedCounter(docstring const & fc) { formatted_counter_ = fc; }
|
||||
///
|
||||
int rowFlags() const override { return CanBreakBefore | CanBreakAfter; }
|
||||
/// Updates only the label string, doesn't handle undo nor references.
|
||||
|
Loading…
Reference in New Issue
Block a user