diff options
author | Bustamam Harun <bustamam@openoffice.org> | 2001-08-30 22:33:17 +0000 |
---|---|---|
committer | Bustamam Harun <bustamam@openoffice.org> | 2001-08-30 22:33:17 +0000 |
commit | 1395c46dcc16501335aa67ce9c0799cf05ff7eea (patch) | |
tree | 0aed1027bea2901e2d1119341d3bddbeaae5a732 /i18npool/inc/numberformatcode.hxx | |
parent | 675183881668debcab03cfccadf11bc117919a58 (diff) |
Add localedata, registerservices, numberformatcode, defaultnumberingprovider
Diffstat (limited to 'i18npool/inc/numberformatcode.hxx')
-rw-r--r-- | i18npool/inc/numberformatcode.hxx | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/i18npool/inc/numberformatcode.hxx b/i18npool/inc/numberformatcode.hxx new file mode 100644 index 000000000000..2c1871318ea5 --- /dev/null +++ b/i18npool/inc/numberformatcode.hxx @@ -0,0 +1,66 @@ +/************************************************************************* +#* +#* $RCSfile: numberformatcode.hxx,v $ +#* +#* NumberFormatCodeMapper +#* +#* Creation: SSE 08/12/2000 +#* +#* Last change: $Author: bustamam $ $Date: 2001-08-30 23:33:16 $ +#* +#* $Revision: 1.1 $ +#* +#* $Source: /zpool/svn/migration/cvs_rep_09_09_08/code/i18npool/inc/numberformatcode.hxx,v $ +#* +#* Copyright (c) 2000 Sun Microsystems Inc. +#* +#*************************************************************************/ + +#ifndef _I18N_NUMBERFORMATCODE_HXX_ +#define _I18N_NUMBERFORMATCODE_HXX_ + +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <comphelper/processfactory.hxx> +#include <cppuhelper/implbase1.hxx> // helper for implementations + +#include <com/sun/star/i18n/XNumberFormatCode.hpp> +#include <com/sun/star/i18n/XLocaleData.hpp> + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + + +class NumberFormatCodeMapper : public cppu::WeakImplHelper1 +< + ::com::sun::star::i18n::XNumberFormatCode +> +{ +public: + NumberFormatCodeMapper( const ::com::sun::star::uno::Reference < + ::com::sun::star::lang::XMultiServiceFactory >& rxMSF ); + ~NumberFormatCodeMapper(); + + virtual ::com::sun::star::i18n::NumberFormatCode SAL_CALL getDefault( sal_Int16 nFormatType, sal_Int16 nFormatUsage, const ::com::sun::star::lang::Locale& rLocale ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::i18n::NumberFormatCode SAL_CALL getFormatCode( sal_Int16 nFormatIndex, const ::com::sun::star::lang::Locale& rLocale ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::NumberFormatCode > SAL_CALL getAllFormatCode( sal_Int16 nFormatUsage, const ::com::sun::star::lang::Locale& rLocale ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::NumberFormatCode > SAL_CALL getAllFormatCodes( const ::com::sun::star::lang::Locale& rLocale ) throw(::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::lang::Locale aLocale; + ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > xMSF; + ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::FormatElement > aFormatSeq; + ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XLocaleData > xlocaleData; + sal_Bool bFormatsValid; + + void setupLocale( const ::com::sun::star::lang::Locale& rLocale ); + void getFormats( const ::com::sun::star::lang::Locale& rLocale ); + ::rtl::OUString mapElementTypeShortToString(sal_Int16 formatType); + sal_Int16 mapElementTypeStringToShort(const ::rtl::OUString& formatType); + ::rtl::OUString mapElementUsageShortToString(sal_Int16 formatUsage); + sal_Int16 mapElementUsageStringToShort(const ::rtl::OUString& formatUsage); + void createLocaleDataObject(); +}; + + +#endif // _I18N_NUMBERFORMATCODE_HXX_ |