summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorEike Rathke <er@openoffice.org>2001-01-30 13:56:09 +0000
committerEike Rathke <er@openoffice.org>2001-01-30 13:56:09 +0000
commitb950512e1163b42a4e2c6ade3a111be559da00ce (patch)
tree14f1c2f3e6d66bacc73d0bbd0d13c4adf2fe18cc /svtools
parent9725d287904bdd1b6963a6e388971ed55f5cc181 (diff)
add: GetFormatDecimalSep
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/numbers/zforlist.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/svtools/source/numbers/zforlist.cxx b/svtools/source/numbers/zforlist.cxx
index 863ebc8b6192..7cf52f6198b3 100644
--- a/svtools/source/numbers/zforlist.cxx
+++ b/svtools/source/numbers/zforlist.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: zforlist.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: er $ $Date: 2001-01-26 17:45:08 $
+ * last change: $Author: er $ $Date: 2001-01-30 14:56:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1506,7 +1506,7 @@ void SvNumberFormatter::GetFormatSpecialInfo(ULONG nFormat,
USHORT& nAnzLeading)
{
- SvNumberformat* pFormat = aFTable.Get(nFormat);
+ const SvNumberformat* pFormat = aFTable.Get(nFormat);
if (pFormat)
pFormat->GetFormatSpecialInfo(bThousand, IsRed,
nPrecision, nAnzLeading);
@@ -1521,7 +1521,7 @@ void SvNumberFormatter::GetFormatSpecialInfo(ULONG nFormat,
USHORT SvNumberFormatter::GetFormatPrecision( ULONG nFormat ) const
{
- SvNumberformat* pFormat = aFTable.Get( nFormat );
+ const SvNumberformat* pFormat = aFTable.Get( nFormat );
if ( pFormat )
return pFormat->GetFormatPrecision();
else
@@ -1529,6 +1529,20 @@ USHORT SvNumberFormatter::GetFormatPrecision( ULONG nFormat ) const
}
+String SvNumberFormatter::GetFormatDecimalSep( ULONG nFormat ) const
+{
+ const SvNumberformat* pFormat = aFTable.Get( nFormat );
+ if ( !pFormat || pFormat->GetLanguage() == ActLnge )
+ return pLocaleData->getNumDecimalSep();
+
+ ::com::sun::star::lang::Locale aSaveLocale( pLocaleData->getLocale() );
+ pLocaleData->setLocale( ConvertLanguageToLocale( pFormat->GetLanguage() ) );
+ String aRet( pLocaleData->getNumDecimalSep() );
+ pLocaleData->setLocale( aSaveLocale );
+ return aRet;
+}
+
+
ULONG SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
BOOL& bThousand, BOOL& IsRed, USHORT& nPrecision,
USHORT& nAnzLeading, LanguageType eLnge )