added element name check for LC_FORMAT
This commit is contained in:
parent
d553f0bdd8
commit
b5ea4471ad
1 changed files with 8 additions and 2 deletions
|
@ -601,7 +601,6 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
|
|||
static OUString sTheCurrencyReplaceTo;
|
||||
static OUString sTheCompatibleCurrency;
|
||||
static OUString sTheDateEditFormat;
|
||||
static ::std::vector< OUString > theDateAcceptancePatterns;
|
||||
|
||||
sal_Int16 LCFormatNode::mnSection = 0;
|
||||
sal_Int16 LCFormatNode::mnFormats = 0;
|
||||
|
@ -611,7 +610,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
|
|||
if (mnSection >= 2)
|
||||
incError("more than 2 LC_FORMAT sections");
|
||||
|
||||
theDateAcceptancePatterns.clear();
|
||||
::std::vector< OUString > theDateAcceptancePatterns;
|
||||
|
||||
OUString str;
|
||||
OUString strFrom( getAttr().getValueByName("replaceFrom"));
|
||||
|
@ -670,6 +669,13 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
|
|||
--formatCount;
|
||||
continue; // for
|
||||
}
|
||||
if (!currNode->getName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FormatElement")))
|
||||
{
|
||||
incErrorStr( "Undefined element in LC_FORMAT", currNode->getName());
|
||||
--formatCount;
|
||||
continue; // for
|
||||
}
|
||||
|
||||
OUString aUsage;
|
||||
OUString aType;
|
||||
OUString aFormatIndex;
|
||||
|
|
Loading…
Reference in a new issue