summaryrefslogtreecommitdiff
path: root/svx/source/items/numitem.cxx
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2002-11-22 06:45:51 +0000
committerOliver Specht <os@openoffice.org>2002-11-22 06:45:51 +0000
commit5d4f997b42f040ed3ac49a2c939f0e0ef9f674b3 (patch)
tree05a8c794f47bad0943b688c073a63f33b8d40eb0 /svx/source/items/numitem.cxx
parente50ba02ab60db5a3a6e08df5a73300166f81c504 (diff)
#95525# SvxNumberType::GetNumStr(): support NULL in Arabic numberings
Diffstat (limited to 'svx/source/items/numitem.cxx')
-rw-r--r--svx/source/items/numitem.cxx35
1 files changed, 20 insertions, 15 deletions
diff --git a/svx/source/items/numitem.cxx b/svx/source/items/numitem.cxx
index 5e6cce74915d..aa910c3fa565 100644
--- a/svx/source/items/numitem.cxx
+++ b/svx/source/items/numitem.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: numitem.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: os $ $Date: 2002-09-10 08:07:34 $
+ * last change: $Author: os $ $Date: 2002-11-22 07:45:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -189,20 +189,25 @@ String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const
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&)
+ //#95525# '0' allowed for ARABIC numberings
+ if(NumberingType::ARABIC == nNumType && 0 == nNo )
+ aTmpStr = '0';
+ else
{
+ 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&)
+ {
+ }
}
}
}