diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-05-07 21:28:12 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-05-13 16:56:26 +0200 |
commit | aeb59deeefad3d71944540c499ea6523afa59fb0 (patch) | |
tree | a1ff8ae078bda230c34efbcfa41704c4f60b36e0 /writerfilter | |
parent | fbd04aca2729754556cb8508c751cc34bd6ea31d (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94032
Diffstat (limited to 'writerfilter')
-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 eab1ac81ecc7..764fe2a387a7 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -202,28 +202,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)); |