diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 11:17:24 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 11:17:24 +0000 |
commit | a4e539808e52473cc6cf8b70e4b7632bd4d237f7 (patch) | |
tree | 1de8fa9f0259e3fe64b399aed3ee2baa3586da52 /sc/source/core/tool/zforauto.cxx | |
parent | c66bd7a8a6187ee10c3ea36f96e9e33e17cc2bc6 (diff) |
INTEGRATION: CWS autocurrency (1.3.252); FILE MERGED
2005/05/17 14:46:18 er 1.3.252.1: #i40902# use SvNumberFormatter::GetIndexPuttingAndConverting; convert legacy 'automatic' currency formats to new fixed currency formats
Diffstat (limited to 'sc/source/core/tool/zforauto.cxx')
-rw-r--r-- | sc/source/core/tool/zforauto.cxx | 52 |
1 files changed, 10 insertions, 42 deletions
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx index 13985e488d51..28bf91054c27 100644 --- a/sc/source/core/tool/zforauto.cxx +++ b/sc/source/core/tool/zforauto.cxx @@ -4,9 +4,9 @@ * * $RCSfile: zforauto.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2005-09-08 18:52:38 $ + * last change: $Author: hr $ $Date: 2005-09-23 12:17:24 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -33,14 +33,6 @@ * ************************************************************************/ -#ifdef PCH -#include "core_pch.hxx" -#endif - -#pragma hdrstop - -//------------------------------------------------------------------------ - #include <svtools/zforlist.hxx> #include <svtools/zformat.hxx> #ifndef _SV_SVAPP_HXX @@ -56,16 +48,16 @@ static const sal_Char __FAR_DATA pStandardName[] = "Standard"; //------------------------------------------------------------------------ ScNumFormatAbbrev::ScNumFormatAbbrev() : + sFormatstring ( RTL_CONSTASCII_USTRINGPARAM( pStandardName ) ), eLnge (LANGUAGE_SYSTEM), - eSysLnge (LANGUAGE_GERMAN), // sonst passt "Standard" nicht - sFormatstring ( RTL_CONSTASCII_USTRINGPARAM( pStandardName ) ) + eSysLnge (LANGUAGE_GERMAN) // sonst passt "Standard" nicht { } ScNumFormatAbbrev::ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat) : + sFormatstring (aFormat.sFormatstring), eLnge (aFormat.eLnge), - eSysLnge (aFormat.eSysLnge), - sFormatstring (aFormat.sFormatstring) + eSysLnge (aFormat.eSysLnge) { } @@ -113,33 +105,9 @@ void ScNumFormatAbbrev::PutFormatIndex(ULONG nFormat, ULONG ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter) { - // #62389# leerer Formatstring (vom Writer) -> Standardformat - if ( !sFormatstring.Len() ) - return rFormatter.GetStandardIndex( eLnge ); - - if ( eLnge == LANGUAGE_SYSTEM && eSysLnge != Application::GetSettings().GetLanguage() ) - { - ULONG nOrig = rFormatter.GetEntryKey( sFormatstring, eSysLnge ); - if ( nOrig != NUMBERFORMAT_ENTRY_NOT_FOUND ) - return rFormatter.GetFormatForLanguageIfBuiltIn( nOrig, Application::GetSettings().GetLanguage() ); - else - return rFormatter.GetStandardIndex( eLnge ); // geht nicht -> Standard - } - - xub_StrLen nCheckPos; short nType; - ULONG nKey = rFormatter.GetEntryKey(sFormatstring, eLnge); - if (nKey == NUMBERFORMAT_ENTRY_NOT_FOUND) - { - BOOL res = rFormatter.PutEntry(sFormatstring, - nCheckPos, nType, nKey, eLnge); - if (nCheckPos > 0) - DBG_ERROR("SCNumFormatAbbrev:: unkorrekter Formatstring"); - } - return nKey; + BOOL bNewInserted; + xub_StrLen nCheckPos; + return rFormatter.GetIndexPuttingAndConverting( sFormatstring, eLnge, + eSysLnge, nType, bNewInserted, nCheckPos); } - - - - - |