diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-14 22:06:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-18 12:21:26 +0100 |
commit | c2a850fcfa25229514daaa294cc06c67300f49a8 (patch) | |
tree | c667d804947841ef94f77253c6970dcf08f9246f /l10ntools | |
parent | ea8a56a59310d39fe912661dfa9ceaee1cc3de79 (diff) |
callcatcher: remove unused methods
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/inc/export.hxx | 1 | ||||
-rw-r--r-- | l10ntools/inc/l10ntools/file.hxx | 1 | ||||
-rw-r--r-- | l10ntools/source/file.cxx | 5 | ||||
-rw-r--r-- | l10ntools/source/localize.cxx | 144 | ||||
-rw-r--r-- | l10ntools/source/merge.cxx | 8 |
5 files changed, 0 insertions, 159 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index bf3308b85215..c33960fa8468 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -480,7 +480,6 @@ public: MergeData( const ByteString &rTyp, const ByteString &rGID, const ByteString &rLID , const ByteString &rFilename ) : sTyp( rTyp ), sGID( rGID ), sLID( rLID ) , sFilename( rFilename ) {}; ~MergeData(); - PFormEntrys* InsertEntry( const ByteString &rPForm ); PFormEntrys* GetPFormEntrys( ResData *pResData ); void Insert( const ByteString& rPFO , PFormEntrys* pfEntrys ); diff --git a/l10ntools/inc/l10ntools/file.hxx b/l10ntools/inc/l10ntools/file.hxx index 9b90c2766500..fae252e5f926 100644 --- a/l10ntools/inc/l10ntools/file.hxx +++ b/l10ntools/inc/l10ntools/file.hxx @@ -14,7 +14,6 @@ class File rtl::OUString getFileName(){ return sFileName; } rtl::OUString getFullName(){ return sFullName; } - File( const rtl::OUString sFile ); File( const rtl::OUString sFullName , const rtl::OUString sFile ); static bool lessFile ( const File& rKey1, const File& rKey2 ); diff --git a/l10ntools/source/file.cxx b/l10ntools/source/file.cxx index d57c20d92c04..f87c24f59598 100644 --- a/l10ntools/source/file.cxx +++ b/l10ntools/source/file.cxx @@ -34,11 +34,6 @@ namespace transex { -File::File( const rtl::OUString sFile ) -{ - sFileName = sFile; -} - File::File( const rtl::OUString sFullPath , const rtl::OUString sFile ) { sFileName = sFile; diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 5af7bfcb5c18..9cacee6bebd6 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -204,12 +204,6 @@ private: const ByteString &rCollectMode ); void WorkOnDirectory( const ByteString &rDirectory ); - sal_Bool MergeSingleFile( - const ByteString &rPrj, - const ByteString &rFile, - const ByteString &rSDFFile - ); - public: SourceTreeLocalizer( const ByteString &rRoot, const ByteString &rVersion , bool bLocal , bool skip_links ); ~SourceTreeLocalizer(); @@ -561,144 +555,6 @@ sal_Bool SourceTreeLocalizer::Extract( const ByteString &rDestinationFile ) return bReturn; } -/*****************************************************************************/ -sal_Bool SourceTreeLocalizer::MergeSingleFile( - const ByteString &rPrj, - const ByteString &rFile, - const ByteString &rSDFFile -) -/*****************************************************************************/ -{ - //printf("MergeSingleFile(%s,%s,%s)",rPrj.GetBuffer(),rFile.GetBuffer(),rSDFFile.GetBuffer()); - if ( !rFile.Len()) - return sal_True; - - ByteString sRoot( Export::GetEnv( "SRC_ROOT" )); - DirEntry aEntry( String( sRoot, RTL_TEXTENCODING_ASCII_US )); - aEntry += DirEntry( String( rPrj, RTL_TEXTENCODING_ASCII_US )); - - ByteString sDelimiter( - DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US ); - - ByteString sCur( rFile ); - sCur.SearchAndReplaceAll( "\\", sDelimiter ); - sCur.SearchAndReplaceAll( "/", sDelimiter ); - - aEntry += DirEntry( String( sCur, RTL_TEXTENCODING_ASCII_US )); - ByteString sFile( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US ); - - ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US ); - - sal_uLong nIndex = 0; - ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US ); - ByteString sCandidate( ExeTable[ nIndex ][ 0 ] ); - - while( !sCandidate.Equals ("NULL") && !sCandidate.Equals(sExtension) ) - sCandidate = ExeTable[ ++nIndex ][ 0 ]; - - if ( !sCandidate.Equals( "NULL" ) ) { - if( !aEntry.Exists()) { - DirEntryKind theDir=FSYS_KIND_FILE; - Dir myDir( aEntry.GetPath(), theDir); - DirEntry current; - sal_Bool found=sal_False; - for( sal_uInt16 x=0; x < myDir.Count() && !found;){ - current=myDir[x++]; - StringCompare result=current.GetName().CompareIgnoreCaseToAscii( aEntry.GetName() ); - if( result==COMPARE_EQUAL ){ - fprintf(stderr,"WARNING: %s not found\n", ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US).GetBuffer() ); - fprintf(stderr,"but use %s instead \n" , ByteString(current.GetFull(), RTL_TEXTENCODING_ASCII_US).GetBuffer() ); - aEntry=current; - found=sal_True; - } - } - if(!found) return sal_True; - - } - - DirEntry aOut( Export::GetTempFile() ); - ByteString sOutput; - if( sOutputFile.Len() == 0 ) - sOutput = ByteString ( aOut.GetFull(), RTL_TEXTENCODING_ASCII_US ); - else - sOutput = sOutputFile; - ByteString sCommand( ExeTable[ nIndex ][ 1 ] ); - sCommand += " -i "; - sCommand += ByteString( aEntry.GetName(), RTL_TEXTENCODING_ASCII_US ); - sCommand += " -m "; - sCommand += rSDFFile; - sCommand += " -o "; - sCommand += sOutput; - sCommand += " "; - sCommand += ByteString( ExeTable[ nIndex ][ 2 ] ); - if ( sLanguageRestriction.Len()) { - sCommand += " -l "; - sCommand += sLanguageRestriction; - } - - DirEntry aPath( aEntry.GetPath()); - DirEntry aOldCWD; - aPath.SetCWD(); - - if (system(sCommand.GetBuffer()) == -1) - fprintf(stderr, "%s failed\n", sCommand.GetBuffer()); - nFileCnt++; - printf("."); - SvFileStream aInStream( aOut.GetFull(), STREAM_READ ); - if ( !aInStream.IsOpen()) { - fprintf( stderr, - "ERROR: Unable to open file %s for reading!\n", - sOutput.GetBuffer()); - } - else { - FileStat::SetReadOnlyFlag( aEntry, sal_False ); - String myStr2(aEntry.GetFull()); - String aTemp22 = String::CreateFromAscii("_tmp"); - myStr2.Append(aTemp22); - - ByteString test(myStr2,RTL_TEXTENCODING_ASCII_US); - SvFileStream aOutStream( myStr2, STREAM_STD_WRITE | STREAM_TRUNC ); - if ( !aOutStream.IsOpen()) { - ByteString test2(myStr2,RTL_TEXTENCODING_ASCII_US); - fprintf( stderr,"ERROR: Unable to open file %s for modification!\n", test2.GetBuffer()); - aInStream.Close(); - } - - else { - ByteString sLine; - aOutStream.SetLineDelimiter( LINEEND_LF ); - - aInStream.ReadLine( sLine ); - while ( !aInStream.IsEof()) { - aOutStream.WriteLine( sLine ); - aInStream.ReadLine( sLine ); - } - aInStream.Close(); - aOutStream.Close(); - - - DirEntry myTempFile(ByteString(myStr2,RTL_TEXTENCODING_ASCII_US)); // xxx_tmp -> - DirEntry myFile(ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US));// xxx - - DirEntry oldFile(ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US)); - - if(oldFile.Kill()==ERRCODE_NONE){ - if(myTempFile.MoveTo(myFile)!=ERRCODE_NONE){ - fprintf( stderr, "ERROR: Can't rename file %s\n",ByteString(myStr2,RTL_TEXTENCODING_ASCII_US).GetBuffer()); - } - } - else{ - fprintf( stderr, "ERROR: Can't remove file %s\n",ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US).GetBuffer()); - } - } // else - - aOldCWD.SetCWD(); - aOut.Kill(); - } // else - } - return sal_True; -} - } using namespace transex3; diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index 584a84bbbf56..12ce24323cb9 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -155,14 +155,6 @@ PFormEntrys* MergeData::GetPFObject( const ByteString& rPFO ){ return NULL; } - -PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm ) -{ - PFormEntrys* pFEntrys = new PFormEntrys( rPForm ); - aMap.insert( PFormEntrysHashMap::value_type( rPForm , pFEntrys ) ); - return pFEntrys; -} - sal_Bool MergeData::operator==( ResData *pData ) { ByteString sResTyp_upper( pData->sResTyp ); |