Index: inc/zforlist.hxx
===================================================================
RCS file: /cvs/util/svtools/inc/zforlist.hxx,v
retrieving revision 1.36
retrieving revision 1.36.40.2
diff -u -r1.36 -r1.36.40.2
--- inc/zforlist.hxx 23 Sep 2005 12:15:58 -0000 1.36
+++ inc/zforlist.hxx 1 Nov 2005 14:00:47 -0000 1.36.40.2
@@ -246,10 +246,10 @@
#endif
#ifdef _ZFORLIST_DECLARE_TABLE
DECLARE_TABLE (SvNumberFormatTable, SvNumberformat*);
-DECLARE_TABLE (SvULONGTable, ULONG*);
+DECLARE_TABLE (SvNumberFormatterIndexTable, sal_uInt32*);
#else
typedef Table SvNumberFormatTable;
-typedef Table SvULONGTable;
+typedef Table SvNumberFormatterIndexTable;
#endif
@@ -396,24 +396,24 @@
/** Get table of formats of a specific type of a language/country.
FIndex returns the default format of that type. */
SvNumberFormatTable& GetEntryTable(short eType,
- ULONG& FIndex,
+ sal_uInt32& FIndex,
LanguageType eLnge);
/** Get table of formats of a specific type of a language/country.
FIndex returns the default format of that type.
If the language/country was never touched before new entries are generated */
SvNumberFormatTable& ChangeCL(short eType,
- ULONG& FIndex,
+ sal_uInt32& FIndex,
LanguageType eLnge);
/** Get table of formats of the same type as FIndex; eType and rLnge are
set accordingly. An unknown format is set to Standard/General */
SvNumberFormatTable& GetFirstEntryTable(short& eType,
- ULONG& FIndex,
+ sal_uInt32& FIndex,
LanguageType& rLnge);
/// Delete an entry including the format it is refering to
- void DeleteEntry(ULONG nKey);
+ void DeleteEntry(sal_uInt32 nKey);
/** Create new entry of a format code string for language/country.
@return
@@ -428,14 +428,14 @@
nType contains the type of the format.
nKey contains the index key of the format.
*/
- BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, ULONG& nKey,
+ BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Same as PutEntry but the format code string is
considered to be of language/country eLnge and is converted to
language/country eNewLnge */
BOOL PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
- short& nType, ULONG& nKey,
+ short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
/** Same as PutandConvertEntry but the format code string
@@ -443,7 +443,7 @@
converted to another System language/country eNewLnge. In this case
the automatic currency is converted too. */
BOOL PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
- short& nType, ULONG& nKey,
+ short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
/** Similar to PutEntry and
@@ -483,14 +483,14 @@
rNewInserted==FALSE and rCheckPos>0 the format code has errors
and/or could not be converted.
*/
- ULONG GetIndexPuttingAndConverting( String & rString, LanguageType eLnge,
+ sal_uInt32 GetIndexPuttingAndConverting( String & rString, LanguageType eLnge,
LanguageType eSysLnge, short & rType,
BOOL & rNewInserted,
xub_StrLen & rCheckPos );
/** Create a format code string using format nIndex as a template and
applying other settings (passed from the dialog) */
- void GenerateFormat( String& sString, ULONG nIndex,
+ void GenerateFormat( String& sString, sal_uInt32 nIndex,
LanguageType eLnge = LANGUAGE_DONTKNOW,
BOOL bThousand = FALSE, BOOL IsRed = FALSE,
USHORT nPrecision = 0, USHORT nAnzLeading = 1 );
@@ -502,22 +502,22 @@
returned in fOutNumber
if input is not a number
*/
- BOOL IsNumberFormat( const String& sString, ULONG& F_Index, double& fOutNumber );
+ BOOL IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
/// Format a number according to a format index, return string and color
- void GetOutputString( const double& fOutNumber, ULONG nFIndex,
+ void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex,
String& sOutString, Color** ppColor );
/** Format a string according to a format index, return string and color.
Formats only if the format code is of type text or the 4th subcode
of a format code is specified, otherwise sOutString will be == "" */
- void GetOutputString( String& sString, ULONG nFIndex,
+ void GetOutputString( String& sString, sal_uInt32 nFIndex,
String& sOutString, Color** ppColor );
/** Format a number according to the standard default format matching
the given format index */
void GetInputLineString( const double& fOutNumber,
- ULONG nFIndex, String& sOutString );
+ sal_uInt32 nFIndex, String& sOutString );
/** Format a number according to a format code string to be scanned.
@return
@@ -538,13 +538,13 @@
@return
NUMBERFORMAT_ENTRY_NOT_FOUND if not found, else the format index.
*/
- ULONG TestNewString( const String& sFormatString,
+ sal_uInt32 TestNewString( const String& sFormatString,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Whether format index nFIndex is of type text or not
- BOOL IsTextFormat(ULONG nFIndex) const;
+ BOOL IsTextFormat(sal_uInt32 nFIndex) const;
/// Whether the 4th string subcode of format index nFIndex is present
- BOOL HasTextFormat(ULONG nFIndex) const;
+ BOOL HasTextFormat(sal_uInt32 nFIndex) const;
/// Load all formats from a stream
BOOL Load( SvStream& rStream );
@@ -554,14 +554,14 @@
void PrepareSave();
/// Flag format index as used
- void SetFormatUsed(ULONG nFIndex);
+ void SetFormatUsed(sal_uInt32 nFIndex);
/// Get additional info of a format index, e.g. for dialog box
- void GetFormatSpecialInfo(ULONG nFormat, BOOL& bThousand, BOOL& IsRed,
+ void GetFormatSpecialInfo(sal_uInt32 nFormat, BOOL& bThousand, BOOL& IsRed,
USHORT& nPrecision, USHORT& nAnzLeading);
/// Count of decimals
- USHORT GetFormatPrecision( ULONG nFormat ) const;
+ USHORT GetFormatPrecision( sal_uInt32 nFormat ) const;
/** Get additional info of a format code string, e.g. for dialog box.
Uses a temporary parse, if possible use only if format code is not
@@ -570,7 +570,7 @@
0 if format code string parsed without errors, otherwise error
position (like nCheckPos on PutEntry)
*/
- ULONG GetFormatSpecialInfo( const String&, BOOL& bThousand, BOOL& IsRed,
+ sal_uInt32 GetFormatSpecialInfo( const String&, BOOL& bThousand, BOOL& IsRed,
USHORT& nPrecision, USHORT& nAnzLeading,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -579,31 +579,31 @@
/** Return the format index of the format code string for language/country,
or NUMBERFORMAT_ENTRY_NOT_FOUND */
- ULONG GetEntryKey( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
+ sal_uInt32 GetEntryKey( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Return the format for a format index
- const SvNumberformat* GetEntry(ULONG nKey) const
+ const SvNumberformat* GetEntry(sal_uInt32 nKey) const
{ return (SvNumberformat*) aFTable.Get(nKey); }
/// Return the format index of the standard default number format for language/country
- ULONG GetStandardIndex(LanguageType eLnge = LANGUAGE_DONTKNOW);
+ sal_uInt32 GetStandardIndex(LanguageType eLnge = LANGUAGE_DONTKNOW);
/// Return the format index of the default format of a type for language/country
- ULONG GetStandardFormat(short eType, LanguageType eLnge = LANGUAGE_DONTKNOW);
+ sal_uInt32 GetStandardFormat(short eType, LanguageType eLnge = LANGUAGE_DONTKNOW);
/** Return the format index of the default format of a type for language/country.
Maybe not the default format but a special builtin format, e.g. for
NF_TIME_HH_MMSS00, if that format is passed in nFIndex. */
- ULONG GetStandardFormat( ULONG nFIndex, short eType, LanguageType eLnge );
+ sal_uInt32 GetStandardFormat( sal_uInt32 nFIndex, short eType, LanguageType eLnge );
/** Return the format index of the default format of a type for language/country.
Maybe not the default format but a special builtin format, e.g. for
NF_TIME_HH_MMSS00, or NF_TIME_HH_MMSS if fNumber >= 1.0 */
- ULONG GetStandardFormat( double fNumber, ULONG nFIndex, short eType,
+ sal_uInt32 GetStandardFormat( double fNumber, sal_uInt32 nFIndex, short eType,
LanguageType eLnge );
/// Whether nFIndex is a special builtin format
- BOOL IsSpecialStandardFormat( ULONG nFIndex, LanguageType eLnge );
+ BOOL IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
/// Return the reference date
Date* GetNullDate();
@@ -613,36 +613,36 @@
BOOL GetNoZero() { return bNoZero; }
/** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry),
but with NUMBERFORMAT_DEFINED masked out */
- short GetType(ULONG nFIndex);
+ short GetType(sal_uInt32 nFIndex);
/// As the name says
void ClearMergeTable();
/// Merge in all new entries from rNewTable and return a table of resulting new format indices
- SvULONGTable* MergeFormatter(SvNumberFormatter& rNewTable);
+ SvNumberFormatterIndexTable* MergeFormatter(SvNumberFormatter& rNewTable);
/// Whether a merge table is present or not
inline BOOL HasMergeFmtTbl() const;
/// Return the new format index for an old format index, if a merge table exists
- inline ULONG GetMergeFmtIndex( ULONG nOldFmt ) const;
+ inline sal_uInt32 GetMergeFmtIndex( sal_uInt32 nOldFmt ) const;
/// Return the last used position ever of a language/country combination
- USHORT GetLastInsertKey(ULONG CLOffset);
+ USHORT GetLastInsertKey(sal_uInt32 CLOffset);
/** Return the format index of a builtin format for a specific language/country.
If nFormat is not a builtin format nFormat is returned. */
- ULONG GetFormatForLanguageIfBuiltIn( ULONG nFormat,
+ sal_uInt32 GetFormatForLanguageIfBuiltIn( sal_uInt32 nFormat,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Return the format index for a builtin format of a specific language
@see NfIndexTableOffset
*/
- ULONG GetFormatIndex( NfIndexTableOffset, LanguageType eLnge = LANGUAGE_DONTKNOW );
+ sal_uInt32 GetFormatIndex( NfIndexTableOffset, LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Return enum index of a format index of a builtin format,
NF_INDEX_TABLE_ENTRIES if it's not a builtin format.
@see NfIndexTableOffset
*/
- NfIndexTableOffset GetIndexTableOffset( ULONG nFormat ) const;
+ NfIndexTableOffset GetIndexTableOffset( sal_uInt32 nFormat ) const;
/** Set evaluation type and order of input date strings
@see NfEvalDateFormat
@@ -672,7 +672,7 @@
String GetDecimalSep() const { return GetNumDecimalSep(); }
/// Return the decimal separator matching the locale of the given format
- String GetFormatDecimalSep( ULONG nFormat ) const;
+ String GetFormatDecimalSep( sal_uInt32 nFormat ) const;
/// Return a SvPtrArr with pointers to NfCurrencyEntry entries
static const NfCurrencyTable& GetTheCurrencyTable();
@@ -725,7 +725,7 @@
If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is
returned, even if the format code only contains [$xxx] !
*/
- BOOL GetNewCurrencySymbolString( ULONG nFormat, String& rSymbol,
+ BOOL GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
const NfCurrencyEntry** ppEntry = NULL, BOOL* pBank = NULL ) const;
/** Look up the corresponding NfCurrencyEntry matching
@@ -803,7 +803,7 @@
SvNumberFormatTable aFTable; // Table of format keys to format entries
Table aDefaultFormatKeys; // Table of default standard to format keys
SvNumberFormatTable* pFormatTable; // For the UI dialog
- SvULONGTable* pMergeTable; // List of indices for merging two formatters
+ SvNumberFormatterIndexTable* pMergeTable; // List of indices for merging two formatters
CharClass* pCharClass; // CharacterClassification
OnDemandLocaleDataWrapper xLocaleData; // LocaleData switched between SYSTEM, ENGLISH and other
OnDemandTransliterationWrapper xTransliteration; // Transliteration loaded on demand
@@ -812,8 +812,8 @@
ImpSvNumberInputScan* pStringScanner; // Input string scanner
ImpSvNumberformatScan* pFormatScanner; // Format code string scanner
Link aColorLink; // User defined color table CallBack
- ULONG MaxCLOffset; // Max language/country offset used
- ULONG nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale
+ sal_uInt32 MaxCLOffset; // Max language/country offset used
+ sal_uInt32 nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale
LanguageType IniLnge; // Initialized setting language/country
LanguageType ActLnge; // Current setting language/country
NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation
@@ -842,38 +842,38 @@
// Generate builtin formats provided by i18n behind CLOffset,
// if bLoadingSO5==FALSE also generate additional i18n formats.
- SVT_DLLPRIVATE void ImpGenerateFormats( ULONG CLOffset, BOOL bLoadingSO5 );
+ SVT_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 );
// Generate additional formats provided by i18n
SVT_DLLPRIVATE void ImpGenerateAdditionalFormats(
- ULONG CLOffset,
+ sal_uInt32 CLOffset,
NumberFormatCodeWrapper& rNumberFormatCode,
BOOL bAfterLoadingSO5 );
SVT_DLLPRIVATE SvNumberformat* ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- ULONG nPos,
+ sal_uInt32 nPos,
BOOL bAfterLoadingSO5 = FALSE,
sal_Int16 nOrgIndex = 0 );
// ImpInsertNewStandardFormat for new (since version ...) builtin formats
SVT_DLLPRIVATE SvNumberformat* ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- ULONG nPos,
+ sal_uInt32 nPos,
USHORT nVersion,
BOOL bAfterLoadingSO5 = FALSE,
sal_Int16 nOrgIndex = 0 );
// Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country
- SVT_DLLPRIVATE ULONG ImpGetCLOffset(LanguageType eLnge) const;
+ SVT_DLLPRIVATE sal_uInt32 ImpGetCLOffset(LanguageType eLnge) const;
// Test whether format code already exists, then return index key,
// otherwise NUMBERFORMAT_ENTRY_NOT_FOUND
- SVT_DLLPRIVATE ULONG ImpIsEntry( const String& rString,
- ULONG CLOffset,
+ SVT_DLLPRIVATE sal_uInt32 ImpIsEntry( const String& rString,
+ sal_uInt32 CLOffset,
LanguageType eLnge );
// Create builtin formats for language/country if necessary, return CLOffset
- SVT_DLLPRIVATE ULONG ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 = FALSE );
+ SVT_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 = FALSE );
// Build negative currency format, old compatibility style
SVT_DLLPRIVATE void ImpGetNegCurrFormat( String& sNegStr, const String& rCurrSymbol );
@@ -885,15 +885,15 @@
// Return the format index of the currency format of the system locale.
// Format is created if not already present.
- SVT_DLLPRIVATE ULONG ImpGetDefaultSystemCurrencyFormat();
+ SVT_DLLPRIVATE sal_uInt32 ImpGetDefaultSystemCurrencyFormat();
// Return the format index of the currency format of the current locale.
// Format is created if not already present.
- SVT_DLLPRIVATE ULONG ImpGetDefaultCurrencyFormat();
+ SVT_DLLPRIVATE sal_uInt32 ImpGetDefaultCurrencyFormat();
// Return the default format for a given type and current locale.
// May ONLY be called from within GetStandardFormat().
- SVT_DLLPRIVATE ULONG ImpGetDefaultFormat( short nType );
+ SVT_DLLPRIVATE sal_uInt32 ImpGetDefaultFormat( short nType );
// Return the index in a sequence of format codes matching an enum of
// NfIndexTableOffset. If not found 0 is returned. If the sequence doesn't
@@ -996,9 +996,9 @@
// --------------------------- inline --------------------------------------
-inline ULONG SvNumberFormatter::GetMergeFmtIndex( ULONG nOldFmt ) const
+inline sal_uInt32 SvNumberFormatter::GetMergeFmtIndex( sal_uInt32 nOldFmt ) const
{
- ULONG* pU = (pMergeTable && pMergeTable->Count()) ? (ULONG*)pMergeTable->Get( nOldFmt ) : 0;
+ sal_uInt32* pU = (pMergeTable && pMergeTable->Count()) ? (sal_uInt32*)pMergeTable->Get( nOldFmt ) : 0;
return pU ? *pU : nOldFmt;
}
Index: source/control/fmtfield.cxx
===================================================================
RCS file: /cvs/util/svtools/source/control/fmtfield.cxx,v
retrieving revision 1.30
retrieving revision 1.30.64.1
diff -u -r1.30 -r1.30.64.1
--- source/control/fmtfield.cxx 8 Sep 2005 15:02:16 -0000 1.30
+++ source/control/fmtfield.cxx 26 Oct 2005 17:51:38 -0000 1.30.64.1
@@ -688,7 +688,7 @@
LanguageType aOldLang;
GetFormat(sOldFormat, aOldLang);
- ULONG nDestKey = pFormatter->TestNewString(sOldFormat);
+ sal_uInt32 nDestKey = pFormatter->TestNewString(sOldFormat);
if (nDestKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
// die Sprache des neuen Formatters
@@ -721,7 +721,7 @@
BOOL FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang)
{
DBG_CHKTHIS(FormattedField, NULL);
- ULONG nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
+ sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
USHORT nCheckPos;
@@ -772,7 +772,7 @@
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
// ... and introduce it to the formatter
USHORT nCheckPos;
- ULONG nNewKey;
+ sal_uInt32 nNewKey;
short nType;
ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang);
@@ -816,7 +816,7 @@
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading);
// ... and introduce it to the formatter
USHORT nCheckPos;
- ULONG nNewKey;
+ sal_uInt32 nNewKey;
short nType;
ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang);
@@ -1039,7 +1039,7 @@
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !");
- ULONG nFormatKey = m_nFormatKey; // IsNumberFormat veraendert den FormatKey ...
+ sal_uInt32 nFormatKey = m_nFormatKey; // IsNumberFormat veraendert den FormatKey ...
if (ImplGetFormatter()->IsTextFormat(nFormatKey) && m_bTreatAsNumber)
// damit wir in einem als Text formatierten Feld trotzdem eine Eingabe wie '1,1' erkennen ...
@@ -1053,7 +1053,7 @@
// the default number format for this language
ULONG nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage);
- ULONG nTempFormat = nStandardNumericFormat;
+ sal_uInt32 nTempFormat = nStandardNumericFormat;
double dTemp;
if (m_pFormatter->IsNumberFormat(sText, nTempFormat, dTemp) &&
NUMBERFORMAT_NUMBER == m_pFormatter->GetType(nTempFormat))
Index: source/numbers/numfmuno.cxx
===================================================================
RCS file: /cvs/util/svtools/source/numbers/numfmuno.cxx,v
retrieving revision 1.7
retrieving revision 1.7.62.1
diff -u -r1.7 -r1.7.62.1
--- source/numbers/numfmuno.cxx 8 Sep 2005 16:33:29 -0000 1.7
+++ source/numbers/numfmuno.cxx 26 Oct 2005 17:51:39 -0000 1.7.62.1
@@ -204,7 +204,7 @@
if (pFormatter)
{
String aTemp = aString;
- ULONG nUKey = nKey;
+ sal_uInt32 nUKey = nKey;
double fValue = 0.0;
if ( pFormatter->IsNumberFormat(aTemp, nUKey, fValue) )
nRet = nUKey;
@@ -228,7 +228,7 @@
if (pFormatter)
{
String aTemp = aString;
- ULONG nUKey = nKey;
+ sal_uInt32 nUKey = nKey;
double fValue = 0.0;
if ( pFormatter->IsNumberFormat(aTemp, nUKey, fValue) )
fRet = fValue;
@@ -481,15 +481,15 @@
SvNumberFormatter* pFormatter = pSupplier ? pSupplier->GetNumberFormatter() : NULL;
if ( pFormatter )
{
- ULONG nIndex = 0;
+ sal_uInt32 nIndex = 0;
LanguageType eLang = lcl_GetLanguage( nLocale );
SvNumberFormatTable& rTable = bCreate ?
pFormatter->ChangeCL( nType, nIndex, eLang ) :
pFormatter->GetEntryTable( nType, nIndex, eLang );
- ULONG nCount = rTable.Count();
+ sal_uInt32 nCount = rTable.Count();
uno::Sequence aSeq(nCount);
sal_Int32* pAry = aSeq.getArray();
- for (ULONG i=0; iPutEntry( aFormStr, nCheckPos, nType, nKey, eLang );
@@ -568,7 +568,7 @@
String aFormStr = aFormat;
LanguageType eLang = lcl_GetLanguage( nLocale );
LanguageType eNewLang = lcl_GetLanguage( nNewLocale );
- ULONG nKey = 0;
+ sal_uInt32 nKey = 0;
xub_StrLen nCheckPos = 0;
short nType = 0;
BOOL bOk = pFormatter->PutandConvertEntry( aFormStr, nCheckPos, nType, nKey, eLang, eNewLang );
Index: source/numbers/numuno.cxx
===================================================================
RCS file: /cvs/util/svtools/source/numbers/numuno.cxx,v
retrieving revision 1.4
retrieving revision 1.4.62.1
diff -u -r1.4 -r1.4.62.1
--- source/numbers/numuno.cxx 8 Sep 2005 16:34:36 -0000 1.4
+++ source/numbers/numuno.cxx 26 Oct 2005 17:51:40 -0000 1.4.62.1
@@ -91,7 +91,7 @@
pImpl->pFormatter = pNew;
}
-void SvNumberFormatsSupplierObj::NumberFormatDeleted(ULONG nKey)
+void SvNumberFormatsSupplierObj::NumberFormatDeleted(sal_uInt32 nKey)
{
// Basis-Implementierung tut nix...
}
Index: source/numbers/zforlist.cxx
===================================================================
RCS file: /cvs/util/svtools/source/numbers/zforlist.cxx,v
retrieving revision 1.57
retrieving revision 1.57.40.2
diff -u -r1.57 -r1.57.40.2
--- source/numbers/zforlist.cxx 23 Sep 2005 12:16:20 -0000 1.57
+++ source/numbers/zforlist.cxx 1 Nov 2005 14:00:47 -0000 1.57.40.2
@@ -131,7 +131,7 @@
#define UNKNOWN_SUBSTITUTE LANGUAGE_ENGLISH_US
static BOOL bIndexTableInitialized = FALSE;
-static ULONG __FAR_DATA theIndexTable[NF_INDEX_TABLE_ENTRIES];
+static sal_uInt32 __FAR_DATA theIndexTable[NF_INDEX_TABLE_ENTRIES];
// ====================================================================
@@ -155,7 +155,7 @@
{ aFormatters.Insert( pThis, LIST_APPEND ); }
SvNumberFormatter* Remove( SvNumberFormatter* pThis )
{ return (SvNumberFormatter*)aFormatters.Remove( pThis ); }
- ULONG Count()
+ sal_uInt32 Count()
{ return aFormatters.Count(); }
virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
@@ -437,7 +437,7 @@
}
else if ( bLoadingSO5 )
{ // delete additional standard formats
- ULONG nKey;
+ sal_uInt32 nKey;
aFTable.Seek( SV_MAX_ANZ_STANDARD_FORMATE + 1 );
while ( (nKey = aFTable.GetCurKey()) > SV_MAX_ANZ_STANDARD_FORMATE &&
nKey < SV_COUNTRY_LANGUAGE_OFFSET )
@@ -451,13 +451,13 @@
void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
{
- ULONG nCLOffset = ImpGetCLOffset( LANGUAGE_SYSTEM );
+ sal_uInt32 nCLOffset = ImpGetCLOffset( LANGUAGE_SYSTEM );
if ( nCLOffset > MaxCLOffset )
return ; // no SYSTEM entries to replace
- const ULONG nMaxBuiltin = nCLOffset + SV_MAX_ANZ_STANDARD_FORMATE;
- const ULONG nNextCL = nCLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
- ULONG nKey;
+ const sal_uInt32 nMaxBuiltin = nCLOffset + SV_MAX_ANZ_STANDARD_FORMATE;
+ const sal_uInt32 nNextCL = nCLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
+ sal_uInt32 nKey;
// remove old builtin formats
aFTable.Seek( nCLOffset );
@@ -483,7 +483,7 @@
// convert additional and user defined from old system to new system
SvNumberformat* pStdFormat = (SvNumberformat*) aFTable.Get( nCLOffset + ZF_STANDARD );
- ULONG nLastKey = nMaxBuiltin;
+ sal_uInt32 nLastKey = nMaxBuiltin;
pFormatScanner->SetConvertMode( eOldLanguage, LANGUAGE_SYSTEM, TRUE );
aOldTable.First();
while ( aOldTable.Count() )
@@ -530,7 +530,7 @@
}
-BOOL SvNumberFormatter::IsTextFormat(ULONG F_Index) const
+BOOL SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index);
if (!pFormat)
@@ -539,7 +539,7 @@
return pFormat->IsTextFormat();
}
-BOOL SvNumberFormatter::HasTextFormat(ULONG F_Index) const
+BOOL SvNumberFormatter::HasTextFormat(sal_uInt32 F_Index) const
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index);
if (!pFormat)
@@ -551,7 +551,7 @@
BOOL SvNumberFormatter::PutEntry(String& rString,
xub_StrLen& nCheckPos,
short& nType,
- ULONG& nKey, // Formatnummer
+ sal_uInt32& nKey, // Formatnummer
LanguageType eLnge)
{
nKey = 0;
@@ -584,7 +584,7 @@
p_Entry->SetType(NUMBERFORMAT_DEFINED);
nType = NUMBERFORMAT_DEFINED;
}
- ULONG CLOffset = ImpGenerateCL(eLge); // ggfs. neu Standard-
+ sal_uInt32 CLOffset = ImpGenerateCL(eLge); // ggfs. neu Standard-
// formate anlegen
nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLge);
if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // schon vorhanden
@@ -593,7 +593,7 @@
{
SvNumberformat* pStdFormat =
(SvNumberformat*) aFTable.Get(CLOffset + ZF_STANDARD);
- ULONG nPos = CLOffset + pStdFormat->GetLastInsertKey();
+ sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey();
if (nPos - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET)
{
Sound::Beep();
@@ -618,7 +618,7 @@
BOOL SvNumberFormatter::PutandConvertEntry(String& rString,
xub_StrLen& nCheckPos,
short& nType,
- ULONG& nKey,
+ sal_uInt32& nKey,
LanguageType eLnge,
LanguageType eNewLnge)
{
@@ -636,7 +636,7 @@
BOOL SvNumberFormatter::PutandConvertEntrySystem(String& rString,
xub_StrLen& nCheckPos,
short& nType,
- ULONG& nKey,
+ sal_uInt32& nKey,
LanguageType eLnge,
LanguageType eNewLnge)
{
@@ -651,11 +651,11 @@
}
-ULONG SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
+sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
LanguageType eLnge, LanguageType eSysLnge, short & rType,
BOOL & rNewInserted, xub_StrLen & rCheckPos )
{
- ULONG nKey = NUMBERFORMAT_ENTRY_NOT_FOUND;
+ sal_uInt32 nKey = NUMBERFORMAT_ENTRY_NOT_FOUND;
rNewInserted = FALSE;
rCheckPos = 0;
@@ -665,7 +665,7 @@
else if (eLnge == LANGUAGE_SYSTEM && eSysLnge !=
Application::GetSettings().GetLanguage())
{
- ULONG nOrig = GetEntryKey( rString, eSysLnge );
+ sal_uInt32 nOrig = GetEntryKey( rString, eSysLnge );
if (nOrig == NUMBERFORMAT_ENTRY_NOT_FOUND)
nKey = nOrig; // none avaliable, maybe user-defined
else
@@ -721,7 +721,7 @@
}
-void SvNumberFormatter::DeleteEntry(ULONG nKey)
+void SvNumberFormatter::DeleteEntry(sal_uInt32 nKey)
{
SvNumberformat* pEntry = aFTable.Remove(nKey);
delete pEntry;
@@ -737,7 +737,7 @@
}
}
-void SvNumberFormatter::SetFormatUsed(ULONG nFIndex)
+void SvNumberFormatter::SetFormatUsed(sal_uInt32 nFIndex)
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nFIndex);
if (pFormat)
@@ -753,7 +753,7 @@
USHORT nVersion;
rStream >> nVersion;
SvNumberformat* pEntry;
- ULONG nPos;
+ sal_uInt32 nPos;
LanguageType eSaveSysLang, eLoadSysLang;
USHORT nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format
rStream >> nSysOnStore >> eLge; // Systemeinstellung aus
@@ -770,7 +770,7 @@
eLnge = (LanguageType) eLge;
ImpGenerateCL( eLnge, TRUE ); // ggfs. neue Standardformate anlegen
- ULONG nOffset = nPos % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
+ sal_uInt32 nOffset = nPos % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
BOOL bUserDefined = (nOffset > SV_MAX_ANZ_STANDARD_FORMATE);
//! HACK! ER 29.07.97 15:15
// SaveLang wurde bei SYSTEM nicht gespeichert sondern war auch SYSTEM,
@@ -939,7 +939,7 @@
{
LanguageType eLang = aList[j];
ChangeIntl( eLang );
- ULONG CLOffset = ImpGetCLOffset( eLang );
+ sal_uInt32 CLOffset = ImpGetCLOffset( eLang );
ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, TRUE );
}
ChangeIntl( eOldLanguage );
@@ -997,7 +997,7 @@
{
rList.Remove( 0, rList.Count() );
- ULONG nOffset = 0;
+ sal_uInt32 nOffset = 0;
while (nOffset <= MaxCLOffset)
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nOffset);
@@ -1039,10 +1039,10 @@
}
-ULONG SvNumberFormatter::ImpGetCLOffset(LanguageType eLnge) const
+sal_uInt32 SvNumberFormatter::ImpGetCLOffset(LanguageType eLnge) const
{
SvNumberformat* pFormat;
- ULONG nOffset = 0;
+ sal_uInt32 nOffset = 0;
while (nOffset <= MaxCLOffset)
{
pFormat = (SvNumberformat*) aFTable.Get(nOffset);
@@ -1053,8 +1053,8 @@
return nOffset;
}
-ULONG SvNumberFormatter::ImpIsEntry(const String& rString,
- ULONG nCLOffset,
+sal_uInt32 SvNumberFormatter::ImpIsEntry(const String& rString,
+ sal_uInt32 nCLOffset,
LanguageType eLnge)
{
#ifndef NF_COMMENT_IN_FORMATSTRING
@@ -1064,7 +1064,7 @@
String aStr( rString );
SvNumberformat::EraseComment( aStr );
#endif
- ULONG res = NUMBERFORMAT_ENTRY_NOT_FOUND;
+ sal_uInt32 res = NUMBERFORMAT_ENTRY_NOT_FOUND;
SvNumberformat* pEntry;
pEntry = (SvNumberformat*) aFTable.Seek(nCLOffset);
while ( res == NUMBERFORMAT_ENTRY_NOT_FOUND &&
@@ -1100,7 +1100,7 @@
SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable(
short& eType,
- ULONG& FIndex,
+ sal_uInt32& FIndex,
LanguageType& rLnge)
{
short eTypetmp = eType;
@@ -1138,10 +1138,10 @@
return GetEntryTable(eTypetmp, FIndex, rLnge);
}
-ULONG SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 )
+sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 )
{
ChangeIntl(eLnge);
- ULONG CLOffset = ImpGetCLOffset(ActLnge);
+ sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge);
if (CLOffset > MaxCLOffset)
{ // new CL combination
if (LocaleDataWrapper::areChecksEnabled())
@@ -1207,7 +1207,7 @@
}
SvNumberFormatTable& SvNumberFormatter::ChangeCL(short eType,
- ULONG& FIndex,
+ sal_uInt32& FIndex,
LanguageType eLnge)
{
ImpGenerateCL(eLnge);
@@ -1216,7 +1216,7 @@
SvNumberFormatTable& SvNumberFormatter::GetEntryTable(
short eType,
- ULONG& FIndex,
+ sal_uInt32& FIndex,
LanguageType eLnge)
{
if ( pFormatTable )
@@ -1224,11 +1224,11 @@
else
pFormatTable = new SvNumberFormatTable;
ChangeIntl(eLnge);
- ULONG CLOffset = ImpGetCLOffset(ActLnge);
+ sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge);
// Might generate and insert a default format for the given type
// (e.g. currency) => has to be done before collecting formats.
- ULONG nDefaultIndex = GetStandardFormat( eType, ActLnge );
+ sal_uInt32 nDefaultIndex = GetStandardFormat( eType, ActLnge );
SvNumberformat* pEntry;
pEntry = (SvNumberformat*) aFTable.Seek(CLOffset);
@@ -1261,7 +1261,7 @@
}
BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
- ULONG& F_Index,
+ sal_uInt32& F_Index,
double& fOutNumber)
{
short FType;
@@ -1383,10 +1383,10 @@
}
-ULONG SvNumberFormatter::ImpGetDefaultFormat( short nType )
+sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
{
- ULONG CLOffset = ImpGetCLOffset( ActLnge );
- ULONG nSearch;
+ sal_uInt32 CLOffset = ImpGetCLOffset( ActLnge );
+ sal_uInt32 nSearch;
switch( nType )
{
case NUMBERFORMAT_DATE :
@@ -1407,13 +1407,13 @@
default:
nSearch = CLOffset + ZF_STANDARD;
}
- ULONG nDefaultFormat = (ULONG) aDefaultFormatKeys.Get( nSearch );
+ sal_uInt32 nDefaultFormat = (sal_uInt32)(sal_uIntPtr) aDefaultFormatKeys.Get( nSearch );
if ( !nDefaultFormat )
nDefaultFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( nDefaultFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{ // look for a defined standard
- ULONG nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
- ULONG nKey;
+ sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
+ sal_uInt32 nKey;
aFTable.Seek( CLOffset );
while ( (nKey = aFTable.GetCurKey()) >= CLOffset && nKey < nStopKey )
{
@@ -1457,9 +1457,9 @@
}
-ULONG SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge )
+sal_uInt32 SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge )
{
- ULONG CLOffset = ImpGenerateCL(eLnge);
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge);
switch(eType)
{
case NUMBERFORMAT_CURRENCY :
@@ -1487,7 +1487,7 @@
}
}
-BOOL SvNumberFormatter::IsSpecialStandardFormat( ULONG nFIndex,
+BOOL SvNumberFormatter::IsSpecialStandardFormat( sal_uInt32 nFIndex,
LanguageType eLnge )
{
return
@@ -1497,7 +1497,7 @@
;
}
-ULONG SvNumberFormatter::GetStandardFormat( ULONG nFIndex, short eType,
+sal_uInt32 SvNumberFormatter::GetStandardFormat( sal_uInt32 nFIndex, short eType,
LanguageType eLnge )
{
if ( IsSpecialStandardFormat( nFIndex, eLnge ) )
@@ -1506,7 +1506,7 @@
return GetStandardFormat( eType, eLnge );
}
-ULONG SvNumberFormatter::GetStandardFormat( double fNumber, ULONG nFIndex,
+sal_uInt32 SvNumberFormatter::GetStandardFormat( double fNumber, sal_uInt32 nFIndex,
short eType, LanguageType eLnge )
{
if ( IsSpecialStandardFormat( nFIndex, eLnge ) )
@@ -1547,7 +1547,7 @@
}
void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
- ULONG nFIndex,
+ sal_uInt32 nFIndex,
String& sOutString)
{
SvNumberformat* pFormat;
@@ -1572,7 +1572,7 @@
nOldPrec = pFormatScanner->GetStandardPrec();
ChangeStandardPrec(300); // Merkwert
}
- ULONG nKey = nFIndex;
+ sal_uInt32 nKey = nFIndex;
switch ( eType )
{ // #61619# immer vierstelliges Jahr editieren
case NUMBERFORMAT_DATE :
@@ -1600,7 +1600,7 @@
}
void SvNumberFormatter::GetOutputString(const double& fOutNumber,
- ULONG nFIndex,
+ sal_uInt32 nFIndex,
String& sOutString,
Color** ppColor)
{
@@ -1617,7 +1617,7 @@
}
void SvNumberFormatter::GetOutputString(String& sString,
- ULONG nFIndex,
+ sal_uInt32 nFIndex,
String& sOutString,
Color** ppColor)
{
@@ -1646,7 +1646,7 @@
return FALSE;
xub_StrLen nCheckPos;
- ULONG nKey;
+ sal_uInt32 nKey;
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
ChangeIntl(eLnge); // ggfs. austauschen
@@ -1659,7 +1659,7 @@
eLnge);
if (nCheckPos == 0) // String ok
{
- ULONG CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
// formate anlegen
nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLnge);
if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // schon vorhanden
@@ -1693,8 +1693,8 @@
BOOL bEnglish = (eLnge == LANGUAGE_ENGLISH_US);
String aFormatStringUpper( pCharClass->upper( sFormatString ) );
- ULONG nCLOffset = ImpGenerateCL( eLnge );
- ULONG nKey = ImpIsEntry( aFormatStringUpper, nCLOffset, eLnge );
+ sal_uInt32 nCLOffset = ImpGenerateCL( eLnge );
+ sal_uInt32 nKey = ImpIsEntry( aFormatStringUpper, nCLOffset, eLnge );
if ( nKey != NUMBERFORMAT_ENTRY_NOT_FOUND )
{ // Zielformat vorhanden
GetOutputString( fPreviewNumber, nKey, sOutString, ppColor );
@@ -1771,7 +1771,7 @@
return FALSE;
}
-ULONG SvNumberFormatter::TestNewString(const String& sFormatString,
+sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString,
LanguageType eLnge)
{
if (sFormatString.Len() == 0) // keinen Leerstring
@@ -1782,7 +1782,7 @@
eLnge = IniLnge;
ChangeIntl(eLnge); // ggfs. austauschen
eLnge = ActLnge;
- ULONG nRes;
+ sal_uInt32 nRes;
String sTmpString = sFormatString;
SvNumberformat* pEntry = new SvNumberformat(sTmpString,
pFormatScanner,
@@ -1791,7 +1791,7 @@
eLnge);
if (nCheckPos == 0) // String ok
{
- ULONG CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
// formate anlegen
nRes = ImpIsEntry(pEntry->GetFormatstring(),CLOffset, eLnge);
// schon vorhanden ?
@@ -1804,7 +1804,7 @@
SvNumberformat* SvNumberFormatter::ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- ULONG nPos, BOOL bAfterLoadingSO5, sal_Int16 nOrgIndex )
+ sal_uInt32 nPos, BOOL bAfterLoadingSO5, sal_Int16 nOrgIndex )
{
String aCodeStr( rCode.Code );
if ( rCode.Index < NF_INDEX_TABLE_ENTRIES &&
@@ -1851,8 +1851,8 @@
}
if ( rCode.Index >= NF_INDEX_TABLE_ENTRIES )
{
- ULONG nCLOffset = nPos - (nPos % SV_COUNTRY_LANGUAGE_OFFSET);
- ULONG nKey = ImpIsEntry( aCodeStr, nCLOffset, ActLnge );
+ sal_uInt32 nCLOffset = nPos - (nPos % SV_COUNTRY_LANGUAGE_OFFSET);
+ sal_uInt32 nKey = ImpIsEntry( aCodeStr, nCLOffset, ActLnge );
if ( nKey != NUMBERFORMAT_ENTRY_NOT_FOUND )
{
if (LocaleDataWrapper::areChecksEnabled())
@@ -1925,7 +1925,7 @@
SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- ULONG nPos, USHORT nVersion, BOOL bAfterLoadingSO5,
+ sal_uInt32 nPos, USHORT nVersion, BOOL bAfterLoadingSO5,
sal_Int16 nOrgIndex )
{
SvNumberformat* pNewFormat = ImpInsertFormat( rCode, nPos,
@@ -1936,7 +1936,7 @@
return pNewFormat;
}
-void SvNumberFormatter::GetFormatSpecialInfo(ULONG nFormat,
+void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat,
BOOL& bThousand,
BOOL& IsRed,
USHORT& nPrecision,
@@ -1956,7 +1956,7 @@
}
}
-USHORT SvNumberFormatter::GetFormatPrecision( ULONG nFormat ) const
+USHORT SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat ) const
{
const SvNumberformat* pFormat = aFTable.Get( nFormat );
if ( pFormat )
@@ -1966,7 +1966,7 @@
}
-String SvNumberFormatter::GetFormatDecimalSep( ULONG nFormat ) const
+String SvNumberFormatter::GetFormatDecimalSep( sal_uInt32 nFormat ) const
{
const SvNumberformat* pFormat = aFTable.Get( nFormat );
if ( !pFormat || pFormat->GetLanguage() == ActLnge )
@@ -1988,7 +1988,7 @@
}
-ULONG SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
+sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
BOOL& bThousand, BOOL& IsRed, USHORT& nPrecision,
USHORT& nAnzLeading, LanguageType eLnge )
@@ -2015,7 +2015,7 @@
}
-inline ULONG SetIndexTable( NfIndexTableOffset nTabOff, ULONG nIndOff )
+inline sal_uInt32 SetIndexTable( NfIndexTableOffset nTabOff, sal_uInt32 nIndOff )
{
if ( !bIndexTableInitialized )
{
@@ -2196,7 +2196,7 @@
}
-void SvNumberFormatter::ImpGenerateFormats( ULONG CLOffset, BOOL bLoadingSO5 )
+void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 )
{
using namespace ::com::sun::star;
@@ -2626,7 +2626,7 @@
}
-void SvNumberFormatter::ImpGenerateAdditionalFormats( ULONG CLOffset,
+void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
NumberFormatCodeWrapper& rNumberFormatCode, BOOL bAfterLoadingSO5 )
{
using namespace ::com::sun::star;
@@ -2638,7 +2638,7 @@
DBG_ERRORFILE( "ImpGenerateAdditionalFormats: no GENERAL format" );
return ;
}
- ULONG nPos = CLOffset + pStdFormat->GetLastInsertKey();
+ sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey();
rNumberFormatCode.setLocale( GetLocale() );
sal_Int32 j;
@@ -2716,7 +2716,7 @@
}
void SvNumberFormatter::GenerateFormat(String& sString,
- ULONG nIndex,
+ sal_uInt32 nIndex,
LanguageType eLnge,
BOOL bThousand,
BOOL IsRed,
@@ -2839,10 +2839,10 @@
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
- ULONG CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
// formate anlegen
eLnge = ActLnge;
- ULONG nKey = ImpIsEntry(sStr, CLOffset, eLnge);
+ sal_uInt32 nKey = ImpIsEntry(sStr, CLOffset, eLnge);
if (nKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
return TRUE;
SvNumberformat* pEntry = aFTable.Get(nKey);
@@ -2851,24 +2851,24 @@
return FALSE;
}
-ULONG SvNumberFormatter::GetEntryKey(const String& sStr,
+sal_uInt32 SvNumberFormatter::GetEntryKey(const String& sStr,
LanguageType eLnge)
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
- ULONG CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard-
// formate anlegen
return ImpIsEntry(sStr, CLOffset, eLnge);
}
-ULONG SvNumberFormatter::GetStandardIndex(LanguageType eLnge)
+sal_uInt32 SvNumberFormatter::GetStandardIndex(LanguageType eLnge)
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
return GetStandardFormat(NUMBERFORMAT_NUMBER, eLnge);
}
-short SvNumberFormatter::GetType(ULONG nFIndex)
+short SvNumberFormatter::GetType(sal_uInt32 nFIndex)
{
short eType;
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nFIndex);
@@ -2887,7 +2887,7 @@
{
if ( pMergeTable )
{
- ULONG* pIndex = (ULONG*) pMergeTable->First();
+ sal_uInt32* pIndex = (sal_uInt32*) pMergeTable->First();
while (pIndex)
{
delete pIndex;
@@ -2897,15 +2897,15 @@
}
}
-SvULONGTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter& rTable)
+SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter& rTable)
{
if ( pMergeTable )
ClearMergeTable();
else
- pMergeTable = new SvULONGTable;
- ULONG nCLOffset = 0;
- ULONG nOldKey, nOffset, nNewKey;
- ULONG* pNewIndex;
+ pMergeTable = new SvNumberFormatterIndexTable;
+ sal_uInt32 nCLOffset = 0;
+ sal_uInt32 nOldKey, nOffset, nNewKey;
+ sal_uInt32* pNewIndex;
SvNumberformat* pNewEntry;
SvNumberformat* pFormat = rTable.aFTable.First();
while (pFormat)
@@ -2927,7 +2927,7 @@
}
if (nNewKey != nOldKey) // neuer Index
{
- pNewIndex = new ULONG(nNewKey);
+ pNewIndex = new sal_uInt32(nNewKey);
if (!pMergeTable->Insert(nOldKey,pNewIndex))
delete pNewIndex;
}
@@ -2945,7 +2945,7 @@
{
SvNumberformat* pStdFormat =
(SvNumberformat*) aFTable.Get(nCLOffset + ZF_STANDARD);
- ULONG nPos = nCLOffset + pStdFormat->GetLastInsertKey();
+ sal_uInt32 nPos = nCLOffset + pStdFormat->GetLastInsertKey();
nNewKey = nPos+1;
if (nPos - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET)
{
@@ -2961,7 +2961,7 @@
}
if (nNewKey != nOldKey) // neuer Index
{
- pNewIndex = new ULONG(nNewKey);
+ pNewIndex = new sal_uInt32(nNewKey);
if (!pMergeTable->Insert(nOldKey,pNewIndex))
delete pNewIndex;
}
@@ -2972,22 +2972,22 @@
}
-ULONG SvNumberFormatter::GetFormatForLanguageIfBuiltIn( ULONG nFormat,
+sal_uInt32 SvNumberFormatter::GetFormatForLanguageIfBuiltIn( sal_uInt32 nFormat,
LanguageType eLnge )
{
if ( eLnge == LANGUAGE_DONTKNOW )
eLnge = IniLnge;
if ( nFormat < SV_COUNTRY_LANGUAGE_OFFSET && eLnge == IniLnge )
return nFormat; // es bleibt wie es ist
- ULONG nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
+ sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
if ( nOffset > SV_MAX_ANZ_STANDARD_FORMATE )
return nFormat; // kein eingebautes Format
- ULONG nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren
+ sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren
return nCLOffset + nOffset;
}
-ULONG SvNumberFormatter::GetFormatIndex( NfIndexTableOffset nTabOff,
+sal_uInt32 SvNumberFormatter::GetFormatIndex( NfIndexTableOffset nTabOff,
LanguageType eLnge )
{
if ( nTabOff >= NF_INDEX_TABLE_ENTRIES
@@ -2995,14 +2995,14 @@
return NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( eLnge == LANGUAGE_DONTKNOW )
eLnge = IniLnge;
- ULONG nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren
+ sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren
return nCLOffset + theIndexTable[nTabOff];
}
-NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( ULONG nFormat ) const
+NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat ) const
{
- ULONG nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
+ sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
if ( nOffset > SV_MAX_ANZ_STANDARD_FORMATE )
return NF_INDEX_TABLE_ENTRIES; // kein eingebautes Format
for ( USHORT j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
@@ -3156,7 +3156,7 @@
}
-ULONG SvNumberFormatter::ImpGetDefaultSystemCurrencyFormat()
+sal_uInt32 SvNumberFormatter::ImpGetDefaultSystemCurrencyFormat()
{
if ( nDefaultSystemCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
@@ -3178,18 +3178,18 @@
}
-ULONG SvNumberFormatter::ImpGetDefaultCurrencyFormat()
+sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
{
- ULONG CLOffset = ImpGetCLOffset( ActLnge );
- ULONG nDefaultCurrencyFormat =
- (ULONG) aDefaultFormatKeys.Get( CLOffset + ZF_STANDARD_CURRENCY );
+ sal_uInt32 CLOffset = ImpGetCLOffset( ActLnge );
+ sal_uInt32 nDefaultCurrencyFormat =
+ (sal_uInt32)(sal_uIntPtr) aDefaultFormatKeys.Get( CLOffset + ZF_STANDARD_CURRENCY );
if ( !nDefaultCurrencyFormat )
nDefaultCurrencyFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( nDefaultCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
// look for a defined standard
- ULONG nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
- ULONG nKey;
+ sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET;
+ sal_uInt32 nKey;
aFTable.Seek( CLOffset );
while ( (nKey = aFTable.GetCurKey()) >= CLOffset && nKey < nStopKey )
{
@@ -3285,7 +3285,7 @@
}
-BOOL SvNumberFormatter::GetNewCurrencySymbolString( ULONG nFormat,
+BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
String& rStr, const NfCurrencyEntry** ppEntry /* = NULL */,
BOOL* pBank /* = NULL */ ) const
{
Index: source/numbers/zformat.cxx
===================================================================
RCS file: /cvs/util/svtools/source/numbers/zformat.cxx,v
retrieving revision 1.64
retrieving revision 1.64.30.1
diff -u -r1.64 -r1.64.30.1
--- source/numbers/zformat.cxx 28 Sep 2005 11:16:39 -0000 1.64
+++ source/numbers/zformat.cxx 26 Oct 2005 17:51:41 -0000 1.64.30.1
@@ -1549,7 +1549,7 @@
LanguageType eConvertFrom, LanguageType eConvertTo, BOOL bSystem )
{
xub_StrLen nCheckPos;
- ULONG nKey;
+ sal_uInt32 nKey;
short nType = eType;
String aFormatString( sFormatstring );
if ( bSystem )