d->texrow.reset();
DocumentClass const & tclass = params().documentClass();
- string const top_element = tclass.latexname();
+ string const & top_element = tclass.latexname();
bool const output_preamble =
output == FullSource || output == OnlyPreamble;
}
// Loop over the list of duplicated variables
- for (std::set<std::string>::iterator dupe = dupes.begin(); dupe != dupes.end(); dupe++) {
+ for (std::set<std::string>::iterator dupe = dupes.begin(); dupe != dupes.end(); ++dupe) {
const char *name = (*dupe).c_str();
char *val = getenv(name);
if (val != NULL) {
if (!trackChanges)
return true;
- Change const change = d->changes_.lookup(size());
+ Change const & change = d->changes_.lookup(size());
return change.inserted() && change.currentAuthor();
}
int column = 0;
for (pos_type i = 0; i <= size(); ++i) {
- Change const change = lookupChange(i);
+ Change const & change = lookupChange(i);
if (change != running_change)
flushString(os, write_buffer);
Changes::lyxMarkChange(os, bparams, column, running_change, change);
// Therefore, it should only be used for breaking and merging paragraphs
// We need a copy here because the character at fromPos is going to be erased.
- Font const tmpFont = fromPar.getFontSettings(params, fromPos);
- Change const tmpChange = fromPar.lookupChange(fromPos);
+ Font const & tmpFont = fromPar.getFontSettings(params, fromPos);
+ Change const & tmpChange = fromPar.lookupChange(fromPos);
if (Inset * tmpInset = fromPar.getInset(fromPos)) {
fromPar.releaseInset(fromPos);
// Store the characters to be transposed (including font information).
char_type const char1 = par.getChar(pos1);
- Font const font1 =
+ Font const & font1 =
par.getFontSettings(cur.buffer()->params(), pos1);
char_type const char2 = par.getChar(pos2);
- Font const font2 =
+ Font const & font2 =
par.getFontSettings(cur.buffer()->params(), pos2);
// And finally, we are ready to perform the transposition.
// Try implicit word selection
// If there is a change in the language the implicit word selection
// is disabled.
- CursorSlice const resetCursor = cur.top();
+ CursorSlice const & resetCursor = cur.top();
bool const implicitSelection =
font.language() == ignore_language
&& font.fontInfo().number() == FONT_IGNORE
cur.noScreenUpdate();
LBUFERR(this == cur.text());
- CursorSlice const oldTopSlice = cur.top();
+ CursorSlice const & oldTopSlice = cur.top();
bool const oldBoundary = cur.boundary();
bool const oldSelection = cur.selection();
// Signals that, even if needsUpdate == false, an update of the
MacroContext mc(&buffer, parPos);
MetricsInfo mi(bv_, font.fontInfo(), w, mc);
ii->inset->metrics(mi, dim);
- Dimension const old_dim = pm.insetDimension(ii->inset);
+ Dimension const & old_dim = pm.insetDimension(ii->inset);
if (old_dim != dim) {
pm.setInsetDimension(ii->inset, dim);
changed = true;
if (rp.html_disable_captions)
return docstring();
InsetLayout const & il = getLayout();
- string const tag = il.htmltag();
+ string const & tag = il.htmltag();
string attr = il.htmlattr();
if (!type_.empty()) {
string const our_class = "float-caption-" + type_;
namespace {
-CitationStyle asValidLatexCommand(string const & input, vector<CitationStyle> const valid_styles)
+CitationStyle asValidLatexCommand(string const & input, vector<CitationStyle> const & valid_styles)
{
CitationStyle cs = valid_styles[0];
cs.forceUpperCase = false;
}
InsetLayout const & il = getLayout();
- string const tag = il.htmltag();
+ string const & tag = il.htmltag();
string attr = "class ='listings";
string const lang = params().getParamValue("language");
if (!lang.empty())
void InsetRef::latex(otexstream & os, OutputParams const & rp) const
{
- string const cmd = getCmdName();
- docstring const data = getEscapedLabel(rp);
+ string const & cmd = getCmdName();
+ docstring const & data = getEscapedLabel(rp);
if (rp.inulemcmd > 0)
os << "\\mbox{";
string const len = params_.width.asHTMLString();
string const width = len.empty() ? "50%" : len;
InsetLayout const & il = getLayout();
- string const tag = il.htmltag();
+ string const & tag = il.htmltag();
string const attr = il.htmlattr() + " style='width:" + width + ";'";
xs << html::StartTag(tag, attr);
docstring const deferred =