diff options
author | Christian Lippka <cl@openoffice.org> | 2001-06-29 11:34:19 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-06-29 11:34:19 +0000 |
commit | 30d8c85e6721dbf3c3ef0dd74f6efb0c2e613fc7 (patch) | |
tree | 60fa3787495d625e2e06a605500c0f9c65b7f3a9 /xmloff | |
parent | 9d7b5198e690f5138f51b52383236316143eb602 (diff) |
#85861# allow zero bullet chars
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnume.cxx | 20 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 23 |
2 files changed, 22 insertions, 21 deletions
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index ad67e7e85cd4..26c9ffc160f5 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlnume.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: mib $ $Date: 2001-06-19 15:08:23 $ + * last change: $Author: cl $ $Date: 2001-06-29 12:34:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -234,10 +234,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, rProp.Value >>= sValue; if( sValue.getLength() > 0 ) { - // HACK - // DBG_ASSERT( (sal_Unicode)sValue[0] != 0, "WARNING: don't know how to handle zero bullet chars?" ); - if( (sal_Unicode)sValue[0] != 0 ) - cBullet = (sal_Unicode)sValue[0]; + cBullet = (sal_Unicode)sValue[0]; } } else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_BULLET_RELSIZE, sizeof(XML_UNO_NAME_NRULE_BULLET_RELSIZE)-1 ) ) @@ -345,10 +342,13 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, // <text:list-level-style-bullet> pElem = sXML_list_level_style_bullet; - // text:bullet-char="..." - sTmp.append( cBullet ); - GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_bullet_char, - sTmp.makeStringAndClear() ); + if( cBullet ) + { + // text:bullet-char="..." + sTmp.append( cBullet ); + GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_bullet_char, + sTmp.makeStringAndClear() ); + } } else if( NumberingType::BITMAP == eType ) diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 6056e86996e5..d322592e2f51 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlnumi.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: mib $ $Date: 2001-06-19 15:21:16 $ + * last change: $Author: cl $ $Date: 2001-06-29 12:34:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -363,8 +363,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( sTextStyleName = rValue; break; case XML_TOK_TEXT_LEVEL_ATTR_BULLET_CHAR: - if( rValue.getLength() > 0 ) - cBullet = rValue[0]; + cBullet = rValue[0]; break; case XML_TOK_TEXT_LEVEL_ATTR_HREF: if( bImage ) @@ -460,7 +459,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( sal_Int16 eType; sal_Int32 nCount = 0L; - if( bBullet && 0 != cBullet ) + if( bBullet ) { eType = NumberingType::CHAR_SPECIAL; nCount = 10L; @@ -561,12 +560,14 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( #endif } - OUStringBuffer sTmp(1); - sTmp.append( cBullet ); - pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_CHAR ); - pProps[nPos++].Value <<= sTmp.makeStringAndClear(); - + if( cBullet ) + { + OUStringBuffer sTmp(1); + sTmp.append( cBullet ); + pProps[nPos].Name = + OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_CHAR ); + pProps[nPos++].Value <<= sTmp.makeStringAndClear(); + } pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_FONT ); |