summaryrefslogtreecommitdiff
path: root/transex3
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-08-30 16:30:29 +0000
committerKurt Zenker <kz@openoffice.org>2004-08-30 16:30:29 +0000
commit254165f6db644f5b7c8dd3327fa2b7f75e170dbf (patch)
tree1d798680842cca599f658add9258cb3a85741a40 /transex3
parentb31c911daf362f6fdc4da205c8d5242f8bea5914 (diff)
INTEGRATION: CWS help2 (1.23.12); FILE MERGED
2004/07/13 16:49:11 ihi 1.23.12.4: #104752# Forced Language switch 2004/07/07 17:21:51 ihi 1.23.12.3: RESYNC: (1.23-1.24); FILE MERGED 2004/06/01 11:28:58 ihi 1.23.12.2: #i27675# '\n' removed from GetTimeStamp method 2004/05/18 16:32:32 ihi 1.23.12.1: Assertion log fix / mergebuild join
Diffstat (limited to 'transex3')
-rw-r--r--transex3/source/export2.cxx30
1 files changed, 25 insertions, 5 deletions
diff --git a/transex3/source/export2.cxx b/transex3/source/export2.cxx
index b6917ea284d1..5b2236e42869 100644
--- a/transex3/source/export2.cxx
+++ b/transex3/source/export2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: export2.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: rt $ $Date: 2004-07-13 13:51:50 $
+ * last change: $Author: kz $ $Date: 2004-08-30 17:30:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,6 +114,7 @@ ResData::~ResData()
/*****************************************************************************/
ByteString Export::sLanguages;
+ByteString Export::sForcedLanguages;
ByteString Export::sIsoCode99;
/*****************************************************************************/
@@ -139,6 +140,7 @@ CharSet Export::GetCharSet( USHORT nLangId )
USHORT Export::GetLangByIsoLang( const ByteString &rIsoLang )
/*****************************************************************************/
{
+ // removeme
ByteString sLang( rIsoLang );
sLang.ToUpperAscii();
return 0xFFFF;
@@ -154,8 +156,13 @@ std::vector<ByteString> Export::GetLanguages(){
/*****************************************************************************/
return aLanguages;
}
-
-std::vector<ByteString> Export::aLanguages = std::vector<ByteString>();
+/*****************************************************************************/
+std::vector<ByteString> Export::GetForcedLanguages(){
+/*****************************************************************************/
+ return aForcedLanguages;
+}
+std::vector<ByteString> Export::aLanguages = std::vector<ByteString>();
+std::vector<ByteString> Export::aForcedLanguages = std::vector<ByteString>();
/*****************************************************************************/
ByteString Export::GetIsoLangByIndex( USHORT nIndex )
@@ -273,9 +280,22 @@ void Export::InitLanguages( bool bMergeMode ){
else if( !( (sTmp.GetChar(0)=='x' || sTmp.GetChar(0)=='X') && sTmp.GetChar(1)=='-' ) )
aLanguages.push_back( sTmp );
}
+ InitForcedLanguages( bMergeMode );
isInitialized = true;
}
-
+/*****************************************************************************/
+void Export::InitForcedLanguages( bool bMergeMode ){
+/*****************************************************************************/
+ ByteString sTmp;
+ ByteStringBoolHashMap aEnvLangs;
+ for ( USHORT x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
+ sTmp = sForcedLanguages.GetToken( x, ',' ).GetToken( 0, '=' );
+ sTmp.EraseLeadingAndTrailingChars();
+ if( bMergeMode && ( sTmp.EqualsIgnoreCaseAscii("de") || sTmp.EqualsIgnoreCaseAscii("en-US") )){}
+ else if( !( (sTmp.GetChar(0)=='x' || sTmp.GetChar(0)=='X') && sTmp.GetChar(1)=='-' ) )
+ aForcedLanguages.push_back( sTmp );
+ }
+}
/*****************************************************************************/
ByteString Export::GetFallbackLanguage( const ByteString nLanguage )