This commit is contained in:
Yuriy Skalko 2020-10-09 18:50:24 +03:00 committed by Jean-Marc Lasgouttes
parent 2dc4277452
commit 919a06718a
11 changed files with 22 additions and 23 deletions

View File

@ -412,7 +412,7 @@ bool Counters::remove(docstring const & cnt)
}
void Counters::copy(Counters & from, Counters & to, docstring const & match)
void Counters::copy(Counters const & from, Counters & to, docstring const & match)
{
for (auto const & ctr : counterList_) {
if (ctr.first.find(match) != string::npos || match == "") {

View File

@ -162,7 +162,7 @@ public:
bool remove(docstring const & cnt);
/// Copy counters whose name matches match from the &from to
/// the &to array of counters. Empty string matches all.
void copy(Counters & from, Counters & to,
void copy(Counters const & from, Counters & to,
docstring const & match = docstring());
/** returns the expanded string representation of counter \c
* c. The \c lang code is used to translate the string.

View File

@ -258,9 +258,9 @@ public:
settings are given to the new one.
This function will handle a multi-paragraph selection.
*/
void setParagraphs(Cursor & cur, docstring const & arg, bool modify = false);
void setParagraphs(Cursor const & cur, docstring const & arg, bool modify = false);
/// Sets parameters for current or selected paragraphs
void setParagraphs(Cursor & cur, ParagraphParameters const & p);
void setParagraphs(Cursor const & cur, ParagraphParameters const & p);
/* these things are for search and replace */

View File

@ -487,7 +487,7 @@ void Text::setLabelWidthStringToSequence(Cursor const & cur,
}
void Text::setParagraphs(Cursor & cur, docstring const & arg, bool merge)
void Text::setParagraphs(Cursor const & cur, docstring const & arg, bool merge)
{
LBUFERR(cur.text());
@ -515,7 +515,7 @@ void Text::setParagraphs(Cursor & cur, docstring const & arg, bool merge)
}
void Text::setParagraphs(Cursor & cur, ParagraphParameters const & p)
void Text::setParagraphs(Cursor const & cur, ParagraphParameters const & p)
{
LBUFERR(cur.text());

View File

@ -369,7 +369,7 @@ enum OutlineOp {
};
static void insertSeparator(Cursor & cur, depth_type const depth)
static void insertSeparator(Cursor const & cur, depth_type const depth)
{
Buffer & buf = *cur.buffer();
lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK));

View File

@ -1929,12 +1929,11 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv,
docstring prevlayout;
depth_type current_depth = par.params().depth();
// check if we have an environment in our scope
Paragraph cpar = par;
while (true) {
if (pit == 0)
break;
--pit;
cpar = text->getPar(pit);
Paragraph cpar = text->getPar(pit);
if (cpar.layout().isEnvironment() && prevlayout.empty()
&& cpar.params().depth() <= current_depth)
prevlayout = cpar.layout().name();

View File

@ -627,7 +627,7 @@ std::tuple<InsetCode, const Inset *, const InsetCaption *, const InsetLabel *> d
void docbookSubfigures(XMLStream & xs, OutputParams const & runparams, const InsetCaption * caption,
const InsetLabel * label, std::vector<const InsetCollapsible *> & subfigures)
const InsetLabel * label, std::vector<const InsetCollapsible *> const & subfigures)
{
// Ensure there is no label output, it is supposed to be handled as xml:id.
OutputParams rpNoLabel = runparams;

View File

@ -1134,7 +1134,7 @@ public:
void addIntervall(int upper);
void addIntervall(int low, int upper); /* if explicit */
void removeAccents();
void setForDefaultLang(KeyInfo &defLang);
void setForDefaultLang(KeyInfo const & defLang);
int findclosing(int start, int end, char up, char down, int repeat);
void handleParentheses(int lastpos, bool closingAllowed);
bool hasTitle;
@ -1162,7 +1162,7 @@ int Intervall::isOpeningPar(int pos)
return 1;
}
void Intervall::setForDefaultLang(KeyInfo &defLang)
void Intervall::setForDefaultLang(KeyInfo const & defLang)
{
// Enable the use of first token again
if (ignoreidx >= 0) {
@ -1475,7 +1475,7 @@ class LatexInfo {
void buildEntries(bool);
void makeKey(const string &, KeyInfo, bool isPatternString);
void processRegion(int start, int region_end); /* remove {} parts */
void removeHead(KeyInfo&, int count=0);
void removeHead(KeyInfo const &, int count=0);
public:
LatexInfo(string const & par, bool isPatternString)
@ -1535,7 +1535,7 @@ class LatexInfo {
}
return -1;
};
int process(ostringstream &os, KeyInfo &actual);
int process(ostringstream & os, KeyInfo const & actual);
int dispatch(ostringstream & os, int previousStart, KeyInfo & actual);
// string show(int lastpos) { return interval.show(lastpos);};
int nextNotIgnored(int start) { return interval_.nextNotIgnored(start);};
@ -2220,7 +2220,7 @@ void LatexInfo::processRegion(int start, int region_end)
}
}
void LatexInfo::removeHead(KeyInfo &actual, int count)
void LatexInfo::removeHead(KeyInfo const & actual, int count)
{
if (actual.parenthesiscount == 0) {
// "{\tiny{} ...}" ==> "{{} ...}"
@ -2504,7 +2504,7 @@ int LatexInfo::dispatch(ostringstream &os, int previousStart, KeyInfo &actual)
return nextKeyIdx;
}
int LatexInfo::process(ostringstream &os, KeyInfo &actual )
int LatexInfo::process(ostringstream & os, KeyInfo const & actual )
{
int end = interval_.nextNotIgnored(actual._dataEnd);
int oldStart = actual._dataStart;
@ -3349,7 +3349,7 @@ int findAdvFinalize(DocIterator & cur, MatchStringAdv const & match)
/// Finds forward
int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
int findForwardAdv(DocIterator & cur, MatchStringAdv const & match)
{
if (!cur)
return 0;
@ -3627,7 +3627,7 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
return 0;
// Build a copy of the replace buffer, adapted to the KeepCase option
Buffer & repl_buffer_orig = *theBufferList().getBuffer(FileName(to_utf8(opt.repl_buf_name)), true);
Buffer const & repl_buffer_orig = *theBufferList().getBuffer(FileName(to_utf8(opt.repl_buf_name)), true);
ostringstream oss;
repl_buffer_orig.write(oss);
string lyx = oss.str();

View File

@ -194,7 +194,7 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
tr().metrics(mi, dimtr);
}
BufferView & bv = *mi.base.bv;
BufferView const & bv = *mi.base.bv;
// FIXME: data copying... not very efficient.
dim.wid = nwid(bv) + nker(mi.base.bv) + 2 * dx;
@ -212,7 +212,7 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
{
Changer dummy2 = pi.base.changeEnsureMath();
BufferView & bv = *pi.base.bv;
BufferView const & bv = *pi.base.bv;
nuc().draw(pi, x + dxn(bv), y);
if (!scriptl_)
bl().draw(pi, x , y);

View File

@ -939,7 +939,7 @@ void handle_hline_below(RowInfo & ri, vector<CellInfo> & ci)
void handle_tabular(Parser & p, ostream & os, string const & name,
string const & tabularwidth, string const & halign,
Context & context)
Context const & context)
{
bool const is_long_tabular(name == "longtable" || name == "xltabular");
bool booktabs = false;

View File

@ -82,7 +82,7 @@ void parse_math(Parser & p, std::ostream & os, unsigned flags, mode_type mode);
/// in table.cpp
void handle_tabular(Parser & p, std::ostream & os, std::string const & name,
std::string const & width, std::string const & halign,
Context & context);
Context const & context);
/// in tex2lyx.cpp