22#include <com/sun/star/style/NumberingType.hpp>
23#include <ooo/vba/word/WdListNumberStyle.hpp>
24#include <com/sun/star/text/HoriOrientation.hpp>
25#include <ooo/vba/word/WdListLevelAlignment.hpp>
40 sal_Int16 nAlignment = 0;
44 case text::HoriOrientation::LEFT:
46 nAlignment = word::WdListLevelAlignment::wdListLevelAlignLeft;
49 case text::HoriOrientation::RIGHT:
51 nAlignment = word::WdListLevelAlignment::wdListLevelAlignRight;
54 case text::HoriOrientation::CENTER:
56 nAlignment = word::WdListLevelAlignment::wdListLevelAlignCenter;
61 throw uno::RuntimeException();
69 sal_Int16 nAlignment = text::HoriOrientation::LEFT;
72 case word::WdListLevelAlignment::wdListLevelAlignLeft:
74 nAlignment = text::HoriOrientation::LEFT;
77 case word::WdListLevelAlignment::wdListLevelAlignRight:
79 nAlignment = text::HoriOrientation::RIGHT;
82 case word::WdListLevelAlignment::wdListLevelAlignCenter:
84 nAlignment = text::HoriOrientation::CENTER;
89 throw uno::RuntimeException();
97 throw uno::RuntimeException(
"Not implemented" );
102 throw uno::RuntimeException(
"Not implemented" );
135 sal_Int32 nIndentAt = 0;
136 sal_Int32 nFirstLineIndent = 0;
138 m_pListHelper->getPropertyValueWithNameAndLevel(
mnLevel,
"FirstLineIndent" ) >>= nFirstLineIndent;
140 sal_Int32 nResult = nIndentAt + nFirstLineIndent;
142 return static_cast< float >( Millimeter::getInPoints( nResult ) );
147 sal_Int32 nNumberPosition = Millimeter::getInHundredthsOfOneMillimeter( _numberposition );
149 sal_Int32 nIndentAt = 0;
152 sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt;
158 sal_Int16 nNumberingType = 0;
160 switch( nNumberingType )
162 case style::NumberingType::CHAR_SPECIAL:
164 nNumberingType = word::WdListNumberStyle::wdListNumberStyleBullet;
167 case style::NumberingType::CHARS_UPPER_LETTER:
169 nNumberingType = word::WdListNumberStyle::wdListNumberStyleUppercaseLetter;
172 case style::NumberingType::CHARS_LOWER_LETTER:
174 nNumberingType = word::WdListNumberStyle::wdListNumberStyleLowercaseLetter;
177 case style::NumberingType::ROMAN_UPPER:
179 nNumberingType = word::WdListNumberStyle::wdListNumberStyleUppercaseRoman;
182 case style::NumberingType::ROMAN_LOWER:
184 nNumberingType = word::WdListNumberStyle::wdListNumberStyleLowercaseRoman;
187 case style::NumberingType::ARABIC:
189 nNumberingType = word::WdListNumberStyle::wdListNumberStyleArabic;
192 case style::NumberingType::NUMBER_NONE:
194 nNumberingType = word::WdListNumberStyle::wdListNumberStyleNone;
197 case style::NumberingType::FULLWIDTH_ARABIC:
199 nNumberingType = word::WdListNumberStyle::wdListNumberStyleArabicFullWidth;
202 case style::NumberingType::CIRCLE_NUMBER:
204 nNumberingType = word::WdListNumberStyle::wdListNumberStyleNumberInCircle;
207 case style::NumberingType::CHARS_ARABIC:
209 nNumberingType = word::WdListNumberStyle::wdListNumberStyleCardinalText;
214 throw uno::RuntimeException(
"Not implemented" );
217 return nNumberingType;
222 sal_Int16 nNumberingType = 0;
223 switch( _numberstyle )
225 case word::WdListNumberStyle::wdListNumberStyleBullet:
227 nNumberingType = style::NumberingType::CHAR_SPECIAL;
230 case word::WdListNumberStyle::wdListNumberStyleUppercaseLetter:
232 nNumberingType = style::NumberingType::CHARS_UPPER_LETTER_N;
235 case word::WdListNumberStyle::wdListNumberStyleLowercaseLetter:
237 nNumberingType = style::NumberingType::CHARS_LOWER_LETTER_N;
240 case word::WdListNumberStyle::wdListNumberStyleUppercaseRoman:
242 nNumberingType = style::NumberingType::ROMAN_UPPER;
245 case word::WdListNumberStyle::wdListNumberStyleLowercaseRoman:
247 nNumberingType = style::NumberingType::ROMAN_LOWER;
250 case word::WdListNumberStyle::wdListNumberStyleArabic:
252 nNumberingType = style::NumberingType::ARABIC;
255 case word::WdListNumberStyle::wdListNumberStyleNone:
257 nNumberingType = style::NumberingType::NUMBER_NONE;
260 case word::WdListNumberStyle::wdListNumberStyleArabicFullWidth:
262 nNumberingType = style::NumberingType::FULLWIDTH_ARABIC;
265 case word::WdListNumberStyle::wdListNumberStyleNumberInCircle:
267 nNumberingType = style::NumberingType::CIRCLE_NUMBER;
270 case word::WdListNumberStyle::wdListNumberStyleCardinalText:
272 nNumberingType = style::NumberingType::CHARS_ARABIC;
275 case word::WdListNumberStyle::wdListNumberStyleOrdinal:
276 case word::WdListNumberStyle::wdListNumberStyleOrdinalText:
277 case word::WdListNumberStyle::wdListNumberStyleKanji:
278 case word::WdListNumberStyle::wdListNumberStyleKanjiDigit:
279 case word::WdListNumberStyle::wdListNumberStyleAiueoHalfWidth:
280 case word::WdListNumberStyle::wdListNumberStyleIrohaHalfWidth:
282 nNumberingType = style::NumberingType::ARABIC;
287 throw uno::RuntimeException(
"Not implemented" );
307 sal_Int16 nStartWith = 0;
314 sal_Int16 nStartWith =
static_cast<sal_Int16
>(_startat);
320 sal_Int32 nTabPosition = 0;
321 m_pListHelper->getPropertyValueWithNameAndLevel(
mnLevel,
"ListtabStopPosition" ) >>= nTabPosition;
323 return static_cast< float >( Millimeter::getInPoints( nTabPosition ) );
328 sal_Int32 nTabPosition = Millimeter::getInHundredthsOfOneMillimeter( _tabposition );
335 sal_Int32 nIndentAt = 0;
338 return static_cast< float >( Millimeter::getInPoints( nIndentAt ) );
343 sal_Int32 nIndentAt = 0;
344 sal_Int32 nFirstLineIndent = 0;
346 m_pListHelper->getPropertyValueWithNameAndLevel(
mnLevel,
"FirstLineIndent" ) >>= nFirstLineIndent;
348 sal_Int32 nAlignedAt = nIndentAt + nFirstLineIndent;
350 nIndentAt = Millimeter::getInHundredthsOfOneMillimeter( _textposition );
351 nFirstLineIndent = nAlignedAt - nIndentAt;
358 sal_Int16 nLabelFollowedBy= 0;
359 m_pListHelper->getPropertyValueWithNameAndLevel(
mnLevel,
"LabelFollowedBy" ) >>= nLabelFollowedBy;
361 return nLabelFollowedBy;
366 sal_Int16 nLabelFollowedBy =
static_cast<sal_Int16
>(_trailingcharacter);
373 return "SwVbaListLevel";
376uno::Sequence< OUString >
381 "ooo.vba.word.ListLevel"
virtual void SAL_CALL setTextPosition(float _textposition) override
virtual void SAL_CALL setTabPosition(float _tabposition) override
virtual void SAL_CALL setAlignment(::sal_Int32 _alignment) override
SwVbaListLevel(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, SwVbaListHelperRef pHelper, sal_Int32 nLevel)
virtual void SAL_CALL setNumberPosition(float _numberposition) override
virtual ::sal_Int32 SAL_CALL getIndex() override
virtual float SAL_CALL getTextPosition() override
virtual css::uno::Reference< ::ooo::vba::word::XFont > SAL_CALL getFont() override
virtual void SAL_CALL setStartAt(::sal_Int32 _startat) override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual ::sal_Int32 SAL_CALL getAlignment() override
virtual ::sal_Int32 SAL_CALL getResetOnHigher() override
virtual ~SwVbaListLevel() override
virtual float SAL_CALL getTabPosition() override
virtual void SAL_CALL setLinkedStyle(const OUString &_linkedstyle) override
virtual void SAL_CALL setTrailingCharacter(::sal_Int32 _trailingcharacter) override
SwVbaListHelperRef m_pListHelper
virtual ::sal_Int32 SAL_CALL getNumberStyle() override
virtual OUString SAL_CALL getLinkedStyle() override
virtual ::sal_Int32 SAL_CALL getTrailingCharacter() override
virtual void SAL_CALL setNumberFormat(const OUString &_numberformat) override
virtual OUString getServiceImplName() override
virtual ::sal_Int32 SAL_CALL getStartAt() override
virtual void SAL_CALL setResetOnHigher(::sal_Int32 _resetonhigher) override
virtual void SAL_CALL setFont(const css::uno::Reference< ::ooo::vba::word::XFont > &_font) override
virtual float SAL_CALL getNumberPosition() override
virtual OUString SAL_CALL getNumberFormat() override
virtual void SAL_CALL setNumberStyle(::sal_Int32 _numberstyle) override
Sequence< OUString > aServiceNames
std::shared_ptr< SwVbaListHelper > SwVbaListHelperRef