LibreOffice Module svx (master) 1
algitem.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SVX_ALGITEM_HXX
20#define INCLUDED_SVX_ALGITEM_HXX
21
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>
29
30class IntlWrapper;
31class SfxItemPool;
32
33class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxOrientationItem final : public SfxEnumItem<SvxCellOrientation>
34{
35public:
37 const SvxCellOrientation eOrientation,
39
41 Degree100 nRotation, bool bStacked,
43
44 virtual bool GetPresentation( SfxItemPresentation ePres,
45 MapUnit eCoreMetric,
46 MapUnit ePresMetric,
47 OUString &rText, const IntlWrapper& ) const override;
48
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;
51
52 virtual sal_uInt16 GetValueCount() const override;
53 static OUString GetValueText( SvxCellOrientation nVal );
54 virtual SvxOrientationItem* Clone( SfxItemPool *pPool = nullptr ) const override;
55
57 bool IsStacked() const;
59 Degree100 GetRotation( Degree100 nStdAngle ) const;
60};
61
63{
64 sal_Int16 nLeftMargin;
65 sal_Int16 nTopMargin;
66 sal_Int16 nRightMargin;
67 sal_Int16 nBottomMargin;
68public:
69 static SfxPoolItem* CreateDefault();
71 SvxMarginItem( sal_Int16 nLeft, sal_Int16 nTop /*= 0*/,
72 sal_Int16 nRight /*= 0*/, sal_Int16 nBottom /*= 0*/,
74
75 virtual bool GetPresentation( SfxItemPresentation ePres,
76 MapUnit eCoreMetric,
77 MapUnit ePresMetric,
78 OUString &rText, const IntlWrapper& ) const override;
79
80 virtual bool operator==( const SfxPoolItem& ) const override;
81 virtual SvxMarginItem* Clone( SfxItemPool *pPool = nullptr ) const override;
82
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;
85
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);
94};
95
96#endif
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_uInt16 GetValueCount() const=0
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8) override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8=0) const override
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
virtual bool operator==(SfxPoolItem const &other) const override
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
sal_Int16 nTopMargin
Definition: algitem.hxx:65
sal_Int16 nLeftMargin
Definition: algitem.hxx:64
sal_Int16 nRightMargin
Definition: algitem.hxx:66
sal_Int16 GetRightMargin() const
Definition: algitem.hxx:90
sal_Int16 GetTopMargin() const
Definition: algitem.hxx:88
sal_Int16 GetBottomMargin() const
Definition: algitem.hxx:92
sal_Int16 GetLeftMargin() const
Definition: algitem.hxx:86
sal_Int16 nBottomMargin
Definition: algitem.hxx:67
MapUnit
tools::Long const nRightMargin
tools::Long const nBottomMargin
tools::Long const nTopMargin
tools::Long const nLeftMargin
sal_Int16 nId
SfxItemPresentation
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
SvxCellOrientation
unsigned char sal_uInt8
#define SAL_WARN_UNUSED