21#include <com/sun/star/style/NumberingType.hpp>
22#include <com/sun/star/text/DefaultNumberingProvider.hpp>
23#include <com/sun/star/text/XNumberingTypeInfo.hpp>
27using namespace css::uno;
28using namespace css::text;
29using namespace css::style;
33 Reference<XComponentContext> xContext(::comphelper::getProcessComponentContext());
34 Reference<XDefaultNumberingProvider> xRet = text::DefaultNumberingProvider::create(xContext);
41 Reference<XNumberingTypeInfo> xInfo(xDefNum, UNO_QUERY);
47 ::std::vector<sal_uInt16> aRemove(rFmtLB.
get_count(), nDontRemove);
48 for (
size_t i = 0;
i < aRemove.size(); ++
i)
50 sal_uInt16 nEntryData = rFmtLB.
get_id(
i).toInt32();
51 if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N && nEntryData != nDoNotRemove)
52 aRemove[
i] = nEntryData;
56 const Sequence<sal_Int16>
aTypes = xInfo->getSupportedNumberingTypes();
57 for (
const sal_Int16 nCurrent :
aTypes)
59 if (nCurrent > NumberingType::CHARS_LOWER_LETTER_N)
62 for (
int nEntry = 0; nEntry < rFmtLB.
get_count(); ++nEntry)
64 sal_uInt16 nEntryData = rFmtLB.
get_id(nEntry).toInt32();
65 if (nEntryData ==
static_cast<sal_uInt16
>(nCurrent))
68 aRemove[nEntry] = nDontRemove;
74 OUString aIdent = xInfo->getNumberingIdentifier(nCurrent);
75 rFmtLB.
append(OUString::number(nCurrent), aIdent);
80 for (
unsigned short i : aRemove)
static void GetI18nNumbering(weld::ComboBox &rFmtLB, sal_uInt16 nDoNotRemove)
Get the numberings provided by the i18n framework (CTL, Asian, ...) and add them to the listbox.
static Reference< XDefaultNumberingProvider > GetNumberingProvider()
virtual OUString get_id(int pos) const=0
void append(const weld::ComboBoxEntry &rItem)
virtual int get_count() const=0
void remove_id(const OUString &rId)