22 #include <ooo/vba/word/WdListGalleryType.hpp>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
26 #include <com/sun/star/style/NumberingType.hpp>
27 #include <com/sun/star/container/XIndexReplace.hpp>
50 SwVbaListHelper::SwVbaListHelper(
const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) : mxTextDocument( xTextDoc ), mnGalleryType( nGalleryType ), mnTemplateType( nTemplateType )
60 case word::WdListGalleryType::wdBulletGallery:
65 case word::WdListGalleryType::wdNumberGallery:
70 case word::WdListGalleryType::wdOutlineNumberGallery:
77 throw uno::RuntimeException();
83 uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier(
mxTextDocument, uno::UNO_QUERY_THROW );
84 mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName(
"NumberingStyles"), uno::UNO_QUERY_THROW );
94 uno::Reference< lang::XMultiServiceFactory > xDocMSF(
mxTextDocument, uno::UNO_QUERY_THROW );
95 mxStyleProps.set( xDocMSF->createInstance(
"com.sun.star.style.NumberingStyle"), uno::UNO_QUERY_THROW );
110 case word::WdListGalleryType::wdBulletGallery:
115 case word::WdListGalleryType::wdNumberGallery:
120 case word::WdListGalleryType::wdOutlineNumberGallery:
127 throw uno::RuntimeException();
135 sal_Int32 nLevel = 0;
141 OUString aBulletChar;
182 throw css::uno::RuntimeException();
193 sal_Int32 nLevel = 0;
197 sal_Int16 nNumberingType = 0;
203 nNumberingType = style::NumberingType::ARABIC;
209 nNumberingType = style::NumberingType::ARABIC;
215 nNumberingType = style::NumberingType::ROMAN_UPPER;
221 nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
227 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
233 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
239 nNumberingType = style::NumberingType::ROMAN_LOWER;
246 throw css::uno::RuntimeException();
297 throw css::uno::RuntimeException();
304 sal_Int16 nNumberingType = 0;
317 nNumberingType = style::NumberingType::ARABIC;
324 nNumberingType = style::NumberingType::ROMAN_LOWER;
331 nNumberingType = style::NumberingType::ARABIC;
338 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
345 nNumberingType = style::NumberingType::ROMAN_LOWER;
352 nNumberingType = style::NumberingType::ARABIC;
359 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
366 nNumberingType = style::NumberingType::ROMAN_LOWER;
392 nParentNumbering = sal_Int16( nLevel - 1 );
401 OUString aBulletChar;
448 sal_Int16 nNumberingType = 0;
460 nNumberingType = style::NumberingType::ROMAN_UPPER;
467 nNumberingType = style::NumberingType::ARABIC;
475 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
482 nNumberingType = style::NumberingType::ROMAN_LOWER;
489 nNumberingType = style::NumberingType::ARABIC;
496 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
503 nNumberingType = style::NumberingType::ROMAN_LOWER;
510 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
517 nNumberingType = style::NumberingType::ROMAN_LOWER;
541 nParentNumbering = sal_Int16( nLevel - 1 );
550 sal_Int16 nNumberingType = 0;
562 nNumberingType = style::NumberingType::ROMAN_UPPER;
569 nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
576 nNumberingType = style::NumberingType::ARABIC;
583 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
590 nNumberingType = style::NumberingType::ARABIC;
597 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
604 nNumberingType = style::NumberingType::ROMAN_LOWER;
611 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
618 nNumberingType = style::NumberingType::ROMAN_LOWER;
void CreateBulletListTemplate()
void CreateOutlineNumberForType6()
void CreateListTemplate()
const sal_Int32 LIST_LEVEL_COUNT
SwVbaListHelper(const css::uno::Reference< css::text::XTextDocument > &xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType)
void CreateOutlineNumberListTemplate()
constexpr OUStringLiteral UNO_NAME_CHAR_STYLE_NAME
void CreateNumberListTemplate()
css::uno::Reference< css::container::XIndexReplace > mxNumberingRules
constexpr OUStringLiteral UNO_NAME_NUMBERING_TYPE
constexpr OUStringLiteral CHAR_SQUARE
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
void CreateOutlineNumberForType2()
constexpr OUStringLiteral UNO_NAME_BULLET_CHAR
css::uno::Reference< css::text::XTextDocument > mxTextDocument
void CreateOutlineNumberForType5()
constexpr OUStringLiteral UNO_NAME_PARENT_NUMBERING
css::uno::Any getPropertyValueWithNameAndLevel(sal_Int32 nLevel, const OUString &sName)
constexpr OUStringLiteral UNO_NAME_PREFIX
constexpr OUStringLiteral CHAR_STAR_SYMBOL
PropertyValueVector_t aPropertyValues
constexpr OUStringLiteral CHAR_ARROW
css::uno::Reference< css::beans::XPropertySet > mxStyleProps
constexpr OUStringLiteral CHAR_EMPTY_DOT
void CreateOutlineNumberForType7()
void setPropertyValueWithNameAndLevel(sal_Int32 nLevel, const OUString &sName, const css::uno::Any &aValue)
constexpr OUStringLiteral CHAR_CLOSED_DOT
void CreateOutlineNumberForType1()
constexpr OUStringLiteral CHAR_FOUR_DIAMONDS
constexpr OUStringLiteral UNO_NAME_SUFFIX
#define SAL_INFO(area, stream)
void CreateOutlineNumberForType4()
constexpr OUStringLiteral CHAR_CHECK_MARK
void setOrAppendPropertyValue(uno::Sequence< beans::PropertyValue > &aProp, const OUString &aName, const uno::Any &aValue)
void CreateOutlineNumberForType3()
css::uno::Reference< css::container::XNameContainer > mxStyleFamily
constexpr OUStringLiteral CHAR_DIAMOND
sal_Int16 nParentNumbering