diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-05-07 21:28:12 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-05-09 00:16:51 +0200 |
commit | cad788328ec6ef4b3071cf9002dfac12347562da (patch) | |
tree | ef85e7fecf832eb46dbdaf76dbeba161303d4b9b /writerfilter/source/dmapper/NumberingManager.cxx | |
parent | 3551f91660d9dbcba69d6cc0b1a05b9d37c4edc1 (diff) |
tdf#94628: sw: allow setting for bullet for outline paragraphs
Paragraphs in outline (having style "Header XXX") can also be
a part of list and have custom bullets.
Simplified code of SwXNumberingRules::SetPropertiesToNumFormat():
do not check for properties special for outline/chapters and removed
redundant data shuffle with local maps.
Change-Id: I1fa7f8f5359acee1d5aa62d9700641490bb91b6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93672
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'writerfilter/source/dmapper/NumberingManager.cxx')
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 0cd64a26e417..63700f23db75 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -212,28 +212,24 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults aNumberingProperties.push_back(lcl_makePropVal(PROP_NUMBERING_TYPE, nNumberFormat)); } - - if( !isOutlineNumbering()) + // todo: this is not the bullet char + if( nNumberFormat == style::NumberingType::CHAR_SPECIAL ) { - // todo: this is not the bullet char - if( nNumberFormat == style::NumberingType::CHAR_SPECIAL ) + if (!m_sBulletChar.isEmpty()) { - if (!m_sBulletChar.isEmpty()) - { - aNumberingProperties.push_back(lcl_makePropVal(PROP_BULLET_CHAR, m_sBulletChar.copy(0, 1))); - } - else - { - // If w:lvlText's value is null - set bullet char to zero. - aNumberingProperties.push_back(lcl_makePropVal<sal_Unicode>(PROP_BULLET_CHAR, 0)); - } + aNumberingProperties.push_back(lcl_makePropVal(PROP_BULLET_CHAR, m_sBulletChar.copy(0, 1))); } - if (m_xGraphicBitmap.is()) + else { - aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_BITMAP, m_xGraphicBitmap)); - aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_SIZE, m_aGraphicSize)); + // If w:lvlText's value is null - set bullet char to zero. + aNumberingProperties.push_back(lcl_makePropVal<sal_Unicode>(PROP_BULLET_CHAR, 0)); } } + if (m_xGraphicBitmap.is()) + { + aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_BITMAP, m_xGraphicBitmap)); + aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_SIZE, m_aGraphicSize)); + } if (bDefaults || m_nTabstop != 0) aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, m_nTabstop)); |