24#include <osl/diagnose.h>
31#include <com/sun/star/text/DefaultNumberingProvider.hpp>
32#include <com/sun/star/text/XNumberingTypeInfo.hpp>
33#include <com/sun/star/style/NumberingType.hpp>
34#include <com/sun/star/style/PageStyleLayout.hpp>
36#include <svx/strings.hrc>
71 assert(SfxPoolItem::operator==(rAttr));
86 default:
return OUString();
92 RID_SVXITEMS_PAGE_NUM_CHR_UPPER,
93 RID_SVXITEMS_PAGE_NUM_CHR_LOWER,
94 RID_SVXITEMS_PAGE_NUM_ROM_UPPER,
95 RID_SVXITEMS_PAGE_NUM_ROM_LOWER,
96 RID_SVXITEMS_PAGE_NUM_ARABIC,
97 RID_SVXITEMS_PAGE_NUM_NONE
102 OUString GetNumberingDescription(
SvxNumType eNumType)
105 if (eNumType <= css::style::NumberingType::NUMBER_NONE)
109 if (n != RESARRAY_INDEX_NOTFOUND)
112 css::uno::Reference<css::text::XDefaultNumberingProvider> xDefNum = css::text::DefaultNumberingProvider::create(xContext);
113 css::uno::Reference<css::text::XNumberingTypeInfo> xInfo(xDefNum, css::uno::UNO_QUERY);
116 return xInfo->getNumberingIdentifier(eNumType);
133 case SfxItemPresentation::Nameless:
139 rText += GetNumberingDescription(
eNumType) + cpDelimTmp;
141 rText +=
SvxResId(RID_SVXITEMS_PAGE_LAND_TRUE);
143 rText +=
SvxResId(RID_SVXITEMS_PAGE_LAND_FALSE);
145 if (!aUsageText.isEmpty())
147 rText += cpDelimTmp + aUsageText;
151 case SfxItemPresentation::Complete:
153 rText +=
SvxResId(RID_SVXITEMS_PAGE_COMPLETE);
158 rText += GetNumberingDescription(
eNumType) + cpDelimTmp;
160 rText +=
SvxResId(RID_SVXITEMS_PAGE_LAND_TRUE);
162 rText +=
SvxResId(RID_SVXITEMS_PAGE_LAND_FALSE);
164 if (!aUsageText.isEmpty())
166 rText += cpDelimTmp + aUsageText;
179 nMemberId &= ~CONVERT_TWIPS;
185 rVal <<= static_cast<sal_Int16>(
eNumType );
193 style::PageStyleLayout eRet;
201 OSL_FAIL(
"what layout is this?");
230 style::PageStyleLayout eLayout;
231 if(!(rVal >>= eLayout))
236 eLayout =
static_cast<style::PageStyleLayout
>(
nValue);
static sal_uInt32 FindIndex(int nValue)
static OUString GetString(sal_uInt32 i)
virtual SvxPageItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
virtual bool operator==(const SfxPoolItem &) const override
virtual ~SvxPageItem() override
SvxPageItem(const TypedWhichId< SvxPageItem > nId)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
static SfxPoolItem * CreateDefault()
virtual SvxSetItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
SvxSetItem(const TypedWhichId< SvxSetItem > nId, const SfxItemSet &rSet)
OUString SvxResId(TranslateId aId)
constexpr OUStringLiteral cpDelim
Reference< XComponentContext > getProcessComponentContext()
static OUString GetUsageText(const SvxPageUsage eU)
const TranslateId RID_SVXITEMS_PAGE_NUMS[]
bool Any2Bool(const css::uno::Any &rValue)
#define MID_PAGE_ORIENTATION