[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Wed Aug 10 22:52:36 UTC 2016
sc/source/filter/xml/xmlimprt.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit a97e6990435bbc47be4a4f6f349404f438e2c315
Author: Eike Rathke <erack at 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
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 7021f81..5422231 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2689,6 +2689,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;
More information about the Libreoffice-commits
mailing list