diff options
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 69360de102a8..05762c6b0c3b 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -617,9 +617,14 @@ void LCFormatNode::generateCode (const OFileWriter &of) const ::std::vector< OUString > theDateAcceptancePatterns; + OUString useLocale(getAttr().getValueByName("ref")); + OUString str; OUString strFrom( getAttr().getValueByName("replaceFrom")); - of.writeParameter("replaceFrom", strFrom, mnSection); + if (useLocale.isEmpty()) + { + of.writeParameter("replaceFrom", strFrom, mnSection); + } str = getAttr().getValueByName("replaceTo"); if (!strFrom.isEmpty() && str.isEmpty()) incErrorStr("replaceFrom=\"%s\" replaceTo=\"\" is empty replacement.", strFrom); @@ -640,9 +645,14 @@ void LCFormatNode::generateCode (const OFileWriter &of) const } } - OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { + if (!strFrom.isEmpty() && strFrom != "[CURRENCY]") //??? + { + incErrorStrStr( + "non-empty replaceFrom=\"%s\" with non-empty ref=\"%s\".", + strFrom, useLocale); + } useLocale = useLocale.replace( '-', '_'); switch (mnSection) { |