diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index ea96609..0c50d2d 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -415,6 +415,7 @@ BaseDesignIntf *TextItem::cloneUpperPart(int height, QObject *owner, QGraphicsIt } } loop_exit: + tmpText = tmpText.trimmed(); upperPart->setHeight(linesHeight+fakeMarginSize()*2+borderLineSize()*2); QScopedPointer context(new HtmlContext(m_strText)); upperPart->setContent(context->extendTextByTags(tmpText,0)); @@ -442,10 +443,12 @@ BaseDesignIntf *TextItem::cloneBottomPart(int height, QObject *owner, QGraphicsI for (;curLinelineCount();curLine++){ if (tmpText=="") textPos= curBlock.layout()->lineAt(curLine).textStart(); tmpText+=curBlock.text().mid(curBlock.layout()->lineAt(curLine).textStart(), - curBlock.layout()->lineAt(curLine).textLength())+"\n"; + curBlock.layout()->lineAt(curLine).textLength()) +"\n"; } } + if (!m_strText.endsWith("\n")) tmpText = tmpText.trimmed(); + QScopedPointer context(new HtmlContext(m_strText)); bottomPart->setContent(context->extendTextByTags(tmpText,textPos)); bottomPart->setHeight(bottomPart->m_textSize.height()+borderLineSize()*2);