1*f7bd9df4SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f7bd9df4SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f7bd9df4SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f7bd9df4SAndrew Rist  * distributed with this work for additional information
6*f7bd9df4SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f7bd9df4SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f7bd9df4SAndrew Rist  * "License"); you may not use this file except in compliance
9*f7bd9df4SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*f7bd9df4SAndrew Rist  *
11*f7bd9df4SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*f7bd9df4SAndrew Rist  *
13*f7bd9df4SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f7bd9df4SAndrew Rist  * software distributed under the License is distributed on an
15*f7bd9df4SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f7bd9df4SAndrew Rist  * KIND, either express or implied.  See the License for the
17*f7bd9df4SAndrew Rist  * specific language governing permissions and limitations
18*f7bd9df4SAndrew Rist  * under the License.
19*f7bd9df4SAndrew Rist  *
20*f7bd9df4SAndrew Rist  *************************************************************/
21*f7bd9df4SAndrew Rist 
22*f7bd9df4SAndrew Rist 
23cdf0e10cSrcweir #ifndef _I18N_DEFAULT_NUMBERING_PROVIDER_HXX_
24cdf0e10cSrcweir #define _I18N_DEFAULT_NUMBERING_PROVIDER_HXX_
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/text/XDefaultNumberingProvider.hpp>
27cdf0e10cSrcweir #include <com/sun/star/text/XNumberingFormatter.hpp>
28cdf0e10cSrcweir #include <com/sun/star/text/XNumberingTypeInfo.hpp>
29cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
30cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx>
31cdf0e10cSrcweir #include <com/sun/star/i18n/XTransliteration.hpp>
32cdf0e10cSrcweir #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <transliterationImpl.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace i18n {
37cdf0e10cSrcweir 
38cdf0e10cSrcweir class DefaultNumberingProvider : public cppu::WeakImplHelper4
39cdf0e10cSrcweir <
40cdf0e10cSrcweir 	com::sun::star::text::XDefaultNumberingProvider,
41cdf0e10cSrcweir 	com::sun::star::text::XNumberingFormatter,
42cdf0e10cSrcweir 	com::sun::star::text::XNumberingTypeInfo,
43cdf0e10cSrcweir 	com::sun::star::lang::XServiceInfo
44cdf0e10cSrcweir >
45cdf0e10cSrcweir {
46cdf0e10cSrcweir 	void GetCharStrN( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
47cdf0e10cSrcweir 	void GetCharStr( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
48cdf0e10cSrcweir 	void GetRomanString( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
49cdf0e10cSrcweir     void impl_loadTranslit();
50cdf0e10cSrcweir public:
51cdf0e10cSrcweir 	DefaultNumberingProvider(
52cdf0e10cSrcweir 		const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& xMSF );
53cdf0e10cSrcweir 	~DefaultNumberingProvider();
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 	//XDefaultNumberingProvider
56cdf0e10cSrcweir 	virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
57cdf0e10cSrcweir 		com::sun::star::container::XIndexAccess > > SAL_CALL
58cdf0e10cSrcweir 		getDefaultOutlineNumberings( const com::sun::star::lang::Locale& aLocale )
59cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	virtual com::sun::star::uno::Sequence< com::sun::star::uno::Sequence<
62cdf0e10cSrcweir 		com::sun::star::beans::PropertyValue > > SAL_CALL
63cdf0e10cSrcweir 		getDefaultContinuousNumberingLevels( const com::sun::star::lang::Locale& aLocale )
64cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	//XNumberingFormatter
67cdf0e10cSrcweir 	virtual rtl::OUString SAL_CALL makeNumberingString(
68cdf0e10cSrcweir 		const com::sun::star::uno::Sequence<
69cdf0e10cSrcweir 		com::sun::star::beans::PropertyValue >& aProperties,
70cdf0e10cSrcweir 		const com::sun::star::lang::Locale& aLocale )
71cdf0e10cSrcweir 		throw(com::sun::star::lang::IllegalArgumentException,
72cdf0e10cSrcweir 		com::sun::star::uno::RuntimeException);
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	//XNumberingTypeInfo
75cdf0e10cSrcweir 	virtual com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes(  )
76cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
77cdf0e10cSrcweir 	virtual sal_Int16 SAL_CALL getNumberingType( const rtl::OUString& NumberingIdentifier )
78cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
79cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasNumberingType( const rtl::OUString& NumberingIdentifier )
80cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
81cdf0e10cSrcweir 	virtual rtl::OUString SAL_CALL getNumberingIdentifier( sal_Int16 NumberingType )
82cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 	//XServiceInfo
85cdf0e10cSrcweir 	virtual rtl::OUString SAL_CALL getImplementationName(void)
86cdf0e10cSrcweir                 throw( com::sun::star::uno::RuntimeException );
87cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
88cdf0e10cSrcweir                 throw( com::sun::star::uno::RuntimeException );
89cdf0e10cSrcweir 	virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
90cdf0e10cSrcweir                 throw( com::sun::star::uno::RuntimeException );
91cdf0e10cSrcweir private:
92cdf0e10cSrcweir 	com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xSMgr;
93cdf0e10cSrcweir 	com::sun::star::uno::Reference < com::sun::star::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
94cdf0e10cSrcweir 	TransliterationImpl* translit;
95cdf0e10cSrcweir 	rtl::OUString SAL_CALL makeNumberingIdentifier( sal_Int16 index )
96cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
97cdf0e10cSrcweir 	sal_Bool SAL_CALL isScriptFlagEnabled(const rtl::OUString& aName )
98cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
99cdf0e10cSrcweir };
100cdf0e10cSrcweir } } } }
101cdf0e10cSrcweir 
102cdf0e10cSrcweir #endif
103