bump product version to 5.0.4.1
[LibreOffice.git] / i18npool / inc / defaultnumberingprovider.hxx
blob2ec0c0a2e049ee1e7184ba6a5359ef01dd7c1012
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_I18NPOOL_INC_DEFAULTNUMBERINGPROVIDER_HXX
20 #define INCLUDED_I18NPOOL_INC_DEFAULTNUMBERINGPROVIDER_HXX
22 #include <com/sun/star/text/XDefaultNumberingProvider.hpp>
23 #include <com/sun/star/text/XNumberingFormatter.hpp>
24 #include <com/sun/star/text/XNumberingTypeInfo.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <cppuhelper/implbase4.hxx>
27 #include <com/sun/star/i18n/XTransliteration.hpp>
28 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
30 #include <transliterationImpl.hxx>
32 namespace com { namespace sun { namespace star { namespace i18n {
34 class DefaultNumberingProvider : public cppu::WeakImplHelper4
36 com::sun::star::text::XDefaultNumberingProvider,
37 com::sun::star::text::XNumberingFormatter,
38 com::sun::star::text::XNumberingTypeInfo,
39 com::sun::star::lang::XServiceInfo
42 void GetCharStrN( sal_Int32 nValue, sal_Int16 nType, OUString& rStr ) const;
43 void GetCharStr( sal_Int32 nValue, sal_Int16 nType, OUString& rStr ) const;
44 void GetRomanString( sal_Int32 nValue, sal_Int16 nType, OUString& rStr ) const;
45 void impl_loadTranslit();
46 public:
47 DefaultNumberingProvider(
48 const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext );
49 virtual ~DefaultNumberingProvider();
51 //XDefaultNumberingProvider
52 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
53 com::sun::star::container::XIndexAccess > > SAL_CALL
54 getDefaultOutlineNumberings( const com::sun::star::lang::Locale& aLocale )
55 throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Sequence<
58 com::sun::star::beans::PropertyValue > > SAL_CALL
59 getDefaultContinuousNumberingLevels( const com::sun::star::lang::Locale& aLocale )
60 throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 //XNumberingFormatter
63 virtual OUString SAL_CALL makeNumberingString(
64 const com::sun::star::uno::Sequence<
65 com::sun::star::beans::PropertyValue >& aProperties,
66 const com::sun::star::lang::Locale& aLocale )
67 throw(com::sun::star::lang::IllegalArgumentException,
68 com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 //XNumberingTypeInfo
71 virtual com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes( )
72 throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 virtual sal_Int16 SAL_CALL getNumberingType( const OUString& NumberingIdentifier )
74 throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 virtual sal_Bool SAL_CALL hasNumberingType( const OUString& NumberingIdentifier )
76 throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 virtual OUString SAL_CALL getNumberingIdentifier( sal_Int16 NumberingType )
78 throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 //XServiceInfo
81 virtual OUString SAL_CALL getImplementationName()
82 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
83 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName)
84 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
85 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
86 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
87 private:
88 com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
89 com::sun::star::uno::Reference < com::sun::star::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
90 TransliterationImpl* translit;
91 OUString SAL_CALL makeNumberingIdentifier( sal_Int16 index )
92 throw(com::sun::star::uno::RuntimeException);
93 bool SAL_CALL isScriptFlagEnabled(const OUString& aName )
94 throw(com::sun::star::uno::RuntimeException);
96 } } } }
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */