[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source
Eike Rathke
erack at redhat.com
Thu Aug 11 20:17:28 UTC 2016
sc/source/filter/xml/xmlimprt.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 553f61ccf4cd9ea062c40ccd6de86b76b5497aeb
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
(cherry picked from commit a97e6990435bbc47be4a4f6f349404f438e2c315)
Reviewed-on: https://gerrit.libreoffice.org/28040
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at 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;
More information about the Libreoffice-commits
mailing list