1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
33 explicit SvxHorJustifyItem( const sal_uInt16 nId
);
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
* = 0 ) const SAL_OVERRIDE
;
44 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const SAL_OVERRIDE
;
45 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) SAL_OVERRIDE
;
47 virtual sal_uInt16
GetValueCount() const SAL_OVERRIDE
;
48 static OUString
GetValueText( sal_uInt16 nVal
);
49 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const SAL_OVERRIDE
;
50 virtual SfxPoolItem
* Create( SvStream
& rStream
, sal_uInt16 nVer
) const SAL_OVERRIDE
;
52 inline SvxHorJustifyItem
& operator=(const SvxHorJustifyItem
& rHorJustify
)
54 SetValue( rHorJustify
.GetValue() );
61 class EDITENG_DLLPUBLIC SvxVerJustifyItem
: public SfxEnumItem
66 explicit SvxVerJustifyItem( const sal_uInt16 nId
);
69 const SvxCellVerJustify eJustify
/*= SVX_VER_JUSTIFY_STANDARD*/,
70 const sal_uInt16 nId
);
72 virtual bool GetPresentation( SfxItemPresentation ePres
,
73 SfxMapUnit eCoreMetric
,
74 SfxMapUnit ePresMetric
,
75 OUString
&rText
, const IntlWrapper
* = 0 ) const SAL_OVERRIDE
;
77 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const SAL_OVERRIDE
;
78 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) SAL_OVERRIDE
;
80 virtual sal_uInt16
GetValueCount() const SAL_OVERRIDE
;
81 static OUString
GetValueText( sal_uInt16 nVal
);
82 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const SAL_OVERRIDE
;
83 virtual SfxPoolItem
* Create( SvStream
& rStream
, sal_uInt16 nVer
) const SAL_OVERRIDE
;
85 inline SvxVerJustifyItem
& operator=(const SvxVerJustifyItem
& rVerJustify
)
87 SetValue( rVerJustify
.GetValue() );
94 class EDITENG_DLLPUBLIC SvxJustifyMethodItem
: public SfxEnumItem
98 const SvxCellJustifyMethod eMethod
,
99 const sal_uInt16 nId
);
101 virtual bool GetPresentation( SfxItemPresentation ePres
,
102 SfxMapUnit eCoreMetric
,
103 SfxMapUnit ePresMetric
,
104 OUString
&rText
, const IntlWrapper
* = 0 ) const SAL_OVERRIDE
;
106 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const SAL_OVERRIDE
;
107 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) SAL_OVERRIDE
;
109 virtual sal_uInt16
GetValueCount() const SAL_OVERRIDE
;
110 static OUString
GetValueText( sal_uInt16 nVal
);
111 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const SAL_OVERRIDE
;
112 virtual SfxPoolItem
* Create( SvStream
& rStream
, sal_uInt16 nVer
) const SAL_OVERRIDE
;
114 SvxJustifyMethodItem
& operator=(const SvxJustifyMethodItem
& r
);
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */