21 #include <com/sun/star/style/NumberingType.hpp>
22 #include <com/sun/star/text/DefaultNumberingProvider.hpp>
23 #include <com/sun/star/text/XDefaultNumberingProvider.hpp>
25 #include <com/sun/star/text/XNumberingTypeInfo.hpp>
28 #include <osl/diagnose.h>
34 uno::Reference<text::XNumberingTypeInfo>
xInfo;
42 uno::Reference<text::XDefaultNumberingProvider> xDefNum
43 = text::DefaultNumberingProvider::create(xContext);
44 m_xImpl->xInfo.set(xDefNum, uno::UNO_QUERY);
52 uno::Sequence<sal_Int16>
aTypes;
56 aTypes =
m_xImpl->xInfo->getSupportedNumberingTypes();
66 case style::NumberingType::NUMBER_NONE:
71 case style::NumberingType::CHAR_SPECIAL:
75 case style::NumberingType::PAGE_DESCRIPTOR:
79 case style::NumberingType::BITMAP:
83 case style::NumberingType::BITMAP |
LINK_TOKEN:
88 if (nValue > style::NumberingType::CHARS_LOWER_LETTER_N)
91 bInsert = std::find(std::cbegin(aTypes), std::cend(aTypes), nValue)
97 OUString
sId(OUString::number(nValue));
101 if (!(nTypeFlags & SwInsertNumTypes::Extended))
104 for (sal_Int16 nCurrent : std::as_const(aTypes))
106 if (nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N)
108 if (
m_xWidget->find_id(OUString::number(nCurrent)) == -1)
110 m_xWidget->append(OUString::number(nCurrent),
111 m_xImpl->xInfo->getNumberingIdentifier(nCurrent));
124 #if OSL_DEBUG_LEVEL > 0
126 OSL_FAIL(
"NumberingTypeListBox not selected");
std::unique_ptr< SwNumberingTypeListBox_Impl > m_xImpl
SVX_NUM_CHARS_UPPER_LETTER
static int GetValue(sal_uInt32 i)
~SwNumberingTypeListBox()
static OUString GetString(sal_uInt32 i)
uno::Reference< text::XNumberingTypeInfo > xInfo
void Reload(SwInsertNumTypes nTypeFlags)
static sal_uInt32 Count()
bool SelectNumberingType(SvxNumType nType)
SwNumberingTypeListBox(std::unique_ptr< weld::ComboBox > pWidget)
Reference< XComponentContext > getProcessComponentContext()
std::unique_ptr< weld::ComboBox > m_xWidget
SvxNumType GetSelectedNumberingType() const