update dev300-m58
[ooovba.git] / i18npool / inc / defaultnumberingprovider.hxx
blob355e083b817b73222935e8d95b4314bfe41895f7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: defaultnumberingprovider.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _I18N_DEFAULT_NUMBERING_PROVIDER_HXX_
31 #define _I18N_DEFAULT_NUMBERING_PROVIDER_HXX_
33 #include <com/sun/star/text/XDefaultNumberingProvider.hpp>
34 #include <com/sun/star/text/XNumberingFormatter.hpp>
35 #include <com/sun/star/text/XNumberingTypeInfo.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 #include <cppuhelper/implbase4.hxx>
38 #include <com/sun/star/i18n/XTransliteration.hpp>
39 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
41 #include <transliterationImpl.hxx>
43 namespace com { namespace sun { namespace star { namespace i18n {
45 class DefaultNumberingProvider : public cppu::WeakImplHelper4
47 com::sun::star::text::XDefaultNumberingProvider,
48 com::sun::star::text::XNumberingFormatter,
49 com::sun::star::text::XNumberingTypeInfo,
50 com::sun::star::lang::XServiceInfo
53 void GetCharStrN( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
54 void GetCharStr( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
55 void GetRomanString( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
56 void impl_loadTranslit();
57 public:
58 DefaultNumberingProvider(
59 const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& xMSF );
60 ~DefaultNumberingProvider();
62 //XDefaultNumberingProvider
63 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
64 com::sun::star::container::XIndexAccess > > SAL_CALL
65 getDefaultOutlineNumberings( const com::sun::star::lang::Locale& aLocale )
66 throw(com::sun::star::uno::RuntimeException);
68 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Sequence<
69 com::sun::star::beans::PropertyValue > > SAL_CALL
70 getDefaultContinuousNumberingLevels( const com::sun::star::lang::Locale& aLocale )
71 throw(com::sun::star::uno::RuntimeException);
73 //XNumberingFormatter
74 virtual rtl::OUString SAL_CALL makeNumberingString(
75 const com::sun::star::uno::Sequence<
76 com::sun::star::beans::PropertyValue >& aProperties,
77 const com::sun::star::lang::Locale& aLocale )
78 throw(com::sun::star::lang::IllegalArgumentException,
79 com::sun::star::uno::RuntimeException);
81 //XNumberingTypeInfo
82 virtual com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes( )
83 throw(com::sun::star::uno::RuntimeException);
84 virtual sal_Int16 SAL_CALL getNumberingType( const rtl::OUString& NumberingIdentifier )
85 throw(com::sun::star::uno::RuntimeException);
86 virtual sal_Bool SAL_CALL hasNumberingType( const rtl::OUString& NumberingIdentifier )
87 throw(com::sun::star::uno::RuntimeException);
88 virtual rtl::OUString SAL_CALL getNumberingIdentifier( sal_Int16 NumberingType )
89 throw(com::sun::star::uno::RuntimeException);
91 //XServiceInfo
92 virtual rtl::OUString SAL_CALL getImplementationName(void)
93 throw( com::sun::star::uno::RuntimeException );
94 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
95 throw( com::sun::star::uno::RuntimeException );
96 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
97 throw( com::sun::star::uno::RuntimeException );
98 private:
99 com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xSMgr;
100 com::sun::star::uno::Reference < com::sun::star::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
101 TransliterationImpl* translit;
102 rtl::OUString SAL_CALL makeNumberingIdentifier( sal_Int16 index )
103 throw(com::sun::star::uno::RuntimeException);
104 sal_Bool SAL_CALL isScriptFlagEnabled(const rtl::OUString& aName )
105 throw(com::sun::star::uno::RuntimeException);
107 } } } }
109 #endif