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 .
19 #ifndef INCLUDED_SVX_ALGITEM_HXX
20 #define INCLUDED_SVX_ALGITEM_HXX
22 #include <editeng/svxenum.hxx>
23 #include <rtl/ustring.hxx>
24 #include <sal/types.h>
25 #include <svl/poolitem.hxx>
26 #include <svl/eitem.hxx>
27 #include <svx/svxdllapi.h>
32 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxOrientationItem
: public SfxEnumItem
<SvxCellOrientation
>
36 const SvxCellOrientation eOrientation
,
37 const sal_uInt16 nId
);
40 sal_Int32 nRotation
, bool bStacked
,
41 const sal_uInt16 nId
);
43 virtual bool GetPresentation( SfxItemPresentation ePres
,
46 OUString
&rText
, const IntlWrapper
& ) const override
;
48 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
49 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
51 virtual sal_uInt16
GetValueCount() const override
;
52 static OUString
GetValueText( SvxCellOrientation nVal
);
53 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
55 /** Returns sal_True, if the item represents STACKED state. */
56 bool IsStacked() const;
57 /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */
58 sal_Int32
GetRotation( sal_Int32 nStdAngle
) const;
61 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxMarginItem
: public SfxPoolItem
63 sal_Int16 nLeftMargin
;
65 sal_Int16 nRightMargin
;
66 sal_Int16 nBottomMargin
;
68 static SfxPoolItem
* CreateDefault();
69 SvxMarginItem( const sal_uInt16 nId
);
70 SvxMarginItem( sal_Int16 nLeft
, sal_Int16 nTop
/*= 0*/,
71 sal_Int16 nRight
/*= 0*/, sal_Int16 nBottom
/*= 0*/,
72 const sal_uInt16 nId
);
74 virtual bool GetPresentation( SfxItemPresentation ePres
,
77 OUString
&rText
, const IntlWrapper
& ) const override
;
79 virtual bool operator==( const SfxPoolItem
& ) const override
;
80 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
82 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
83 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
85 sal_Int16
GetLeftMargin() const {return nLeftMargin
; }
86 void SetLeftMargin(sal_Int16 nLeft
);
87 sal_Int16
GetTopMargin() const {return nTopMargin
; }
88 void SetTopMargin(sal_Int16 nTop
);
89 sal_Int16
GetRightMargin() const {return nRightMargin
; }
90 void SetRightMargin(sal_Int16 nRight
);
91 sal_Int16
GetBottomMargin() const {return nBottomMargin
; }
92 void SetBottomMargin(sal_Int16 nBottom
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */