#include "BufferView.h"
#include "Changes.h"
#include "Encoding.h"
-#include "support/gettext.h"
#include "Language.h"
#include "Layout.h"
#include "LyXRC.h"
#include "insets/InsetText.h"
#include "support/debug.h"
+#include "support/gettext.h"
#include "support/textutils.h"
#include "support/lassert.h"
FontInfo RowPainter::labelFont() const
{
- return text_.labelFont(pi_.base.bv->buffer(), par_);
+ return text_.labelFont(par_);
}
}
+void RowPainter::paintMisspelledMark(double orig_x, int desc)
+{
+ int const y = yo_ + desc;
+ pi_.pain.wavyHorizontalLine(int(orig_x), y, int(x_) - int(orig_x), Color_red);
+}
+
+
void RowPainter::paintFromPos(pos_type & vpos)
{
pos_type const pos = bidi_.vis2log(vpos);
}
paintForeignMark(orig_x, orig_font.language());
+
+ if (orig_font.isMisspelled())
+ paintMisspelledMark(orig_x, 3);
}
void RowPainter::paintAppendix()
{
// only draw the appendix frame once (for the main text)
- if (!par_.params().appendix() || !text_.isMainText(pi_.base.bv->buffer()))
+ if (!par_.params().appendix() || !text_.isMainText())
return;
int y = yo_ - row_.ascent();
int const w = nestMargin() / 5;
int x = int(xo_) + w * i;
// only consider the changebar space if we're drawing outermost text
- if (text_.isMainText(pi_.base.bv->buffer()))
+ if (text_.isMainText())
x += changebarMargin();
int const starty = yo_ - row_.ascent();
}
}
- bool const is_rtl = text_.isRTL(buffer, par_);
+ bool const is_rtl = text_.isRTL(par_);
bool const is_seq = isFirstInSequence(pit_, text_.paragraphs());
//lyxerr << "paintFirst: " << par_.id() << " is_seq: " << is_seq << endl;
void RowPainter::paintLast()
{
- bool const is_rtl = text_.isRTL(pi_.base.bv->buffer(), par_);
+ bool const is_rtl = text_.isRTL(par_);
int const endlabel = getEndLabel(pit_, text_.paragraphs());
// paint imaginary end-of-paragraph character
Inset const * inset = par_.getInset(pos);
bool const highly_editable_inset = inset
- && inset->editable() == Inset::HIGHLY_EDITABLE;
+ && inset->editable();
// If we reach the end of a change or if the author changes, paint it.
// We also don't paint across things like tables