Lines 421-444
Link Here
|
421 |
/** Get table of formats of a specific type of a language/country. |
421 |
/** Get table of formats of a specific type of a language/country. |
422 |
FIndex returns the default format of that type. */ |
422 |
FIndex returns the default format of that type. */ |
423 |
SvNumberFormatTable& GetEntryTable(short eType, |
423 |
SvNumberFormatTable& GetEntryTable(short eType, |
424 |
ULONG& FIndex, |
424 |
sal_uInt32& FIndex, |
425 |
LanguageType eLnge); |
425 |
LanguageType eLnge); |
426 |
|
426 |
|
427 |
/** Get table of formats of a specific type of a language/country. |
427 |
/** Get table of formats of a specific type of a language/country. |
428 |
FIndex returns the default format of that type. |
428 |
FIndex returns the default format of that type. |
429 |
If the language/country was never touched before new entries are generated */ |
429 |
If the language/country was never touched before new entries are generated */ |
430 |
SvNumberFormatTable& ChangeCL(short eType, |
430 |
SvNumberFormatTable& ChangeCL(short eType, |
431 |
ULONG& FIndex, |
431 |
sal_uInt32& FIndex, |
432 |
LanguageType eLnge); |
432 |
LanguageType eLnge); |
433 |
|
433 |
|
434 |
/** Get table of formats of the same type as FIndex; eType and rLnge are |
434 |
/** Get table of formats of the same type as FIndex; eType and rLnge are |
435 |
set accordingly. An unknown format is set to Standard/General */ |
435 |
set accordingly. An unknown format is set to Standard/General */ |
436 |
SvNumberFormatTable& GetFirstEntryTable(short& eType, |
436 |
SvNumberFormatTable& GetFirstEntryTable(short& eType, |
437 |
ULONG& FIndex, |
437 |
sal_uInt32& FIndex, |
438 |
LanguageType& rLnge); |
438 |
LanguageType& rLnge); |
439 |
|
439 |
|
440 |
/// Delete an entry including the format it is refering to |
440 |
/// Delete an entry including the format it is refering to |
441 |
void DeleteEntry(ULONG nKey); |
441 |
void DeleteEntry(sal_uInt32 nKey); |
442 |
|
442 |
|
443 |
/** Create new entry of a format code string for language/country. |
443 |
/** Create new entry of a format code string for language/country. |
444 |
@return |
444 |
@return |
Lines 453-466
Link Here
|
453 |
nType contains the type of the format. |
453 |
nType contains the type of the format. |
454 |
nKey contains the index key of the format. |
454 |
nKey contains the index key of the format. |
455 |
*/ |
455 |
*/ |
456 |
BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, ULONG& nKey, |
456 |
BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey, |
457 |
LanguageType eLnge = LANGUAGE_DONTKNOW ); |
457 |
LanguageType eLnge = LANGUAGE_DONTKNOW ); |
458 |
|
458 |
|
459 |
/** Same as <method>PutEntry</method> but the format code string is |
459 |
/** Same as <method>PutEntry</method> but the format code string is |
460 |
considered to be of language/country eLnge and is converted to |
460 |
considered to be of language/country eLnge and is converted to |
461 |
language/country eNewLnge */ |
461 |
language/country eNewLnge */ |
462 |
BOOL PutandConvertEntry( String& rString, xub_StrLen& nCheckPos, |
462 |
BOOL PutandConvertEntry( String& rString, xub_StrLen& nCheckPos, |
463 |
short& nType, ULONG& nKey, |
463 |
short& nType, sal_uInt32& nKey, |
464 |
LanguageType eLnge, LanguageType eNewLnge ); |
464 |
LanguageType eLnge, LanguageType eNewLnge ); |
465 |
|
465 |
|
466 |
/** Same as <method>PutandConvertEntry</method> but the format code string |
466 |
/** Same as <method>PutandConvertEntry</method> but the format code string |
Lines 468-474
Link Here
|
468 |
converted to another System language/country eNewLnge. In this case |
468 |
converted to another System language/country eNewLnge. In this case |
469 |
the automatic currency is converted too. */ |
469 |
the automatic currency is converted too. */ |
470 |
BOOL PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos, |
470 |
BOOL PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos, |
471 |
short& nType, ULONG& nKey, |
471 |
short& nType, sal_uInt32& nKey, |
472 |
LanguageType eLnge, LanguageType eNewLnge ); |
472 |
LanguageType eLnge, LanguageType eNewLnge ); |
473 |
|
473 |
|
474 |
/** Create a format code string using format nIndex as a template and |
474 |
/** Create a format code string using format nIndex as a template and |
Lines 485-506
Link Here
|
485 |
returned in fOutNumber |
485 |
returned in fOutNumber |
486 |
<FALSE/> if input is not a number |
486 |
<FALSE/> if input is not a number |
487 |
*/ |
487 |
*/ |
488 |
BOOL IsNumberFormat( const String& sString, ULONG& F_Index, double& fOutNumber ); |
488 |
BOOL IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber ); |
489 |
|
489 |
|
490 |
/// Format a number according to a format index, return string and color |
490 |
/// Format a number according to a format index, return string and color |
491 |
void GetOutputString( const double& fOutNumber, ULONG nFIndex, |
491 |
void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex, |
492 |
String& sOutString, Color** ppColor ); |
492 |
String& sOutString, Color** ppColor ); |
493 |
|
493 |
|
494 |
/** Format a string according to a format index, return string and color. |
494 |
/** Format a string according to a format index, return string and color. |
495 |
Formats only if the format code is of type text or the 4th subcode |
495 |
Formats only if the format code is of type text or the 4th subcode |
496 |
of a format code is specified, otherwise sOutString will be == "" */ |
496 |
of a format code is specified, otherwise sOutString will be == "" */ |
497 |
void GetOutputString( String& sString, ULONG nFIndex, |
497 |
void GetOutputString( String& sString, sal_uInt32 nFIndex, |
498 |
String& sOutString, Color** ppColor ); |
498 |
String& sOutString, Color** ppColor ); |
499 |
|
499 |
|
500 |
/** Format a number according to the standard default format matching |
500 |
/** Format a number according to the standard default format matching |
501 |
the given format index */ |
501 |
the given format index */ |
502 |
void GetInputLineString( const double& fOutNumber, |
502 |
void GetInputLineString( const double& fOutNumber, |
503 |
ULONG nFIndex, String& sOutString ); |
503 |
sal_uInt32 nFIndex, String& sOutString ); |
504 |
|
504 |
|
505 |
/** Format a number according to a format code string to be scanned. |
505 |
/** Format a number according to a format code string to be scanned. |
506 |
@return |
506 |
@return |
Lines 525-533
Link Here
|
525 |
LanguageType eLnge = LANGUAGE_DONTKNOW ); |
525 |
LanguageType eLnge = LANGUAGE_DONTKNOW ); |
526 |
|
526 |
|
527 |
/// Whether format index nFIndex is of type text or not |
527 |
/// Whether format index nFIndex is of type text or not |
528 |
BOOL IsTextFormat(ULONG nFIndex) const; |
528 |
BOOL IsTextFormat(sal_uInt32 nFIndex) const; |
529 |
/// Whether the 4th string subcode of format index nFIndex is present |
529 |
/// Whether the 4th string subcode of format index nFIndex is present |
530 |
BOOL HasTextFormat(ULONG nFIndex) const; |
530 |
BOOL HasTextFormat(sal_uInt32 nFIndex) const; |
531 |
|
531 |
|
532 |
/// Load all formats from a stream |
532 |
/// Load all formats from a stream |
533 |
BOOL Load( SvStream& rStream ); |
533 |
BOOL Load( SvStream& rStream ); |
Lines 537-543
Link Here
|
537 |
void PrepareSave(); |
537 |
void PrepareSave(); |
538 |
|
538 |
|
539 |
/// Flag format index as used |
539 |
/// Flag format index as used |
540 |
void SetFormatUsed(ULONG nFIndex); |
540 |
void SetFormatUsed(sal_uInt32 nFIndex); |
541 |
|
541 |
|
542 |
/// Get additional info of a format index, e.g. for dialog box |
542 |
/// Get additional info of a format index, e.g. for dialog box |
543 |
void GetFormatSpecialInfo(ULONG nFormat, BOOL& bThousand, BOOL& IsRed, |
543 |
void GetFormatSpecialInfo(ULONG nFormat, BOOL& bThousand, BOOL& IsRed, |
Lines 565-571
Link Here
|
565 |
ULONG GetEntryKey( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW ); |
565 |
ULONG GetEntryKey( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW ); |
566 |
|
566 |
|
567 |
/// Return the format for a format index |
567 |
/// Return the format for a format index |
568 |
const SvNumberformat* GetEntry(ULONG nKey) const |
568 |
const SvNumberformat* GetEntry(sal_uInt32 nKey) const |
569 |
{ return (SvNumberformat*) aFTable.Get(nKey); } |
569 |
{ return (SvNumberformat*) aFTable.Get(nKey); } |
570 |
|
570 |
|
571 |
/// Return the format index of the standard default number format for language/country |
571 |
/// Return the format index of the standard default number format for language/country |
Lines 577-592
Link Here
|
577 |
/** Return the format index of the default format of a type for language/country. |
577 |
/** Return the format index of the default format of a type for language/country. |
578 |
Maybe not the default format but a special builtin format, e.g. for |
578 |
Maybe not the default format but a special builtin format, e.g. for |
579 |
NF_TIME_HH_MMSS00, if that format is passed in nFIndex. */ |
579 |
NF_TIME_HH_MMSS00, if that format is passed in nFIndex. */ |
580 |
ULONG GetStandardFormat( ULONG nFIndex, short eType, LanguageType eLnge ); |
580 |
ULONG GetStandardFormat( sal_uInt32 nFIndex, short eType, LanguageType eLnge ); |
581 |
|
581 |
|
582 |
/** Return the format index of the default format of a type for language/country. |
582 |
/** Return the format index of the default format of a type for language/country. |
583 |
Maybe not the default format but a special builtin format, e.g. for |
583 |
Maybe not the default format but a special builtin format, e.g. for |
584 |
NF_TIME_HH_MMSS00, or NF_TIME_HH_MMSS if fNumber >= 1.0 */ |
584 |
NF_TIME_HH_MMSS00, or NF_TIME_HH_MMSS if fNumber >= 1.0 */ |
585 |
ULONG GetStandardFormat( double fNumber, ULONG nFIndex, short eType, |
585 |
ULONG GetStandardFormat( double fNumber, sal_uInt32 nFIndex, short eType, |
586 |
LanguageType eLnge ); |
586 |
LanguageType eLnge ); |
587 |
|
587 |
|
588 |
/// Whether nFIndex is a special builtin format |
588 |
/// Whether nFIndex is a special builtin format |
589 |
BOOL IsSpecialStandardFormat( ULONG nFIndex, LanguageType eLnge ); |
589 |
BOOL IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge ); |
590 |
|
590 |
|
591 |
/// Return the reference date |
591 |
/// Return the reference date |
592 |
Date* GetNullDate(); |
592 |
Date* GetNullDate(); |
Lines 596-602
Link Here
|
596 |
BOOL GetNoZero() { return bNoZero; } |
596 |
BOOL GetNoZero() { return bNoZero; } |
597 |
/** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry), |
597 |
/** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry), |
598 |
but with NUMBERFORMAT_DEFINED masked out */ |
598 |
but with NUMBERFORMAT_DEFINED masked out */ |
599 |
short GetType(ULONG nFIndex); |
599 |
short GetType(sal_uInt32 nFIndex); |
600 |
|
600 |
|
601 |
/// As the name says |
601 |
/// As the name says |
602 |
void ClearMergeTable(); |
602 |
void ClearMergeTable(); |
Lines 796-802
Link Here
|
796 |
ImpSvNumberformatScan* pFormatScanner; // Format code string scanner |
796 |
ImpSvNumberformatScan* pFormatScanner; // Format code string scanner |
797 |
Link aColorLink; // User defined color table CallBack |
797 |
Link aColorLink; // User defined color table CallBack |
798 |
ULONG MaxCLOffset; // Max language/country offset used |
798 |
ULONG MaxCLOffset; // Max language/country offset used |
799 |
ULONG nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale |
799 |
sal_uInt32 nDefaultSystemCurrencyFormat; // NewCurrency matching SYSTEM locale |
800 |
LanguageType IniLnge; // Initialized setting language/country |
800 |
LanguageType IniLnge; // Initialized setting language/country |
801 |
LanguageType ActLnge; // Current setting language/country |
801 |
LanguageType ActLnge; // Current setting language/country |
802 |
NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation |
802 |
NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation |