diff options
author | Nils Fuhrmann <nf@openoffice.org> | 2001-05-28 07:25:29 +0000 |
---|---|---|
committer | Nils Fuhrmann <nf@openoffice.org> | 2001-05-28 07:25:29 +0000 |
commit | 0827465e17854b47c5fe078340bb3da8a393f280 (patch) | |
tree | 9380e259702eac42ef4ab142966274939d4b4d83 /transex3/source/lngmerge.cxx | |
parent | e6d8f3fe23c2b652a0a8e5793fe1ac4d0af80524 (diff) |
Support of changeable fallback language #87136#
Diffstat (limited to 'transex3/source/lngmerge.cxx')
-rw-r--r-- | transex3/source/lngmerge.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/transex3/source/lngmerge.cxx b/transex3/source/lngmerge.cxx index 03004edb556f..3218a31143a4 100644 --- a/transex3/source/lngmerge.cxx +++ b/transex3/source/lngmerge.cxx @@ -2,9 +2,9 @@ * * $RCSfile: lngmerge.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: nf $ $Date: 2001-05-16 13:06:14 $ + * last change: $Author: nf $ $Date: 2001-05-28 08:25:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,6 +105,23 @@ LngParser::~LngParser() } /*****************************************************************************/ +void LngParser::FillInFallbacks( ByteString *Text ) +/*****************************************************************************/ +{ + for ( USHORT i = 0; i < LANGUAGES; i++ ) { + if (( i != GERMAN_INDEX ) && ( i != ENGLISH_INDEX )) { + USHORT nFallbackIndex = + Export::GetLangIndex( + Export::GetFallbackLanguage( Export::LangId[ i ] )); + if ( nFallbackIndex < LANGUAGES ) { + if ( !Text[ i ].Len()) + Text[ i ] = Text[ nFallbackIndex ]; + } + } + } +} + +/*****************************************************************************/ BOOL LngParser::CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot ) @@ -195,6 +212,8 @@ BOOL LngParser::CreateSDF( sTimeStamp += ":"; sTimeStamp += ByteString::CreateFromInt32( aTime.GetSec()); + FillInFallbacks( Text ); + for ( ULONG i = 0; i < LANGUAGES; i++ ) { if ( LANGUAGE_ALLOWED( i )) { ByteString sAct = Text[ i ]; |