0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-23 08:29:07 +03:00
This commit is contained in:
Arin Alexander
2017-04-20 21:10:31 +03:00
29 changed files with 152 additions and 89 deletions

View File

@@ -43,7 +43,7 @@ class AlignmentPropItem : public ObjectPropItem
{
Q_OBJECT
public:
AlignmentPropItem():ObjectPropItem(){}
AlignmentPropItem():ObjectPropItem(),m_horizEditor(NULL),m_vertEditor(NULL){}
AlignmentPropItem(QObject *object, ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& value, ObjectPropItem* parent, bool readonly=true);
QString displayValue() const;
void setPropertyValue(QVariant value);

View File

@@ -390,8 +390,8 @@ void HorizontalLayout::slotOnChildDestroy(QObject* child)
BaseDesignIntf* HorizontalLayout::findNext(BaseDesignIntf* item){
if (m_children.count()<childItems().size()-1){
m_children.clear();
foreach (BaseDesignIntf* item, childBaseItems()) {
m_children.append(item);
foreach (BaseDesignIntf* childItem, childBaseItems()) {
m_children.append(childItem);
}
}
qSort(m_children.begin(),m_children.end(),lessThen);
@@ -404,8 +404,8 @@ BaseDesignIntf* HorizontalLayout::findNext(BaseDesignIntf* item){
BaseDesignIntf* HorizontalLayout::findPrior(BaseDesignIntf* item){
if (m_children.count()<childItems().size()-1){
m_children.clear();
foreach (BaseDesignIntf* item, childBaseItems()) {
m_children.append(item);
foreach (BaseDesignIntf* childItem, childBaseItems()) {
m_children.append(childItem);
}
}
qSort(m_children.begin(),m_children.end(),lessThen);

View File

@@ -63,7 +63,7 @@ QString HtmlContext::parseTag(QVector<Tag *> &storage, QString text, int &curPos
tagName.remove('>');
while (buff.contains(rx)){
int pos=rx.indexIn(buff);
pos=rx.indexIn(buff);
buff=buff.right(buff.length()-pos);
curPos+=pos;
if (extractWord(rx.cap(0),1).compare(extractWord(tagName,1),Qt::CaseInsensitive)==0){

View File

@@ -502,18 +502,20 @@ TextItem::TextPtr TextItem::textDocument() const
setTextFont(text,_font);
}
text->documentLayout();
//text->documentLayout();
if (m_lineSpacing != 1 || m_textIndent !=0 ){
for ( QTextBlock block = text->begin(); block.isValid(); block = block.next())
{
QTextCursor tc = QTextCursor(block);
QTextBlockFormat fmt = block.blockFormat();
fmt.setTextIndent(m_textIndent);
if(fmt.lineHeight() != m_lineSpacing) {
fmt.setLineHeight(m_lineSpacing,QTextBlockFormat::LineDistanceHeight);
for ( QTextBlock block = text->begin(); block.isValid(); block = block.next())
{
QTextCursor tc = QTextCursor(block);
QTextBlockFormat fmt = block.blockFormat();
fmt.setTextIndent(m_textIndent);
if (fmt.lineHeight() != m_lineSpacing) {
fmt.setLineHeight(m_lineSpacing,QTextBlockFormat::LineDistanceHeight);
}
tc.setBlockFormat( fmt );
}
}
return text;

View File

@@ -124,8 +124,8 @@ void TextItemEditor::initUI()
ui->twData->setModel(dm->datasourcesModel());
ui->twScriptEngine->setModel(se.model());
foreach(QString dsName,dm->dataSourceNames()){
foreach(QString field, dm->fieldNames(dsName)){
foreach(const QString &dsName,dm->dataSourceNames()){
foreach(const QString &field, dm->fieldNames(dsName)){
dataWords<<dsName+"."+field;
}
}