Commit 1d68b907 authored by Laurent Montel's avatar Laurent Montel 😁

Start to add quote when necessary

parent 5d399c80
......@@ -234,7 +234,7 @@ void RichTextComposer::insertPlainTextImplementation()
{
if (d->forcePlainTextMarkup) {
KPIMTextEdit::PlainTextMarkupBuilder *pb = new KPIMTextEdit::PlainTextMarkupBuilder();
pb->setQuotePrefix(defaultQuoteSign());
KPIMTextEdit::MarkupDirector *pmd = new KPIMTextEdit::MarkupDirector(pb);
pmd->processDocument(document());
const QString plainText = pb->getResult();
......
......@@ -386,14 +386,15 @@ void PlainTextMarkupBuilder::beginParagraph(Qt::Alignment a, qreal top,
qreal right)
{
Q_UNUSED(a);
Q_UNUSED(top);
Q_UNUSED(bottom);
Q_UNUSED(left);
Q_UNUSED(right);
Q_D(PlainTextMarkupBuilder);
if (isQuoteBlock(top, bottom, left, right)) {
d->m_text.append(d->m_quoteprefix);
}
}
bool PlainTextMarkupBuilder::isQuoteBlock(qreal top, qreal bottom, qreal left, qreal right) const
{
return (top == 12) && (bottom == 12) && (left == 40) && (right == 40);
/*
case Html_blockquote:
margin[QTextHtmlParser::MarginTop] = 12;
......@@ -402,8 +403,6 @@ bool PlainTextMarkupBuilder::isQuoteBlock(qreal top, qreal bottom, qreal left, q
margin[QTextHtmlParser::MarginRight] = 40;
break;
*/
//TODO
return false;
}
void PlainTextMarkupBuilder::beginBackground(const QBrush &brush)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment