diff options
author | Oliver Specht <os@openoffice.org> | 2001-08-06 11:22:31 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-08-06 11:22:31 +0000 |
commit | efafe57545ddc5b012c2ce959ee1844daa9c623c (patch) | |
tree | 489759328947456f17dc3390898c376f5dd4f6af /svx | |
parent | 3f6c44d94fff5dc67e21df5bd716cc8db4e90f49 (diff) |
#90623# assertion prevented
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/items/numitem.cxx | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/svx/source/items/numitem.cxx b/svx/source/items/numitem.cxx index fcc914c0f212..1d64a8e11f22 100644 --- a/svx/source/items/numitem.cxx +++ b/svx/source/items/numitem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: numitem.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: os $ $Date: 2001-07-26 13:23:07 $ + * last change: $Author: os $ $Date: 2001-08-06 12:22:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,6 +91,9 @@ #ifndef _COM_SUN_STAR_TEXT_XDEFAULTNUMBERINGPROVIDER_HPP_ #include <com/sun/star/text/XDefaultNumberingProvider.hpp> #endif +#ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_ +#include <com/sun/star/style/NumberingType.hpp> +#endif #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #endif @@ -114,6 +117,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::style; sal_Int32 SvxNumberType::nRefCount = 0; com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> SvxNumberType::xFormatter = 0; @@ -178,19 +182,29 @@ String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const if(bShowSymbol) { - Sequence< PropertyValue > aProperties(2); - PropertyValue* pValues = aProperties.getArray(); - pValues[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingType")); - pValues[0].Value <<= nNumType; - pValues[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); - pValues[1].Value <<= (sal_Int32)nNo; - - try - { - aTmpStr = xFormatter->makeNumberingString( aProperties, rLocale ); - } - catch(Exception&) + switch(nNumType) { + case NumberingType::CHAR_SPECIAL: + case NumberingType::BITMAP: + break; + default: + { + + Sequence< PropertyValue > aProperties(2); + PropertyValue* pValues = aProperties.getArray(); + pValues[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingType")); + pValues[0].Value <<= nNumType; + pValues[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); + pValues[1].Value <<= (sal_Int32)nNo; + + try + { + aTmpStr = xFormatter->makeNumberingString( aProperties, rLocale ); + } + catch(Exception&) + { + } + } } } return aTmpStr; @@ -925,11 +939,17 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c continue; } + sal_Bool bDot = sal_True; if( rNum.GetLevelVal()[ i ] ) - aStr += rNFmt.GetNumStr( rNum.GetLevelVal()[ i ], aLocale ); + { + if(SVX_NUM_BITMAP != rNFmt.GetNumberingType()) + aStr += rNFmt.GetNumStr( rNum.GetLevelVal()[ i ], aLocale ); + else + bDot = sal_False; + } else aStr += sal_Unicode('0'); // alle 0-Level sind eine 0 - if( i != rNum.GetLevel() ) + if( i != rNum.GetLevel() && bDot) aStr += sal_Unicode('.'); } } |