Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HDL
2 : #define INCLUDED_COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HDL
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/uno/RuntimeException.hdl"
7 : #include "com/sun/star/uno/XInterface.hdl"
8 : #include "com/sun/star/util/Color.hdl"
9 : #include "com/sun/star/util/NotNumericException.hdl"
10 : namespace com { namespace sun { namespace star { namespace util { class XNumberFormatsSupplier; } } } }
11 : #include "com/sun/star/uno/Reference.h"
12 : #include "cppu/macros.hxx"
13 : #include "rtl/ustring.hxx"
14 : #include "sal/types.h"
15 :
16 : namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
17 :
18 : namespace com { namespace sun { namespace star { namespace util {
19 :
20 53 : class SAL_NO_VTABLE XNumberFormatter : public css::uno::XInterface
21 : {
22 : public:
23 :
24 : // Methods
25 : virtual void SAL_CALL attachNumberFormatsSupplier( const ::com::sun::star::uno::Reference< css::util::XNumberFormatsSupplier >& xSupplier ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
26 : virtual ::com::sun::star::uno::Reference< css::util::XNumberFormatsSupplier > SAL_CALL getNumberFormatsSupplier() /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
27 : virtual ::sal_Int32 SAL_CALL detectNumberFormat( ::sal_Int32 nKey, const ::rtl::OUString& aString ) /* throw (css::util::NotNumericException, ::com::sun::star::uno::RuntimeException) */ = 0;
28 : virtual double SAL_CALL convertStringToNumber( ::sal_Int32 nKey, const ::rtl::OUString& aString ) /* throw (css::util::NotNumericException, ::com::sun::star::uno::RuntimeException) */ = 0;
29 : virtual ::rtl::OUString SAL_CALL convertNumberToString( ::sal_Int32 nKey, double fValue ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
30 : virtual ::sal_Int32 SAL_CALL queryColorForNumber( ::sal_Int32 nKey, double fValue, ::sal_Int32 aDefaultColor ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
31 : virtual ::rtl::OUString SAL_CALL formatString( ::sal_Int32 nKey, const ::rtl::OUString& aString ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
32 : virtual ::sal_Int32 SAL_CALL queryColorForString( ::sal_Int32 nKey, const ::rtl::OUString& aString, ::sal_Int32 aDefaultColor ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
33 : virtual ::rtl::OUString SAL_CALL getInputString( ::sal_Int32 nKey, double fValue ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
34 :
35 : static inline ::com::sun::star::uno::Type const & SAL_CALL static_type(void * = 0);
36 :
37 : protected:
38 48 : ~XNumberFormatter() throw () {} // avoid warnings about virtual members and non-virtual dtor
39 : };
40 :
41 :
42 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::util::XNumberFormatter const *);
43 : } } } }
44 :
45 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(const ::com::sun::star::uno::Reference< css::util::XNumberFormatter > *) SAL_THROW(());
46 :
47 : #endif
|