[TD]fix handling of company name in template fields
This commit is contained in:
@@ -145,8 +145,11 @@ QString DrawTemplate::getAutofillValue(const QString &id) const
|
||||
QDateTime date = QDateTime::currentDateTime();
|
||||
return date.toString(QLocale().dateFormat(QLocale::ShortFormat));
|
||||
}
|
||||
// organization
|
||||
else if (id.compare(QString::fromUtf8(Autofill::Organization)) == 0) {
|
||||
// organization ( also organisation/owner/company )
|
||||
else if (id.compare(QString::fromUtf8(Autofill::Organization)) == 0 ||
|
||||
id.compare(QString::fromUtf8(Autofill::Organisation)) == 0 ||
|
||||
id.compare(QString::fromUtf8(Autofill::Owner)) == 0 ||
|
||||
id.compare(QString::fromUtf8(Autofill::Company)) == 0 ) {
|
||||
auto value = QString::fromUtf8(doc->Company.getValue());
|
||||
if (!value.isEmpty()) {
|
||||
return value;
|
||||
|
||||
@@ -74,6 +74,9 @@ public:
|
||||
static constexpr const char *Author = "author";
|
||||
static constexpr const char *Date = "date";
|
||||
static constexpr const char *Organization = "organization";
|
||||
static constexpr const char *Organisation = "organisation";
|
||||
static constexpr const char *Owner = "owner";
|
||||
static constexpr const char *Company = "company";
|
||||
static constexpr const char *Scale = "scale";
|
||||
static constexpr const char *Sheet = "sheet";
|
||||
static constexpr const char *Title = "title";
|
||||
|
||||
Reference in New Issue
Block a user