| 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 | #ifndef INCLUDED_SW_SOURCE_UI_VBA_VBALISTHELPER_HXX |
| 10 | #define INCLUDED_SW_SOURCE_UI_VBA_VBALISTHELPER_HXX |
| 11 | |
| 12 | #include <com/sun/star/beans/XPropertySet.hpp> |
| 13 | #include <com/sun/star/container/XIndexReplace.hpp> |
| 14 | #include <com/sun/star/container/XNameContainer.hpp> |
| 15 | #include <com/sun/star/text/XTextDocument.hpp> |
| 16 | |
| 17 | #include <memory> |
| 18 | |
| 19 | class SwVbaListHelper; |
| 20 | typedef std::shared_ptr< SwVbaListHelper > SwVbaListHelperRef; |
| 21 | |
| 22 | class SwVbaListHelper |
| 23 | { |
| 24 | private: |
| 25 | css::uno::Reference< css::text::XTextDocument > mxTextDocument; |
| 26 | css::uno::Reference< css::container::XIndexReplace > mxNumberingRules; |
| 27 | css::uno::Reference< css::container::XNameContainer > mxStyleFamily; |
| 28 | css::uno::Reference< css::beans::XPropertySet > mxStyleProps; |
| 29 | sal_Int32 mnGalleryType; |
| 30 | sal_Int32 mnTemplateType; |
| 31 | OUString msStyleName; |
| 32 | |
| 33 | /// @throws css::uno::RuntimeException |
| 34 | void Init(); |
| 35 | /// @throws css::uno::RuntimeException |
| 36 | void CreateListTemplate(); |
| 37 | /// @throws css::uno::RuntimeException |
| 38 | void CreateBulletListTemplate(); |
| 39 | /// @throws css::uno::RuntimeException |
| 40 | void CreateNumberListTemplate(); |
| 41 | /// @throws css::uno::RuntimeException |
| 42 | void CreateOutlineNumberListTemplate(); |
| 43 | /// @throws css::uno::RuntimeException |
| 44 | void CreateOutlineNumberForType1(); |
| 45 | /// @throws css::uno::RuntimeException |
| 46 | void CreateOutlineNumberForType2(); |
| 47 | /// @throws css::uno::RuntimeException |
| 48 | void CreateOutlineNumberForType3(); |
| 49 | /// @throws css::uno::RuntimeException |
| 50 | void CreateOutlineNumberForType4(); |
| 51 | /// @throws css::uno::RuntimeException |
| 52 | void CreateOutlineNumberForType5(); |
| 53 | /// @throws css::uno::RuntimeException |
| 54 | void CreateOutlineNumberForType6(); |
| 55 | /// @throws css::uno::RuntimeException |
| 56 | void CreateOutlineNumberForType7(); |
| 57 | |
| 58 | public: |
| 59 | /// @throws css::uno::RuntimeException |
| 60 | SwVbaListHelper( css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ); |
| 61 | |
| 62 | sal_Int32 getGalleryType() const { return mnGalleryType; } |
| 63 | const css::uno::Reference< css::container::XIndexReplace >& getNumberingRules() const { return mxNumberingRules; } |
| 64 | /// @throws css::uno::RuntimeException |
| 65 | css::uno::Any getPropertyValueWithNameAndLevel( sal_Int32 nLevel, const OUString& sName ); |
| 66 | /// @throws css::uno::RuntimeException |
| 67 | void setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const OUString& sName, const css::uno::Any& aValue ); |
| 68 | |
| 69 | }; |
| 70 | |
| 71 | #endif // INCLUDED_SW_SOURCE_UI_VBA_VBALISTHELPER_HXX |
| 72 | |
| 73 | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |