lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / i18npool / inc / defaultnumberingprovider.hxx
blob1320b7e41a731b296da5b1c8b295a926c0c94dfc
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 <com/sun/star/i18n/XTransliteration.hpp>
27 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
28 #include <cppuhelper/implbase.hxx>
29 #include <rtl/ref.hxx>
31 #include "transliterationImpl.hxx"
33 #include <memory>
35 namespace i18npool {
37 class DefaultNumberingProvider : public cppu::WeakImplHelper
39 css::text::XDefaultNumberingProvider,
40 css::text::XNumberingFormatter,
41 css::text::XNumberingTypeInfo,
42 css::lang::XServiceInfo
45 public:
46 DefaultNumberingProvider(
47 const css::uno::Reference < css::uno::XComponentContext >& rxContext );
48 virtual ~DefaultNumberingProvider() override;
50 //XDefaultNumberingProvider
51 virtual css::uno::Sequence< css::uno::Reference<
52 css::container::XIndexAccess > > SAL_CALL
53 getDefaultOutlineNumberings( const css::lang::Locale& aLocale ) override;
55 virtual css::uno::Sequence< css::uno::Sequence<
56 css::beans::PropertyValue > > SAL_CALL
57 getDefaultContinuousNumberingLevels( const css::lang::Locale& aLocale ) override;
59 //XNumberingFormatter
60 virtual OUString SAL_CALL makeNumberingString(
61 const css::uno::Sequence<
62 css::beans::PropertyValue >& aProperties,
63 const css::lang::Locale& aLocale ) override;
65 //XNumberingTypeInfo
66 virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedNumberingTypes( ) override;
67 virtual sal_Int16 SAL_CALL getNumberingType( const OUString& NumberingIdentifier ) override;
68 virtual sal_Bool SAL_CALL hasNumberingType( const OUString& NumberingIdentifier ) override;
69 virtual OUString SAL_CALL getNumberingIdentifier( sal_Int16 NumberingType ) override;
71 //XServiceInfo
72 virtual OUString SAL_CALL getImplementationName() override;
73 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
74 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
75 private:
76 css::uno::Reference < css::uno::XComponentContext > m_xContext;
77 css::uno::Reference < css::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
78 rtl::Reference<TransliterationImpl> translit;
79 /// @throws css::uno::RuntimeException
80 OUString makeNumberingIdentifier( sal_Int16 index );
81 /// @throws css::uno::RuntimeException
82 bool isScriptFlagEnabled(const OUString& aName );
88 #endif
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */