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