tdf#148470 if macOS glyph fallback provided a partial result flag what failed
[LibreOffice.git] / include / svx / algitem.hxx
blobc778735436ee9b8d8c17aa3a2747e02539baf528
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 <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>
28 #include <tools/degree.hxx>
30 class IntlWrapper;
31 class SfxItemPool;
33 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxOrientationItem final : public SfxEnumItem<SvxCellOrientation>
35 public:
36 SvxOrientationItem(
37 const SvxCellOrientation eOrientation,
38 const sal_uInt16 nId );
40 SvxOrientationItem(
41 Degree100 nRotation, bool bStacked,
42 const sal_uInt16 nId );
44 virtual bool GetPresentation( SfxItemPresentation ePres,
45 MapUnit eCoreMetric,
46 MapUnit ePresMetric,
47 OUString &rText, const IntlWrapper& ) const override;
49 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
50 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
52 virtual sal_uInt16 GetValueCount() const override;
53 static OUString GetValueText( SvxCellOrientation nVal );
54 virtual SvxOrientationItem* Clone( SfxItemPool *pPool = nullptr ) const override;
56 /** Returns sal_True, if the item represents STACKED state. */
57 bool IsStacked() const;
58 /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */
59 Degree100 GetRotation( Degree100 nStdAngle ) const;
62 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxMarginItem final : public SfxPoolItem
64 sal_Int16 nLeftMargin;
65 sal_Int16 nTopMargin;
66 sal_Int16 nRightMargin;
67 sal_Int16 nBottomMargin;
68 public:
69 static SfxPoolItem* CreateDefault();
70 SvxMarginItem( const sal_uInt16 nId );
71 SvxMarginItem( sal_Int16 nLeft, sal_Int16 nTop /*= 0*/,
72 sal_Int16 nRight /*= 0*/, sal_Int16 nBottom /*= 0*/,
73 const sal_uInt16 nId );
75 virtual bool GetPresentation( SfxItemPresentation ePres,
76 MapUnit eCoreMetric,
77 MapUnit ePresMetric,
78 OUString &rText, const IntlWrapper& ) const override;
80 virtual bool operator==( const SfxPoolItem& ) const override;
81 virtual SvxMarginItem* Clone( SfxItemPool *pPool = nullptr ) const override;
83 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
84 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
86 sal_Int16 GetLeftMargin() const {return nLeftMargin; }
87 void SetLeftMargin(sal_Int16 nLeft);
88 sal_Int16 GetTopMargin() const {return nTopMargin; }
89 void SetTopMargin(sal_Int16 nTop);
90 sal_Int16 GetRightMargin() const {return nRightMargin; }
91 void SetRightMargin(sal_Int16 nRight);
92 sal_Int16 GetBottomMargin() const {return nBottomMargin; }
93 void SetBottomMargin(sal_Int16 nBottom);
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */