update emoji autocorrect entries from po-files
[LibreOffice.git] / include / svx / algitem.hxx
blob054c28a023e2552176a7fba5b3a7eca904c95d00
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 .
19 #ifndef INCLUDED_SVX_ALGITEM_HXX
20 #define INCLUDED_SVX_ALGITEM_HXX
22 #include <svx/svxids.hrc>
23 #include <svl/poolitem.hxx>
24 #include <svl/eitem.hxx>
25 #include <editeng/svxenum.hxx>
26 #include <svx/svxdllapi.h>
28 class SvStream;
30 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxOrientationItem: public SfxEnumItem
32 public:
33 TYPEINFO_OVERRIDE();
35 SvxOrientationItem(
36 const SvxCellOrientation eOrientation /*= SVX_ORIENTATION_STANDARD*/,
37 const sal_uInt16 nId );
39 SvxOrientationItem(
40 sal_Int32 nRotation, bool bStacked,
41 const sal_uInt16 nId );
43 virtual bool GetPresentation( SfxItemPresentation ePres,
44 SfxMapUnit eCoreMetric,
45 SfxMapUnit ePresMetric,
46 OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
48 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
49 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
51 virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE;
52 static OUString GetValueText( sal_uInt16 nVal );
53 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
54 virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE;
56 inline SvxOrientationItem& operator=(const SvxOrientationItem& rOrientation)
58 SetValue( rOrientation.GetValue() );
59 return *this;
62 /** Returns sal_True, if the item represents STACKED state. */
63 bool IsStacked() const;
64 /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */
65 sal_Int32 GetRotation( sal_Int32 nStdAngle = 0 ) const;
66 /** Fills this item according to passed item values. */
67 void SetFromRotation( sal_Int32 nRotation, bool bStacked );
70 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxMarginItem: public SfxPoolItem
72 sal_Int16 nLeftMargin;
73 sal_Int16 nTopMargin;
74 sal_Int16 nRightMargin;
75 sal_Int16 nBottomMargin;
76 public:
77 TYPEINFO_OVERRIDE();
78 SvxMarginItem( const sal_uInt16 nId );
79 SvxMarginItem( sal_Int16 nLeft, sal_Int16 nTop /*= 0*/,
80 sal_Int16 nRight /*= 0*/, sal_Int16 nBottom /*= 0*/,
81 const sal_uInt16 nId );
82 SvxMarginItem( const SvxMarginItem& );
84 virtual bool GetPresentation( SfxItemPresentation ePres,
85 SfxMapUnit eCoreMetric,
86 SfxMapUnit ePresMetric,
87 OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
89 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
90 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
91 virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE;
92 virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
94 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
95 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
97 sal_Int16 GetLeftMargin() const {return nLeftMargin; }
98 void SetLeftMargin(sal_Int16 nLeft);
99 sal_Int16 GetTopMargin() const {return nTopMargin; }
100 void SetTopMargin(sal_Int16 nTop);
101 sal_Int16 GetRightMargin() const {return nRightMargin; }
102 void SetRightMargin(sal_Int16 nRight);
103 sal_Int16 GetBottomMargin() const {return nBottomMargin; }
104 void SetBottomMargin(sal_Int16 nBottom);
106 inline SvxMarginItem& operator=(const SvxMarginItem& rMargin)
108 nLeftMargin = rMargin.nLeftMargin;
109 nTopMargin = rMargin.nTopMargin;
110 nRightMargin = rMargin.nRightMargin;
111 nBottomMargin = rMargin.nBottomMargin;
112 return *this;
116 #endif
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */