From cad788328ec6ef4b3071cf9002dfac12347562da Mon Sep 17 00:00:00 2001 From: Vasily Melenchuk Date: Thu, 7 May 2020 21:28:12 +0300 Subject: 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 --- writerfilter/source/dmapper/NumberingManager.cxx | 28 ++++++++++-------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'writerfilter') 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 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(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(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)); -- cgit