we only extract en-US strings, remove some complexity

This commit is contained in:
Andras Timar 2012-04-14 17:49:58 +02:00
parent fd1bef82a9
commit 1ba0ab72d1

View File

@ -995,73 +995,43 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
rtl::OString sXQHText; rtl::OString sXQHText;
rtl::OString sXTitle; rtl::OString sXTitle;
rtl::OString sCur; sXText = pResData->sText[ SOURCE_LANGUAGE ];
if (!pResData->sText[ X_COMMENT ].isEmpty())
sXHText = pResData->sText[ X_COMMENT ];
else
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ];
sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ];
for( unsigned int n = 0; n < aLanguages.size(); n++ ){ if (sXText.isEmpty())
sCur = aLanguages[ n ]; sXText = "-";
if (!sCur.equalsIgnoreAsciiCase("x-comment") ){
if (!pResData->sText[ sCur ].isEmpty())
sXText = pResData->sText[ sCur ];
else {
sXText = pResData->sText[ SOURCE_LANGUAGE ];
}
if (!pResData->sText[ X_COMMENT ].isEmpty()) rtl::OString sOutput( sProject ); sOutput += "\t";
sXHText = pResData->sText[ X_COMMENT ]; if ( !sRoot.isEmpty())
else { sOutput += sActFileName;
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ]; sOutput += "\t0\t";
} sOutput += pResData->sResTyp; sOutput += "\t";
sOutput += sGID; sOutput += "\t";
if (!pResData->sQuickHelpText[ sCur ].isEmpty()) sOutput += sLID; sOutput += "\t";
sXQHText = pResData->sQuickHelpText[ sCur ]; sOutput += pResData->sHelpId; sOutput += "\t";
else { sOutput += pResData->sPForm; sOutput += "\t";
sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ]; sOutput += rtl::OString::valueOf(pResData->nWidth); sOutput += "\t";
} sOutput += "en-US"; sOutput += "\t";
if (!pResData->sTitle[ sCur ].isEmpty())
sXTitle = pResData->sTitle[ sCur ];
else
sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ];
if (sXText.isEmpty())
sXText = "-";
if (sXHText.isEmpty())
{
if (!pResData->sHelpText[ SOURCE_LANGUAGE ].isEmpty())
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
}
}
else
sXText = pResData->sText[ sCur ];
rtl::OString sOutput( sProject ); sOutput += "\t";
if ( !sRoot.isEmpty())
sOutput += sActFileName;
sOutput += "\t0\t";
sOutput += pResData->sResTyp; sOutput += "\t";
sOutput += sGID; sOutput += "\t";
sOutput += sLID; sOutput += "\t";
sOutput += pResData->sHelpId; sOutput += "\t";
sOutput += pResData->sPForm; sOutput += "\t";
sOutput += rtl::OString::valueOf(pResData->nWidth); sOutput += "\t";
sOutput += sCur; sOutput += "\t";
sOutput += sXText; sOutput += "\t"; sOutput += sXText; sOutput += "\t";
sOutput += sXHText; sOutput += "\t"; sOutput += sXHText; sOutput += "\t";
sOutput += sXQHText; sOutput+= "\t"; sOutput += sXQHText; sOutput+= "\t";
sOutput += sXTitle; sOutput += "\t"; sOutput += sXTitle; sOutput += "\t";
aOutput << sOutput.getStr() << '\n'; aOutput << sOutput.getStr() << '\n';
if ( bCreateNew ) { if ( bCreateNew ) {
pResData->sText[ sCur ] = ""; pResData->sText[ SOURCE_LANGUAGE ] = "";
pResData->sHelpText[ sCur ] = ""; pResData->sHelpText[ SOURCE_LANGUAGE ] = "";
pResData->sQuickHelpText[ sCur ]= ""; pResData->sQuickHelpText[ SOURCE_LANGUAGE ]= "";
pResData->sTitle[ sCur ] = ""; pResData->sTitle[ SOURCE_LANGUAGE ] = "";
} }
}
} }
if ( pResData->pStringList ) { if ( pResData->pStringList ) {
rtl::OString sList( "stringlist" ); rtl::OString sList( "stringlist" );