sc/source/filter/xml/xmlimprt.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit 553f61ccf4cd9ea062c40ccd6de86b76b5497aeb Author: Eike Rathke <er...@redhat.com> Date: Thu Aug 11 00:34:54 2016 +0200 recognize another release's unknown currency saved as symbol we know This may happen when saving a currency with a changed symbol in the current release, load it in an older release, save it there and load it again in the newer release. For example DKK [$kr.-406] #.##0,00;[RED][$kr.-406] -#.##0,00 new in master/5.3 (changed symbol from 'kr' to 'kr.') loaded and saved in earlier releases writes currency 'kr.' instead of 'DKK' reloaded in master since there was no match as currency lead to number format #.##0,00 [$kr.] Change-Id: I5c8f165a2f420d77f5a2c0921c33a57797f92526 (cherry picked from commit a97e6990435bbc47be4a4f6f349404f438e2c315) Reviewed-on: https://gerrit.libreoffice.org/28040 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index ea8bacf..524892f 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2691,6 +2691,15 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString { if (sCurrentCurrency.equals(sTemp)) return true; + // A release that saved an unknown currency may have + // saved the currency symbol of the number format + // instead of an ISO code bank symbol. In another + // release we may have a match for that. In this case + // sCurrentCurrency is the ISO code obtained through + // XMLNumberFormatAttributesExportHelper::GetCellType() + // and sBankSymbol is the currency symbol. + if (sCurrentCurrency.getLength() == 3 && sBankSymbol.equals(sTemp)) + return true; // #i61657# This may be a legacy currency symbol that changed in the meantime. if (SvNumberFormatter::GetLegacyOnlyCurrencyEntry( sCurrentCurrency, sBankSymbol) != nullptr) return true;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits