summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-05-20 17:32:12 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-05-20 17:32:12 +0200
commit767caa24c28c13645de1e2e60889d6fde1c4919f (patch)
treea221a3b70deaf513960b4eba700a98d01bf96a42
parentf099cd4586bf41f30dea8190dbd2bd7b4234cf60 (diff)
parentde0b00d03dd81bc77b65dd310268b7e523e62630 (diff)
l10ntooling18: merge
-rw-r--r--l10ntools/inc/export.hxx2
-rwxr-xr-xl10ntools/scripts/localize.pl14
-rw-r--r--l10ntools/source/export.cxx12
-rw-r--r--l10ntools/source/localize.cxx14
-rw-r--r--l10ntools/source/merge.cxx16
-rw-r--r--unotools/inc/unotools/configmgr.hxx3
-rw-r--r--unotools/source/config/configmgr.cxx15
7 files changed, 59 insertions, 17 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 13fad506b54d..d1474503882f 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -461,6 +461,8 @@ public:
bTitleFirst[ nId ] = true;
}
BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+ BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+
};
//
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 8b6a8231ebce..47f4e91d8b7f 100755
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -284,9 +284,11 @@ sub write_sdf
foreach my $lang( keys( %{ $string_hash } ) )
{
my @sdf_file;
+ next , if( $lang eq "en-US" );
+
+ mkdir $l10n_file."/$lang";
+ my $current_l10n_file = $l10n_file."/$lang/localize.sdf";
- # mkdir!!!!
- my $current_l10n_file = $WIN eq "TRUE" ? $l10n_file."\\$lang\\localize.sdf" : $l10n_file."/$lang/localize.sdf";
print "Writing '$current_l10n_file'\n";
if( open DESTFILE , "< $current_l10n_file" ){
@@ -392,11 +394,9 @@ sub merge_gsicheck{
my ( $TMPHANDLE , $tmpfile ) = File::Temp::tempfile();
close ( $TMPHANDLE );
- if( $ENV{WRAPCMD} ){
- $command = "$ENV{WRAPCMD} gsicheck";
- }else{
- $command = "gsicheck";
- }
+ $command = "$ENV{WRAPCMD} " if( $ENV{WRAPCMD} );
+ $command .= "$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck";
+
my $errfile = $sdffile.".err";
$command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile";
#my $rc = system( $command );
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index a3df11c2920b..59f29525eda4 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -2096,7 +2096,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
}
ByteString sContent;
- pEntrys->GetText( sContent, nTyp, nLangIndex );
+ pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex );
//if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) {
if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
rText = sOrigText;
@@ -2158,7 +2158,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_TEXT, sCur , TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2211,7 +2211,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2258,7 +2258,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_TITLE, sCur, TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2343,9 +2343,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
//printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex);
ByteString sText;
BOOL bText;
- bText = pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, TRUE );
+ bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE );
if( !bText )
- bText = pEntrys->GetText( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
+ bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
// Use fallback, if data is missing in sdf file
//if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index b869098faed7..9379590d089c 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -959,8 +959,16 @@ int _cdecl main( int argc, char *argv[] )
aIter.SetLanguageRestriction( sLanguages );
if ( bExport ){
if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
- aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());}
+ if( *iter == "ooo" )
+ aIter.Extract( sFileName );
+ else
+ {
+ ByteString sFileNameWithExt( sFileName );
+ sFileNameWithExt += ByteString( "." );
+ sFileNameWithExt += ByteString( (*iter).c_str() , (*iter).length() );
+ aIter.Extract( sFileNameWithExt );
+ }
+ if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
}
}
if( hasPwd )
@@ -973,7 +981,7 @@ int _cdecl main( int argc, char *argv[] )
if ( bExport ){
if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());}
+ if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
}
}
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 3284b7026107..ace119da106c 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -50,6 +50,22 @@ ByteString PFormEntrys::Dump(){
return sRet;
}
+BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
+ USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+{
+ BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel );
+ ByteString test( rReturn );
+ for( int idx = 0; idx < rReturn.Len(); idx++ )
+ {
+ if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && rReturn.GetChar( idx-1 ) == '\\' )
+ {
+ rReturn.Erase( idx-1 , 1 );
+ }
+ }
+ //if( !rReturn.Equals( test ) )
+ // printf("*CHANGED******************\n%s\n%s\n",test.GetBuffer(),rReturn.GetBuffer());
+ return rc;
+}
/*****************************************************************************/
BOOL PFormEntrys::GetText( ByteString &rReturn,
USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx
index 82af190aab4f..c26ff5245739 100644
--- a/unotools/inc/unotools/configmgr.hxx
+++ b/unotools/inc/unotools/configmgr.hxx
@@ -99,7 +99,8 @@ namespace utl
PRODUCTXMLFILEFORMATVERSION,
WRITERCOMPATIBILITYVERSIONOOO11,
OPENSOURCECONTEXT,
- ABOUTBOXPRODUCTVERSION
+ ABOUTBOXPRODUCTVERSION,
+ OOOVENDOR
};
//direct readonly access to some special configuration elements
static com::sun::star::uno::Any GetDirectConfigProperty(ConfigProperty eProp);
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 5f16733b5249..0df6d49afe59 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -70,6 +70,8 @@ namespace
: public rtl::Static< ::rtl::OUString, ProductVersion > {};
struct AboutBoxProductVersion
: public rtl::Static< ::rtl::OUString, AboutBoxProductVersion > {};
+ struct OOOVendor
+ : public rtl::Static< ::rtl::OUString, OOOVendor > {};
struct ProductExtension
: public rtl::Static< ::rtl::OUString, ProductExtension > {};
struct XMLFileFormatName
@@ -433,6 +435,14 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
return aRet;
}
+ rtl::OUString &rOOOVendor = OOOVendor::get();
+ if ( eProp == OOOVENDOR && rOOOVendor.getLength() )
+ {
+ aRet <<= rOOOVendor;
+ return aRet;
+ }
+
+
rtl::OUString &rProductExtension = ProductExtension::get();
if ( eProp == PRODUCTEXTENSION && rProductExtension.getLength() )
{
@@ -493,6 +503,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case PRODUCTXMLFILEFORMATNAME :
case PRODUCTXMLFILEFORMATVERSION:
case OPENSOURCECONTEXT:
+ case OOOVENDOR:
case ABOUTBOXPRODUCTVERSION: sPath += C2U("Setup/Product"); break;
case DEFAULTCURRENCY: sPath += C2U("Setup/L10N"); break;
@@ -526,6 +537,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case PRODUCTNAME: sProperty = C2U("ooName"); break;
case PRODUCTVERSION: sProperty = C2U("ooSetupVersion"); break;
case ABOUTBOXPRODUCTVERSION: sProperty = C2U("ooSetupVersionAboutBox"); break;
+ case OOOVENDOR: sProperty = C2U("ooVendor"); break;
case PRODUCTEXTENSION: sProperty = C2U("ooSetupExtension"); break;
case PRODUCTXMLFILEFORMATNAME: sProperty = C2U("ooXMLFileFormatName"); break;
case PRODUCTXMLFILEFORMATVERSION: sProperty = C2U("ooXMLFileFormatVersion"); break;
@@ -565,6 +577,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
if ( eProp == PRODUCTVERSION )
aRet >>= rProductVersion;
+ if( eProp == OOOVENDOR )
+ aRet >>= rOOOVendor;
+
if ( eProp == ABOUTBOXPRODUCTVERSION )
{
aRet >>= rAboutBoxProductVersion;