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 __EDITENG_JUSTIFYITEM_HXX__
21 #define __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 SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
40 SfxMapUnit eCoreMetric
,
41 SfxMapUnit ePresMetric
,
42 OUString
&rText
, const IntlWrapper
* = 0 ) const;
44 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
45 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
47 virtual sal_uInt16
GetValueCount() const;
48 virtual String
GetValueText( sal_uInt16 nVal
) const;
49 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
50 virtual SfxPoolItem
* Create( SvStream
& rStream
, sal_uInt16 nVer
) const;
52 inline SvxHorJustifyItem
& operator=(const SvxHorJustifyItem
& rHorJustify
)
54 SetValue( rHorJustify
.GetValue() );
59 //------------------------------------------------------------------------
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 SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
73 SfxMapUnit eCoreMetric
,
74 SfxMapUnit ePresMetric
,
75 OUString
&rText
, const IntlWrapper
* = 0 ) const;
77 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
78 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
80 virtual sal_uInt16
GetValueCount() const;
81 virtual String
GetValueText( sal_uInt16 nVal
) const;
82 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
83 virtual SfxPoolItem
* Create( SvStream
& rStream
, sal_uInt16 nVer
) const;
85 inline SvxVerJustifyItem
& operator=(const SvxVerJustifyItem
& rVerJustify
)
87 SetValue( rVerJustify
.GetValue() );
92 //------------------------------------------------------------------------
94 class EDITENG_DLLPUBLIC SvxJustifyMethodItem
: public SfxEnumItem
98 const SvxCellJustifyMethod eMethod
,
99 const sal_uInt16 nId
);
101 virtual SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
102 SfxMapUnit eCoreMetric
,
103 SfxMapUnit ePresMetric
,
104 OUString
&rText
, const IntlWrapper
* = 0 ) const;
106 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
107 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
109 virtual sal_uInt16
GetValueCount() const;
110 virtual String
GetValueText( sal_uInt16 nVal
) const;
111 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
112 virtual SfxPoolItem
* Create( SvStream
& rStream
, sal_uInt16 nVer
) const;
114 SvxJustifyMethodItem
& operator=(const SvxJustifyMethodItem
& r
);
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */