20#include <svx/strings.hrc>
21#include <osl/diagnose.h>
24#include <com/sun/star/table/CellOrientation.hpp>
50 SetValue( SvxCellOrientation::Stacked );
52 else switch( nRotation.
get() )
54 case 9000:
SetValue( SvxCellOrientation::BottomUp );
break;
55 case 27000:
SetValue( SvxCellOrientation::TopBottom );
break;
56 default:
SetValue( SvxCellOrientation::Standard );
76 table::CellOrientation eUno = table::CellOrientation_STANDARD;
79 case SvxCellOrientation::Standard: eUno = table::CellOrientation_STANDARD;
break;
80 case SvxCellOrientation::TopBottom: eUno = table::CellOrientation_TOPBOTTOM;
break;
81 case SvxCellOrientation::BottomUp: eUno = table::CellOrientation_BOTTOMTOP;
break;
82 case SvxCellOrientation::Stacked: eUno = table::CellOrientation_STACKED;
break;
90 table::CellOrientation eOrient;
91 if(!(rVal >>= eOrient))
96 eOrient =
static_cast<table::CellOrientation
>(
nValue);
101 case table::CellOrientation_STANDARD: eSvx = SvxCellOrientation::Standard;
break;
102 case table::CellOrientation_TOPBOTTOM: eSvx = SvxCellOrientation::TopBottom;
break;
103 case table::CellOrientation_BOTTOMTOP: eSvx = SvxCellOrientation::BottomUp;
break;
104 case table::CellOrientation_STACKED: eSvx = SvxCellOrientation::Stacked;
break;
113 OString
id = OString::Concat(RID_SVXITEMS_ORI_STANDARD.mpId) + OString::number(
static_cast<int>(nVal));
124 return static_cast<sal_uInt16
>(SvxCellOrientation::Stacked) + 1;
129 return GetValue() == SvxCellOrientation::Stacked;
137 case SvxCellOrientation::BottomUp: nAngle = 9000_deg100;
break;
138 case SvxCellOrientation::TopBottom: nAngle = 27000_deg100;
break;
183 case SfxItemPresentation::Nameless:
194 case SfxItemPresentation::Complete:
196 rText =
SvxResId(RID_SVXITEMS_MARGIN_LEFT) +
204 SvxResId(RID_SVXITEMS_MARGIN_RIGHT) +
208 SvxResId(RID_SVXITEMS_MARGIN_BOTTOM) +
221 assert(SfxPoolItem::operator==(rItem));
237 nMemberId &= ~CONVERT_TWIPS;
254 OSL_FAIL(
"unknown MemberId");
266 if(!(rVal >>= nVal) || (nVal > nMaxVal))
284 OSL_FAIL(
"unknown MemberId");
constexpr auto convertTwipToMm100(N n)
void SetValue(EnumT nTheValue)
void SetLeftMargin(sal_Int16 nLeft)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
SvxMarginItem(const TypedWhichId< SvxMarginItem > nId)
void SetBottomMargin(sal_Int16 nBottom)
void SetRightMargin(sal_Int16 nRight)
void SetTopMargin(sal_Int16 nTop)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual SvxMarginItem * Clone(SfxItemPool *pPool=nullptr) const override
static SfxPoolItem * CreateDefault()
virtual bool operator==(const SfxPoolItem &) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual sal_uInt16 GetValueCount() const override
Degree100 GetRotation(Degree100 nStdAngle) const
Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state).
static OUString GetValueText(SvxCellOrientation nVal)
virtual SvxOrientationItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
bool IsStacked() const
Returns sal_True, if the item represents STACKED state.
SvxOrientationItem(const SvxCellOrientation eOrientation, const TypedWhichId< SvxOrientationItem > nId)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
OUString SvxResId(TranslateId aId)
OUString EditResId(TranslateId aId)
OUString GetMetricText(tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper *pIntl)
TranslateId GetMetricId(MapUnit eUnit)
constexpr OUStringLiteral cpDelim
tools::Long const nRightMargin
tools::Long const nBottomMargin
tools::Long const nTopMargin
tools::Long const nLeftMargin
constexpr auto toTwips(N number, Length from)
UNDERLYING_TYPE get() const
#define MID_MARGIN_LO_MARGIN
#define MID_MARGIN_R_MARGIN
#define MID_MARGIN_L_MARGIN
#define MID_MARGIN_UP_MARGIN