diff options
author | Adam Co <rattles2013@gmail.com> | 2013-07-10 19:12:45 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-24 15:08:03 +0200 |
commit | 71e1927c78e3873c377d87feb64b33286138756b (patch) | |
tree | f960abdef7d5c8573529061985cc58ab1168f841 /xmloff | |
parent | Remove dead function: ImplgetCounterPart() (diff) | |
download | core-71e1927c78e3873c377d87feb64b33286138756b.tar.gz core-71e1927c78e3873c377d87feb64b33286138756b.zip |
fdo#66781 : fix bullets with level 0
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: I14b0ce9ae096eae4759793a49865eefe16ec1afd
Reviewed-on: https://gerrit.libreoffice.org/4818
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnume.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 15 |
2 files changed, 12 insertions, 9 deletions
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 01df8d8b2b3b..2b0e309a0ed2 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -287,7 +287,11 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_BULLET_CHAR, sTmp.makeStringAndClear() ); } - + else + { + // If 'cBullet' is zero, XML_BULLET_CHAR must exist with blank. + GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_BULLET_CHAR, ""); + } } else if( NumberingType::BITMAP == eType ) { diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 88b65a18d4bf..3047c9047dc7 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -417,7 +417,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( if( bBullet ) { eType = NumberingType::CHAR_SPECIAL; - nCount = cBullet ? 15 : 14; + nCount = 15; // 'cBullet' will be written anyway if 'bBullet' is true } if( bImage ) { @@ -533,13 +533,12 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( aFDesc.Name = OUString( "StarSymbol" ); } - if( cBullet ) - { - OUStringBuffer sTmp(1); - sTmp.append( cBullet ); - pProps[nPos].Name = "BulletChar"; - pProps[nPos++].Value <<= sTmp.makeStringAndClear(); - } + // Must append 'cBullet' even if it is zero + // if 'bBullet' is true and 'cBullet' is zero - BulletChar property must be 0. + OUStringBuffer sTmp(1); + sTmp.append( cBullet ); + pProps[nPos].Name = "BulletChar"; + pProps[nPos++].Value <<= sTmp.makeStringAndClear(); pProps[nPos].Name = "BulletFont"; pProps[nPos++].Value <<= aFDesc; |