int singleWidth(Buffer const &, Paragraph const & par,
pos_type pos) const;
///
- int singleWidth(Buffer const &, Paragraph const & par,
- pos_type pos, char_type c, LyXFont const & Font) const;
+ int singleWidth(Paragraph const & par, pos_type pos, char_type c,
+ LyXFont const & Font) const;
/// return the color of the canvas
LColor_color backgroundColor() const;
c = par_.getChar(i);
if (!Encodings::isComposeChar_hebrew(c)) {
if (isPrintableNonspace(c)) {
- int const width2 =
- text_.singleWidth(*bv_.buffer(), par_, i, c,
- text_.getFont(*bv_.buffer(), par_, i));
+ int const width2 = text_.singleWidth(par_, i, c,
+ text_.getFont(*bv_.buffer(), par_, i));
// FIXME UNICODE
// This does not work anymore, and non-ascii
// characters in source files are forbidden
c = par_.getChar(i);
if (!Encodings::isComposeChar_arabic(c)) {
if (isPrintableNonspace(c)) {
- int const width2 =
- text_.singleWidth(*bv_.buffer(), par_, i, c,
+ int const width2 = text_.singleWidth(par_, i, c,
text_.getFont(*bv_.buffer(), par_, i));
dx = (width2 - width) / 2;
}
font = text_.getFont(buffer, par_, vpos);
}
- const int width_pos = text_.singleWidth(buffer, par_, pos,
- par_.getChar(pos), font);
+ const int width_pos =
+ text_.singleWidth(par_, pos, par_.getChar(pos), font);
if (x_ + width_pos < 0) {
x_ += width_pos;
int LyXText::singleWidth(Buffer const & buffer, Paragraph const & par,
pos_type pos) const
{
- return singleWidth(buffer, par, pos, par.getChar(pos),
+ return singleWidth(par, pos, par.getChar(pos),
getFont(buffer, par, pos));
}
-int LyXText::singleWidth(Buffer const & buffer, Paragraph const & par,
+int LyXText::singleWidth(Paragraph const & par,
pos_type pos, char_type c, LyXFont const & font) const
{
// The most common case is handled first (Asger)
FontMetrics const & fm = theFontMetrics(getLabelFont(buffer, par));
for ( ; i < end; ++i, ++fi) {
char_type const c = par.getChar(i);
- int thiswidth = singleWidth(buffer, par, i, c, *fi);
+ int thiswidth = singleWidth(par, i, c, *fi);
// add the auto-hfill from label end to the body
if (body_pos && i == body_pos) {
w = max(w, labelEnd(buffer, pit));
}
char_type const c = par.getChar(i);
- w += singleWidth(buffer, par, i, c, *fi);
+ w += singleWidth(par, i, c, *fi);
}
}
font = getFont(buffer, par, pos);
}
- x += singleWidth(buffer, par, pos, par.getChar(pos), font);
+ x += singleWidth(par, pos, par.getChar(pos), font);
if (par.hfillExpansion(row, pos))
x += (pos >= body_pos) ? m.hfill : m.label_hfill;