Fixed issue #967. Variable must not include new line character.
--HG-- branch : release
This commit is contained in:
parent
24d414d8ce
commit
bba4a2a46a
|
@ -22,6 +22,7 @@
|
||||||
- [#963] Bug in tool Point intersect curve and axis.
|
- [#963] Bug in tool Point intersect curve and axis.
|
||||||
- [#964] Assign operator crashes math parser.
|
- [#964] Assign operator crashes math parser.
|
||||||
- [#966] Unable to control Approximation scale for arc with length.
|
- [#966] Unable to control Approximation scale for arc with length.
|
||||||
|
- [#967] Variable must not include new line character.
|
||||||
|
|
||||||
# Version 0.6.1 October 23, 2018
|
# Version 0.6.1 October 23, 2018
|
||||||
- [#885] Regression. Broken support for multi size measurements.
|
- [#885] Regression. Broken support for multi size measurements.
|
||||||
|
|
|
@ -3835,7 +3835,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node, const Document &pars
|
||||||
{
|
{
|
||||||
if (domElement.tagName() == TagIncrement)
|
if (domElement.tagName() == TagIncrement)
|
||||||
{
|
{
|
||||||
const QString name = GetParametrString(domElement, AttrName, QString());
|
const QString name = GetParametrString(domElement, AttrName, QString()).simplified();
|
||||||
const QString desc = GetParametrEmptyString(domElement, AttrDescription);
|
const QString desc = GetParametrEmptyString(domElement, AttrDescription);
|
||||||
const QString formula = GetParametrString(domElement, AttrFormula, QChar('0'));
|
const QString formula = GetParametrString(domElement, AttrFormula, QChar('0'));
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:simpleType name="shortName">
|
<xs:simpleType name="shortName">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\\"]){0,}"/>
|
<xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;\"]){0,}"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="formatVersion">
|
<xs:simpleType name="formatVersion">
|
||||||
|
|
|
@ -763,7 +763,7 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:simpleType name="shortName">
|
<xs:simpleType name="shortName">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^\()\-−+.,٫, ٬.’=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\()\-−+.,٫, ٬.’=?:;\"]){0,}"/>
|
<xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;\"]){0,}"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="units">
|
<xs:simpleType name="units">
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:simpleType name="shortName">
|
<xs:simpleType name="shortName">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\\"]){0,}"/>
|
<xs:pattern value="([^\p{Nd}\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^ \()\-−+.,٫, ٬.’=?:;\"]){0,}"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="units">
|
<xs:simpleType name="units">
|
||||||
|
|
|
@ -317,14 +317,14 @@ QString NameRegExp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
negativeSigns.replace('-', "\\-");
|
negativeSigns.replace('-', QLatin1String("\\-"));
|
||||||
groupSeparators.remove('\'');
|
groupSeparators.remove('\'');
|
||||||
|
|
||||||
//Same regexp in pattern.xsd shema file. Don't forget to synchronize.
|
//Same regexp in pattern.xsd shema file. Don't forget to synchronize.
|
||||||
// \p{Nd} - \p{Decimal_Digit_Number}
|
// \p{Nd} - \p{Decimal_Digit_Number}
|
||||||
// \p{Zs} - \p{Space_Separator}
|
// \p{Zs} - \p{Space_Separator}
|
||||||
regex = QString("^([^\\p{Nd}\\p{Zs}*/&|!<>^\\()%1%2%3%4=?:;'\"]){1,1}"
|
regex = QString("^([^\\p{Nd}\\p{Zs}*/&|!<>^\n\\()%1%2%3%4=?:;'\"]){1,1}"
|
||||||
"([^\\p{Zs}*/&|!<>^\\()%1%2%3%4=?:;\"]){0,}$")
|
"([^\\p{Zs}*/&|!<>^\n\\()%1%2%3%4=?:;\"]){0,}$")
|
||||||
.arg(negativeSigns, positiveSigns, decimalPoints, groupSeparators);
|
.arg(negativeSigns, positiveSigns, decimalPoints, groupSeparators);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ void VMeasurements::ReadMeasurements(qreal height, qreal size) const
|
||||||
{
|
{
|
||||||
const QDomElement dom = list.at(i).toElement();
|
const QDomElement dom = list.at(i).toElement();
|
||||||
|
|
||||||
const QString name = GetParametrString(dom, AttrName);
|
const QString name = GetParametrString(dom, AttrName).simplified();
|
||||||
const QString description = GetParametrEmptyString(dom, AttrDescription);
|
const QString description = GetParametrEmptyString(dom, AttrDescription);
|
||||||
const QString fullName = GetParametrEmptyString(dom, AttrFullName);
|
const QString fullName = GetParametrEmptyString(dom, AttrFullName);
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ QString VInternalVariable::GetName() const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VInternalVariable::SetName(const QString &name)
|
void VInternalVariable::SetName(const QString &name)
|
||||||
{
|
{
|
||||||
d->name = name;
|
d->name = name.simplified();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user