LibreOffice Module i18npool (master) 1
defaultnumberingprovider.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
22#include <com/sun/star/text/XNumberingFormatter.hpp>
23#include <com/sun/star/text/XNumberingTypeInfo.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <rtl/ref.hxx>
27#include <map>
28
29namespace com::sun::star::container { class XHierarchicalNameAccess; }
30namespace com::sun::star::uno { class XComponentContext; }
31namespace i18npool {
32 class TransliterationImpl;
33 class NativeNumberSupplierService;
34 struct Supported_NumberingType;
35}
36
37namespace i18npool {
38
39class DefaultNumberingProvider final : public cppu::WeakImplHelper
40<
41 css::text::XDefaultNumberingProvider,
42 css::text::XNumberingFormatter,
43 css::text::XNumberingTypeInfo,
44 css::lang::XServiceInfo
45>
46{
47public:
49 const css::uno::Reference < css::uno::XComponentContext >& rxContext );
50 virtual ~DefaultNumberingProvider() override;
51
52 //XDefaultNumberingProvider
53 virtual css::uno::Sequence< css::uno::Reference<
54 css::container::XIndexAccess > > SAL_CALL
55 getDefaultOutlineNumberings( const css::lang::Locale& aLocale ) override;
56
57 virtual css::uno::Sequence< css::uno::Sequence<
58 css::beans::PropertyValue > > SAL_CALL
59 getDefaultContinuousNumberingLevels( const css::lang::Locale& aLocale ) override;
60
61 //XNumberingFormatter
62 virtual OUString SAL_CALL makeNumberingString(
63 const css::uno::Sequence<
64 css::beans::PropertyValue >& aProperties,
65 const css::lang::Locale& aLocale ) override;
66
67 //XNumberingTypeInfo
68 virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes( ) override;
69 virtual sal_Int16 SAL_CALL getNumberingType( const OUString& NumberingIdentifier ) override;
70 virtual sal_Bool SAL_CALL hasNumberingType( const OUString& NumberingIdentifier ) override;
71 virtual OUString SAL_CALL getNumberingIdentifier( sal_Int16 NumberingType ) override;
72
73 //XServiceInfo
74 virtual OUString SAL_CALL getImplementationName() override;
75 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
76 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
77private:
78 css::uno::Reference < css::uno::XComponentContext > m_xContext;
79 css::uno::Reference < css::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
82 std::map<OUString, const Supported_NumberingType*> maSupportedTypesCache;
83
85 OUString makeNumberingIdentifier( sal_Int16 index );
87 bool isScriptFlagEnabled(const OUString& aName );
88};
89
90}
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PropertiesInfo aProperties
std::map< OUString, const Supported_NumberingType * > maSupportedTypesCache
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes() override
virtual OUString SAL_CALL getNumberingIdentifier(sal_Int16 NumberingType) override
bool isScriptFlagEnabled(const OUString &aName)
virtual sal_Bool SAL_CALL hasNumberingType(const OUString &NumberingIdentifier) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
css::uno::Reference< css::container::XHierarchicalNameAccess > xHierarchicalNameAccess
DefaultNumberingProvider(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual sal_Int16 SAL_CALL getNumberingType(const OUString &NumberingIdentifier) override
rtl::Reference< TransliterationImpl > translit
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
rtl::Reference< NativeNumberSupplierService > mxNatNum
virtual css::uno::Sequence< css::uno::Reference< css::container::XIndexAccess > > SAL_CALL getDefaultOutlineNumberings(const css::lang::Locale &aLocale) override
virtual OUString SAL_CALL makeNumberingString(const css::uno::Sequence< css::beans::PropertyValue > &aProperties, const css::lang::Locale &aLocale) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getDefaultContinuousNumberingLevels(const css::lang::Locale &aLocale) override
Constant values shared between i18npool and, for example, the number formatter.
unsigned char sal_Bool