From 4c59d2810c4b43ffd2edbfb0637d2eb1b36f9925 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 25 Dec 2020 23:02:33 +0300 Subject: [PATCH] Fixed splitting vertical layouts --- limereport/items/lrverticallayout.cpp | 14 ++++---------- limereport/lrsimplecrypt.cpp | 6 +++--- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/limereport/items/lrverticallayout.cpp b/limereport/items/lrverticallayout.cpp index 51cb533..5550896 100644 --- a/limereport/items/lrverticallayout.cpp +++ b/limereport/items/lrverticallayout.cpp @@ -116,20 +116,14 @@ BaseDesignIntf* VerticalLayout::cloneBottomPart(int height, QObject* owner, QGra bottomPart->initFromItem(this); foreach(BaseDesignIntf* item,childBaseItems()){ - if ((item->geometry().top() < height) && ( item->geometry().bottom() > height )){ + if (item->geometry().bottom() > height){ int sliceHeight = height - item->geometry().top(); - if (item->canBeSplitted(sliceHeight)){ + if ((item->geometry().top() < height) && (item->canBeSplitted(sliceHeight))){ BaseDesignIntf* tmpItem = item->cloneBottomPart(sliceHeight, bottomPart, bottomPart); - tmpItem->setPos(tmpItem->pos().x(),0); tmpItem->setHeight(sliceHeight); + bottomPart->addChild(tmpItem); } else { - item->cloneItem(item->itemMode(), bottomPart, bottomPart); - item->setPos(item->pos().x(), 0); - } - } else { - if (item->geometry().top() >= height){ - BaseDesignIntf* tmpItem = item->cloneItem(item->itemMode(), bottomPart, bottomPart); - tmpItem->setPos(item->pos().x(), item->pos().y() - height); + bottomPart->addChild(item->cloneItem(item->itemMode(), bottomPart, bottomPart)); } } } diff --git a/limereport/lrsimplecrypt.cpp b/limereport/lrsimplecrypt.cpp index f54cbb2..72e6e87 100644 --- a/limereport/lrsimplecrypt.cpp +++ b/limereport/lrsimplecrypt.cpp @@ -29,6 +29,8 @@ ****************************************************************************/ #include "lrsimplecrypt.h" +namespace LimeReport { + #if defined(LP64) || defined(_LP64) || defined(__LP64__) typedef unsigned int WORD; /* Should be 32-bit = 4 bytes */ #else @@ -62,8 +64,6 @@ void initPt(WTB& pt, QByteArray::Iterator* it, QByteArray::Iterator end){ } } -namespace LimeReport { - class ChipperPrivate{ friend class Chipper; public: @@ -115,7 +115,7 @@ QByteArray Chipper::cryptString(QString value) { QByteArray buff; QByteArray result; - buff += value; + buff += value.toUtf8(); WTB pt, ct, prior; if (!d->isPrepared())