diff options
author | Eike Rathke <er@openoffice.org> | 2001-06-26 13:31:42 +0000 |
---|---|---|
committer | Eike Rathke <er@openoffice.org> | 2001-06-26 13:31:42 +0000 |
commit | c0372c90b7a8f70409e752c434b8014bb237c4b5 (patch) | |
tree | c9600d2617e67ce6afa47be980b6eb4d002f2143 /svx | |
parent | ad64b2dc9a13bbe6c25c4e2c459c99328411ee51 (diff) |
#88678# SvxExtTimeField::GetFormatted: insert or reuse forrmat not builtin
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/items/flditem.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/svx/source/items/flditem.cxx b/svx/source/items/flditem.cxx index 61e847b55682..a5ca0356639a 100644 --- a/svx/source/items/flditem.cxx +++ b/svx/source/items/flditem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: flditem.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: ka $ $Date: 2001-06-19 14:56:39 $ + * last change: $Author: er $ $Date: 2001-06-26 14:31:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -749,10 +749,6 @@ String SvxExtTimeField::GetFormatted( SvNumberFormatter& rFormatter, LanguageTyp DBG_ERROR( "SVXTIMEFORMAT_APPDEFAULT: not implemented" ); eTmpFormat = SVXTIMEFORMAT_STANDARD; break; - case SVXTIMEFORMAT_12_HMSH: - DBG_ERROR( "SVXTIMEFORMAT_12_HMSH: not implemented" ); - eTmpFormat = SVXTIMEFORMAT_24_HMSH; - break; } ULONG nFormatKey; @@ -762,6 +758,18 @@ String SvxExtTimeField::GetFormatted( SvNumberFormatter& rFormatter, LanguageTyp case SVXTIMEFORMAT_12_HM: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HHMMAMPM, eLang ); break; + case SVXTIMEFORMAT_12_HMSH: + { // no builtin format available, try to insert or reuse + String aFormatCode( RTL_CONSTASCII_USTRINGPARAM( "HH:MM:SS,00 AM/PM" ) ); + xub_StrLen nCheckPos; + short nType; + BOOL bInserted = rFormatter.PutandConvertEntry( aFormatCode, + nCheckPos, nType, nFormatKey, LANGUAGE_ENGLISH_US, eLang ); + DBG_ASSERT( nCheckPos == 0, "SVXTIMEFORMAT_12_HMSH: could not insert format code" ); + if ( nCheckPos ) + nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HH_MMSS00, eLang ); + } + break; case SVXTIMEFORMAT_24_HM: nFormatKey = rFormatter.GetFormatIndex( NF_TIME_HHMM, eLang ); break; |