summaryrefslogtreecommitdiff
path: root/transex3/source
diff options
context:
space:
mode:
authorNils Fuhrmann <nf@openoffice.org>2001-07-04 12:06:41 +0000
committerNils Fuhrmann <nf@openoffice.org>2001-07-04 12:06:41 +0000
commit82fb00f502e09f14f9fae4850464ff1888c2465d (patch)
tree007cda67f8da78020392342bb9fc6ac70ba30ffc /transex3/source
parentf3d2743a9e4217f0e9e6b1e7598e9aecd67d104a (diff)
Fallback fill in only when languge deffers #87136#
Diffstat (limited to 'transex3/source')
-rw-r--r--transex3/source/cfgmerge.cxx20
-rw-r--r--transex3/source/export2.cxx6
-rw-r--r--transex3/source/lngmerge.cxx6
3 files changed, 17 insertions, 15 deletions
diff --git a/transex3/source/cfgmerge.cxx b/transex3/source/cfgmerge.cxx
index d2bfbe4b73e9..5238b6fdc840 100644
--- a/transex3/source/cfgmerge.cxx
+++ b/transex3/source/cfgmerge.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cfgmerge.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: nf $ $Date: 2001-06-25 10:08:22 $
+ * last change: $Author: nf $ $Date: 2001-07-04 13:06:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -310,18 +310,20 @@ void CfgStackData::FillInFallbacks()
USHORT nFallbackIndex =
Export::GetLangIndex(
Export::GetFallbackLanguage( Export::LangId[ i ] ));
- if (( nFallbackIndex < LANGUAGES ) && !sText[ i ].Len()) {
+ if (( nFallbackIndex < LANGUAGES ) && !sText[ i ].Len() && i != nFallbackIndex ) {
CharSet eSource =
Export::GetCharSet( Export::LangId[ nFallbackIndex ] );
CharSet eDest =
Export::GetCharSet( Export::LangId[ i ] );
- ByteString sFallback =
- UTF8Converter::ConvertToUTF8( sText[ nFallbackIndex ],
- eSource );
- sText[ i ] =
- UTF8Converter::ConvertFromUTF8( sFallback,
- eDest );
+ if ( eSource != eDest ) {
+ ByteString sFallback =
+ UTF8Converter::ConvertToUTF8( sText[ nFallbackIndex ],
+ eSource );
+ sText[ i ] =
+ UTF8Converter::ConvertFromUTF8( sFallback,
+ eDest );
+ }
}
}
}
diff --git a/transex3/source/export2.cxx b/transex3/source/export2.cxx
index 7a51531cd533..281d95c73aad 100644
--- a/transex3/source/export2.cxx
+++ b/transex3/source/export2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: export2.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: nf $ $Date: 2001-06-11 13:49:22 $
+ * last change: $Author: nf $ $Date: 2001-07-04 13:06:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -468,7 +468,7 @@ void Export::FillInFallbacks( ResData *pResData )
if (( i != GERMAN_INDEX ) && ( i != ENGLISH_INDEX )) {
USHORT nFallbackIndex =
GetLangIndex( GetFallbackLanguage( LangId[ i ] ));
- if ( nFallbackIndex < LANGUAGES ) {
+ if (( nFallbackIndex < LANGUAGES) && ( i != nFallbackIndex )) {
CharSet eSource =
Export::GetCharSet( Export::LangId[ nFallbackIndex ] );
CharSet eDest =
diff --git a/transex3/source/lngmerge.cxx b/transex3/source/lngmerge.cxx
index 2066f7c3c69e..0e48d861e492 100644
--- a/transex3/source/lngmerge.cxx
+++ b/transex3/source/lngmerge.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: lngmerge.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: nf $ $Date: 2001-06-27 12:08:41 $
+ * last change: $Author: nf $ $Date: 2001-07-04 13:06:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -113,7 +113,7 @@ void LngParser::FillInFallbacks( ByteString *Text )
USHORT nFallbackIndex = Export::GetLangIndex(
Export::GetFallbackLanguage( Export::LangId[ i ] ));
- if (( nFallbackIndex < LANGUAGES ) && !Text[ i ].Len()) {
+ if (( nFallbackIndex < LANGUAGES ) && !Text[ i ].Len() && ( i != nFallbackIndex )) {
CharSet eSource =
Export::GetCharSet( Export::LangId[ nFallbackIndex ] );
CharSet eDest =