diff options
author | Eike Rathke <erack@redhat.com> | 2012-01-17 13:21:19 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-01-17 13:22:06 +0100 |
commit | b5ea4471ad64cec7eda82727b6ff59c57e44eac4 (patch) | |
tree | 2eb527380fcab0dab948d20bcc2aa593460d7542 /i18npool | |
parent | d553f0bdd877cf11bb70e09ccd1fe2725f229732 (diff) |
added element name check for LC_FORMAT
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 6938e9ecb835..dd07dfe875dd 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -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; |