diff --git a/common.pri b/common.pri index 4926f46..04efeb8 100644 --- a/common.pri +++ b/common.pri @@ -133,7 +133,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 62 +LIMEREPORT_VERSION_RELEASE = 63 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/items/lrbarcodeitem.cpp b/limereport/items/lrbarcodeitem.cpp index 9161c20..bbdcfee 100644 --- a/limereport/items/lrbarcodeitem.cpp +++ b/limereport/items/lrbarcodeitem.cpp @@ -333,6 +333,13 @@ bool BarcodeItem::isEmpty() const return m_content.isEmpty(); } +void BarcodeItem::expandContent(QString data, DataSourceManager* dataManager, RenderPass pass) +{ + setContent(expandUserVariables(data, pass, NoEscapeSymbols, dataManager)); + setContent(expandScripts(content(), dataManager)); + setContent(expandDataFields(content(), NoEscapeSymbols, dataManager)); +} + void BarcodeItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { if (content().isEmpty()) @@ -346,21 +353,19 @@ void BarcodeItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass if (data.isValid()) { switch(pass) - { - case FirstPass: - setContent(expandUserVariables(data.toString(),pass,NoEscapeSymbols, dataManager)); - setContent(expandDataFields(data.toString(), NoEscapeSymbols, dataManager)); - break; - default:; - } + { + case FirstPass: + expandContent(data.toString(), dataManager, pass); + break; + default:; + } } } } } else { switch(pass){ case FirstPass: - setContent(expandUserVariables(content(),pass,NoEscapeSymbols, dataManager)); - setContent(expandDataFields(content(), NoEscapeSymbols, dataManager)); + expandContent(content(), dataManager, pass); break; default:; } diff --git a/limereport/items/lrbarcodeitem.h b/limereport/items/lrbarcodeitem.h index 8dc091d..c09fbe9 100644 --- a/limereport/items/lrbarcodeitem.h +++ b/limereport/items/lrbarcodeitem.h @@ -191,20 +191,19 @@ public: void setSecurityLevel(int securityLevel); int pdf417CodeWords() const; void setPdf417CodeWords(int pdf417CodeWords); - InputMode inputMode() const; void setInputMode(const InputMode &inputMode); - bool hideText() const; void setHideText(bool hideText); - int option3() const; void setOption3(int option3); - bool hideIfEmpty() const; void setHideIfEmpty(bool hideIfEmpty); bool isEmpty() const; +private: + void expandContent(QString data, DataSourceManager *dataManager, RenderPass pass); + private: QString m_content; QString m_datasource;