20 #include <svx/svxitems.hrc>
21 #include <svx/strings.hrc>
22 #include <osl/diagnose.h>
25 #include <com/sun/star/table/BorderLine.hpp>
26 #include <com/sun/star/table/ShadowLocation.hpp>
27 #include <com/sun/star/table/TableBorder.hpp>
28 #include <com/sun/star/table/ShadowFormat.hpp>
29 #include <com/sun/star/table/CellRangeAddress.hpp>
30 #include <com/sun/star/table/CellContentType.hpp>
31 #include <com/sun/star/table/TableOrientation.hpp>
32 #include <com/sun/star/util/SortField.hpp>
33 #include <com/sun/star/util/SortFieldType.hpp>
34 #include <com/sun/star/table/CellOrientation.hpp>
35 #include <com/sun/star/table/CellAddress.hpp>
40 #include <editeng/editrids.hrc>
52 const sal_uInt16 nId):
62 SetValue( SvxCellOrientation::Stacked );
64 else switch( nRotation )
66 case 9000:
SetValue( SvxCellOrientation::BottomUp );
break;
67 case 27000:
SetValue( SvxCellOrientation::TopBottom );
break;
68 default:
SetValue( SvxCellOrientation::Standard );
88 table::CellOrientation eUno = table::CellOrientation_STANDARD;
91 case SvxCellOrientation::Standard: eUno = table::CellOrientation_STANDARD;
break;
92 case SvxCellOrientation::TopBottom: eUno = table::CellOrientation_TOPBOTTOM;
break;
93 case SvxCellOrientation::BottomUp: eUno = table::CellOrientation_BOTTOMTOP;
break;
94 case SvxCellOrientation::Stacked: eUno = table::CellOrientation_STACKED;
break;
102 table::CellOrientation eOrient;
103 if(!(rVal >>= eOrient))
106 if(!(rVal >>= nValue))
108 eOrient =
static_cast<table::CellOrientation
>(
nValue);
113 case table::CellOrientation_STANDARD: eSvx = SvxCellOrientation::Standard;
break;
114 case table::CellOrientation_TOPBOTTOM: eSvx = SvxCellOrientation::TopBottom;
break;
115 case table::CellOrientation_BOTTOMTOP: eSvx = SvxCellOrientation::BottomUp;
break;
116 case table::CellOrientation_STACKED: eSvx = SvxCellOrientation::Stacked;
break;
126 return SvxResId(RID_SVXITEMS_ORI_STANDARD + static_cast<int>(nVal));
138 return static_cast<sal_uInt16
>(SvxCellOrientation::Stacked) + 1;
144 return GetValue() == SvxCellOrientation::Stacked;
149 sal_Int32 nAngle = nStdAngle;
152 case SvxCellOrientation::BottomUp: nAngle = 9000;
break;
153 case SvxCellOrientation::TopBottom: nAngle = 27000;
break;
175 const sal_uInt16 nId ) :
194 OUString cpDelimTmp(cpDelim);
198 case SfxItemPresentation::Nameless:
209 case SfxItemPresentation::Complete:
211 rText =
SvxResId(RID_SVXITEMS_MARGIN_LEFT) +
219 SvxResId(RID_SVXITEMS_MARGIN_RIGHT) +
223 SvxResId(RID_SVXITEMS_MARGIN_BOTTOM) +
236 assert(SfxPoolItem::operator==(rItem));
271 OSL_FAIL(
"unknown MemberId");
283 if(!(rVal >>= nVal) || (nVal > nMaxVal))
292 nRightMargin =
static_cast<sal_Int16
>( bConvert ? convertMm100ToTwip(nVal) : nVal );
295 nTopMargin =
static_cast<sal_Int16
>( bConvert ? convertMm100ToTwip(nVal) : nVal );
298 nBottomMargin =
static_cast<sal_Int16
>( bConvert ? convertMm100ToTwip(nVal) : nVal );
301 OSL_FAIL(
"unknown MemberId");
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
sal_Int32 GetRotation(sal_Int32 nStdAngle) const
Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state)...
SvxMarginItem(const sal_uInt16 nId)
void SetLeftMargin(sal_Int16 nLeft)
virtual sal_uInt16 GetValueCount() const override
static OUString GetValueText(SvxCellOrientation nVal)
SvxOrientationItem(const SvxCellOrientation eOrientation, const sal_uInt16 nId)
#define MID_MARGIN_LO_MARGIN
#define MID_MARGIN_R_MARGIN
OUString SvxResId(const char *pId)
virtual bool operator==(const SfxPoolItem &) const override
static SfxPoolItem * CreateDefault()
#define MID_MARGIN_L_MARGIN
void SetTopMargin(sal_Int16 nTop)
bool IsStacked() const
Returns sal_True, if the item represents STACKED state.
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
void SetRightMargin(sal_Int16 nRight)
void SetValue(EnumT nTheValue)
void SetBottomMargin(sal_Int16 nBottom)
const char * GetMetricId(MapUnit eUnit)
OUString GetMetricText(long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper *pIntl)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
#define MID_MARGIN_UP_MARGIN
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
OUString EditResId(const char *pId)
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const override
constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const override