/src/libreoffice/include/editeng/justifyitem.hxx
Line | Count | Source |
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 | | |
20 | | #ifndef INCLUDED_EDITENG_JUSTIFYITEM_HXX |
21 | | #define INCLUDED_EDITENG_JUSTIFYITEM_HXX |
22 | | |
23 | | #include <editeng/editengdllapi.h> |
24 | | #include <editeng/svxenum.hxx> |
25 | | #include <svl/eitem.hxx> |
26 | | #include <sal/types.h> |
27 | | |
28 | | class EDITENG_DLLPUBLIC SvxHorJustifyItem final : public SfxEnumItem<SvxCellHorJustify> |
29 | | { |
30 | | public: |
31 | | static SfxPoolItem* CreateDefault(); |
32 | | |
33 | | DECLARE_ITEM_TYPE_FUNCTION(SvxHorJustifyItem) |
34 | | explicit SvxHorJustifyItem( const sal_uInt16 nId ); |
35 | | |
36 | | SvxHorJustifyItem( |
37 | | const SvxCellHorJustify eJustify /*= SvxCellHorJustify::Standard*/, |
38 | | const sal_uInt16 nId ); |
39 | | |
40 | | virtual bool GetPresentation( SfxItemPresentation ePres, |
41 | | MapUnit eCoreMetric, |
42 | | MapUnit ePresMetric, |
43 | | OUString &rText, const IntlWrapper& ) const override; |
44 | | |
45 | | virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; |
46 | | virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; |
47 | | |
48 | | static OUString GetValueText( SvxCellHorJustify nVal ); |
49 | | virtual SvxHorJustifyItem* Clone( SfxItemPool *pPool = nullptr ) const override; |
50 | | |
51 | 790k | SvxHorJustifyItem(SvxHorJustifyItem const &) = default; // SfxPoolItem copy function dichotomy |
52 | | }; |
53 | | |
54 | | |
55 | | class EDITENG_DLLPUBLIC SvxVerJustifyItem final : public SfxEnumItem<SvxCellVerJustify> |
56 | | { |
57 | | public: |
58 | | static SfxPoolItem* CreateDefault(); |
59 | | |
60 | | DECLARE_ITEM_TYPE_FUNCTION(SvxVerJustifyItem) |
61 | | explicit SvxVerJustifyItem( const sal_uInt16 nId ); |
62 | | |
63 | | SvxVerJustifyItem( |
64 | | const SvxCellVerJustify eJustify, |
65 | | const sal_uInt16 nId ); |
66 | | |
67 | | virtual bool GetPresentation( SfxItemPresentation ePres, |
68 | | MapUnit eCoreMetric, |
69 | | MapUnit ePresMetric, |
70 | | OUString &rText, const IntlWrapper& ) const override; |
71 | | |
72 | | virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; |
73 | | virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; |
74 | | |
75 | | static OUString GetValueText( SvxCellVerJustify nVal ); |
76 | | virtual SvxVerJustifyItem* Clone( SfxItemPool *pPool = nullptr ) const override; |
77 | | |
78 | 758k | SvxVerJustifyItem(SvxVerJustifyItem const &) = default; // SfxPoolItem copy function dichotomy |
79 | | }; |
80 | | |
81 | | |
82 | | class EDITENG_DLLPUBLIC SvxJustifyMethodItem final : public SfxEnumItem<SvxCellJustifyMethod> |
83 | | { |
84 | | public: |
85 | | DECLARE_ITEM_TYPE_FUNCTION(SvxJustifyMethodItem) |
86 | | SvxJustifyMethodItem( |
87 | | const SvxCellJustifyMethod eMethod, |
88 | | const sal_uInt16 nId ); |
89 | | |
90 | | virtual bool GetPresentation( SfxItemPresentation ePres, |
91 | | MapUnit eCoreMetric, |
92 | | MapUnit ePresMetric, |
93 | | OUString &rText, const IntlWrapper& ) const override; |
94 | | |
95 | | virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; |
96 | | virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; |
97 | | |
98 | | static OUString GetValueText( SvxCellJustifyMethod nVal ); |
99 | | virtual SvxJustifyMethodItem* Clone( SfxItemPool *pPool = nullptr ) const override; |
100 | | }; |
101 | | |
102 | | #endif |
103 | | |
104 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |