Package com.sun.star.util

Examples of com.sun.star.util.XNumberFormatTypes


                // spezial case rpt:now() (default date format)
                if (_sFormattedfield.equals("rpt:now()"))
                {
                    XNumberFormatsSupplier x = xFormattedField.getFormatsSupplier();
                    XNumberFormats xFormats = x.getNumberFormats();
                    XNumberFormatTypes x3 = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xFormats);
                    Locale.getDefault();
                    com.sun.star.lang.Locale aLocale = new com.sun.star.lang.Locale();
                    aLocale.Country = Locale.getDefault().getCountry();
                    aLocale.Language = Locale.getDefault().getLanguage();

                    int nFormat = x3.getStandardFormat(com.sun.star.util.NumberFormat.DATE, aLocale);
                    xFormattedField.setFormatKey(nFormat);
                }
                _xSection.add(xFormattedField);
            }
            catch (com.sun.star.uno.Exception e)
View Full Code Here

TOP

Related Classes of com.sun.star.util.XNumberFormatTypes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.