Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / include / editeng / justifyitem.hxx
blob467b0ae4a51c9797f96dc3806200bff0b80909e7
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 .
20 #ifndef INCLUDED_EDITENG_JUSTIFYITEM_HXX
21 #define INCLUDED_EDITENG_JUSTIFYITEM_HXX
23 #include <editeng/editengdllapi.h>
24 #include <editeng/svxenum.hxx>
25 #include <svl/eitem.hxx>
26 #include <sal/types.h>
28 class EDITENG_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem
30 public:
31 static SfxPoolItem* CreateDefault();
33 explicit SvxHorJustifyItem( const sal_uInt16 nId );
35 SvxHorJustifyItem(
36 const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/,
37 const sal_uInt16 nId );
39 virtual bool GetPresentation( SfxItemPresentation ePres,
40 SfxMapUnit eCoreMetric,
41 SfxMapUnit ePresMetric,
42 OUString &rText, const IntlWrapper * = nullptr ) const override;
44 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
45 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
47 virtual sal_uInt16 GetValueCount() const override;
48 static OUString GetValueText( sal_uInt16 nVal );
49 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
50 virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
52 inline SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify)
54 SetValue( rHorJustify.GetValue() );
55 return *this;
60 class EDITENG_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem
62 public:
63 static SfxPoolItem* CreateDefault();
65 explicit SvxVerJustifyItem( const sal_uInt16 nId );
67 SvxVerJustifyItem(
68 const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/,
69 const sal_uInt16 nId );
71 virtual bool GetPresentation( SfxItemPresentation ePres,
72 SfxMapUnit eCoreMetric,
73 SfxMapUnit ePresMetric,
74 OUString &rText, const IntlWrapper * = nullptr ) const override;
76 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
77 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
79 virtual sal_uInt16 GetValueCount() const override;
80 static OUString GetValueText( sal_uInt16 nVal );
81 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
82 virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
84 inline SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify)
86 SetValue( rVerJustify.GetValue() );
87 return *this;
92 class EDITENG_DLLPUBLIC SvxJustifyMethodItem: public SfxEnumItem
94 public:
95 SvxJustifyMethodItem(
96 const SvxCellJustifyMethod eMethod,
97 const sal_uInt16 nId );
99 virtual bool GetPresentation( SfxItemPresentation ePres,
100 SfxMapUnit eCoreMetric,
101 SfxMapUnit ePresMetric,
102 OUString &rText, const IntlWrapper * = nullptr ) const override;
104 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
105 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
107 virtual sal_uInt16 GetValueCount() const override;
108 static OUString GetValueText( sal_uInt16 nVal );
109 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
110 virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override;
112 SvxJustifyMethodItem& operator=(const SvxJustifyMethodItem& r);
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */