-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum CurrencySymbolPosition in wrong order #213
Comments
This is an interesting one. The integer values seen in the enumeration are actually correct for MPX files (which is where the code originated 20+ years ago) and are used directly by the MPX reader/writer code. All the other readers and writers that use There's actually no reason for me to maintain these integer values, they are just an implementation detail for the MPX file handling so I may well remove them and make |
mpxj version : 9.0.0
Impacted file : CurrencySymbolPosition.java
Actually the CurrencySymbolPosition enum is in this order :
AFTER(0), BEFORE(1), AFTER_WITH_SPACE(2), BEFORE_WITH_SPACE(3);
But it has to be in this order :
BEFORE(0), AFTER(1), BEFORE_WITH_SPACE(2), AFTER_WITH_SPACE(3);
There is no impact when exporting to XML file because the DataTypeConverter is ok :
private static final Map<String, CurrencySymbolPosition> MAP_TO_CURRENCY_SYMBOL_POSITION = new HashMap<>(); static { MAP_TO_CURRENCY_SYMBOL_POSITION.put("0", CurrencySymbolPosition.BEFORE); MAP_TO_CURRENCY_SYMBOL_POSITION.put("1", CurrencySymbolPosition.AFTER); MAP_TO_CURRENCY_SYMBOL_POSITION.put("2", CurrencySymbolPosition.BEFORE_WITH_SPACE); MAP_TO_CURRENCY_SYMBOL_POSITION.put("3", CurrencySymbolPosition.AFTER_WITH_SPACE); }
I didn't check if this bug has an impact when importing project.
The text was updated successfully, but these errors were encountered: