Kaydet (Commit) df7dab51 authored tarafından Caolán McNamara's avatar Caolán McNamara

callcatcher: ditch unused method

üst 3e668516
...@@ -79,7 +79,6 @@ private: ...@@ -79,7 +79,6 @@ private:
ByteString GetOutpath( const ByteString& rPathX , const ByteString& sCur , const ByteString& rPathY ); ByteString GetOutpath( const ByteString& rPathX , const ByteString& sCur , const ByteString& rPathY );
bool MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile , const ByteString& sLanguage , ByteString sPath ); bool MergeSingleFile( XMLFile* file , MergeDataFile& aMergeDataFile , const ByteString& sLanguage , ByteString sPath );
void Process( LangHashMap* aLangHM , const ByteString& sCur , ResData *pResData , MergeDataFile& aMergeDataFile );
void ProcessHelp( LangHashMap* aLangHM , const ByteString& sCur , ResData *pResData , MergeDataFile& aMergeDataFile ); void ProcessHelp( LangHashMap* aLangHM , const ByteString& sCur , ResData *pResData , MergeDataFile& aMergeDataFile );
void MakeDir( const ByteString& sPath ); void MakeDir( const ByteString& sPath );
}; };
......
...@@ -633,77 +633,5 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const ByteString& sCur , Re ...@@ -633,77 +633,5 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const ByteString& sCur , Re
} }
} }
/* Process() Method merges */
void HelpParser::Process( LangHashMap* aLangHM , const ByteString& sCur , ResData *pResData , MergeDataFile& aMergeDataFile ){
XMLElement* pXMLElement = NULL;
PFormEntrys *pEntrys = NULL;
XMLData *data = NULL;
XMLParentNode *parent = NULL;
XMLDefault *xmldefault = NULL;
short curLang = 0;
String sNewdata;
bool isFallback = false;
ByteString sLId;
ByteString sGId;
pEntrys = NULL;
#ifdef MERGE_SOURCE_LANGUAGES
if( true ){ // Merge en-US!
#else
if( !sCur.EqualsIgnoreCaseAscii("en-US") ){
#endif
pXMLElement = (*aLangHM)[ sCur ];
if( pXMLElement == NULL )
{
FillInFallbacks( *aLangHM , sCur );
pXMLElement = ( *aLangHM )[ sCur ];
isFallback = true;
}
if( pXMLElement != NULL )
{
parent = pXMLElement->GetParent();
sLId = pXMLElement->GetOldref();
pResData->sId = sLId;
pEntrys = aMergeDataFile.GetPFormEntrys( pResData );
if( pEntrys != NULL)
{
ByteString sNewText;
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur , true );
sNewdata = String( sNewText , RTL_TEXTENCODING_UTF8 );
if ( sNewdata.Len())
{
printf("Entries found\n");
if( pXMLElement != NULL )
{
data = new XMLData( sNewdata , NULL , true ); // Add new one
if( pXMLElement->ToOUString().compareTo( OUString(data->GetData()) ) != 0 )
{
pXMLElement->RemoveAndDeleteAllChilds();
pXMLElement->AddChild( data );
}
if( isFallback )
{
xmldefault = new XMLDefault( String::CreateFromAscii("\n") , NULL );
int pos = parent->GetPosition( pXMLElement->GetId() );
if( pos != -1 ){
parent->AddChild(xmldefault , pos+1 );
parent->AddChild(pXMLElement , pos+2 );
}
else fprintf(stdout,"ERROR: Can't find reference Element of id %s language %d\n",pXMLElement->GetId().GetBuffer(),curLang);
}
aLangHM->erase( sCur );
}
}
delete pResData;
}else if( pResData == NULL ){fprintf(stdout,"Can't find GID=%s LID=%s TYP=%s\n",pResData->sGId.GetBuffer(),pResData->sId.GetBuffer(),pResData->sResTyp.GetBuffer());}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment