try {
XNumberFormats xNumberFormats = xNumberFormatsSupplier.getNumberFormats();
XPropertySet docProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, textDocument.getXTextDocument());
Locale docLocale = (Locale) docProps.getPropertyValue("CharLocale");
//XNumberFormatTypes numberFormatTypes = (XNumberFormatTypes)UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats);
int[] keys = xNumberFormats.queryKeys(type,docLocale,true);
List<INumberFormat> formats = new ArrayList<INumberFormat>();
boolean additionalCurrenciesSet = false;
for(int i = 0; i < keys.length; i++) {
int key = keys[i];
XPropertySet xProp = xNumberFormats.getByKey(key);