Some more loplugin:cstylecast: l10ntools
Change-Id: Ifa1c715b5569cb7481a6f1ecaa98306ca7e2d7d8
This commit is contained in:
@@ -40,9 +40,9 @@ namespace
|
|||||||
{
|
{
|
||||||
if (!xmlStrcmp(pCurrent->name, pNodeName))
|
if (!xmlStrcmp(pCurrent->name, pNodeName))
|
||||||
{
|
{
|
||||||
xmlChar* pID = xmlGetProp(pCurrent, (const xmlChar*)("id"));
|
xmlChar* pID = xmlGetProp(pCurrent, reinterpret_cast<const xmlChar*>("id"));
|
||||||
xmlChar* pText =
|
xmlChar* pText =
|
||||||
xmlGetProp(pCurrent, (const xmlChar*)("title"));
|
xmlGetProp(pCurrent, reinterpret_cast<const xmlChar*>("title"));
|
||||||
|
|
||||||
common::writePoEntry(
|
common::writePoEntry(
|
||||||
"Treex", rPOStream, pSource->name, helper::xmlStrToOString( pNodeName ),
|
"Treex", rPOStream, pSource->name, helper::xmlStrToOString( pNodeName ),
|
||||||
@@ -52,7 +52,7 @@ namespace
|
|||||||
xmlFree( pText );
|
xmlFree( pText );
|
||||||
|
|
||||||
lcl_ExtractLevel(
|
lcl_ExtractLevel(
|
||||||
pSource, pCurrent, (const xmlChar *)("node"),
|
pSource, pCurrent, reinterpret_cast<const xmlChar *>("node"),
|
||||||
rPOStream );
|
rPOStream );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ namespace
|
|||||||
const xmlNodePtr pCurrent, const OString& rXhpRoot )
|
const xmlNodePtr pCurrent, const OString& rXhpRoot )
|
||||||
{
|
{
|
||||||
xmlNodePtr pReturn = pCurrent;
|
xmlNodePtr pReturn = pCurrent;
|
||||||
xmlChar* pID = xmlGetProp(pReturn, (const xmlChar*)("id"));
|
xmlChar* pID = xmlGetProp(pReturn, reinterpret_cast<const xmlChar*>("id"));
|
||||||
const OString sID =
|
const OString sID =
|
||||||
helper::xmlStrToOString( pID );
|
helper::xmlStrToOString( pID );
|
||||||
xmlFree( pID );
|
xmlFree( pID );
|
||||||
@@ -76,7 +76,7 @@ namespace
|
|||||||
rXhpRoot.copy( rXhpRoot.lastIndexOf('/') + 1 ) +
|
rXhpRoot.copy( rXhpRoot.lastIndexOf('/') + 1 ) +
|
||||||
sID.copy( sID.indexOf( '/', nFirstSlash + 1 ) );
|
sID.copy( sID.indexOf( '/', nFirstSlash + 1 ) );
|
||||||
xmlSetProp(
|
xmlSetProp(
|
||||||
pReturn, (const xmlChar*)("id"),
|
pReturn, reinterpret_cast<const xmlChar*>("id"),
|
||||||
reinterpret_cast<const xmlChar*>(sNewID.getStr()));
|
reinterpret_cast<const xmlChar*>(sNewID.getStr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ namespace
|
|||||||
{
|
{
|
||||||
xmlNodePtr pTemp = pReturn;
|
xmlNodePtr pTemp = pReturn;
|
||||||
xmlChar* sNewID =
|
xmlChar* sNewID =
|
||||||
xmlGetProp(pReturn, (const xmlChar*)("id"));
|
xmlGetProp(pReturn, reinterpret_cast<const xmlChar*>("id"));
|
||||||
xmlChar* sComment =
|
xmlChar* sComment =
|
||||||
xmlStrcat( xmlCharStrdup("removed "), sNewID );
|
xmlStrcat( xmlCharStrdup("removed "), sNewID );
|
||||||
pReturn = xmlNewComment( sComment );
|
pReturn = xmlNewComment( sComment );
|
||||||
@@ -109,7 +109,7 @@ namespace
|
|||||||
{
|
{
|
||||||
pXhpNode = pXhpNode->next;
|
pXhpNode = pXhpNode->next;
|
||||||
}
|
}
|
||||||
if(!xmlStrcmp(pXhpNode->name, (const xmlChar *)("title")))
|
if(!xmlStrcmp(pXhpNode->name, reinterpret_cast<const xmlChar *>("title")))
|
||||||
{
|
{
|
||||||
xmlChar* sTitle =
|
xmlChar* sTitle =
|
||||||
xmlNodeListGetString(pXhpFile, pXhpNode->children, 1);
|
xmlNodeListGetString(pXhpFile, pXhpNode->children, 1);
|
||||||
@@ -156,7 +156,7 @@ namespace
|
|||||||
if( rLang != "en-US" )
|
if( rLang != "en-US" )
|
||||||
{
|
{
|
||||||
OString sNewText;
|
OString sNewText;
|
||||||
xmlChar* pID = xmlGetProp(pCurrent, (const xmlChar*)("id"));
|
xmlChar* pID = xmlGetProp(pCurrent, reinterpret_cast<const xmlChar*>("id"));
|
||||||
ResData aResData(
|
ResData aResData(
|
||||||
helper::xmlStrToOString( pID ),
|
helper::xmlStrToOString( pID ),
|
||||||
static_cast<OString>(io_pSource->name) );
|
static_cast<OString>(io_pSource->name) );
|
||||||
@@ -173,7 +173,7 @@ namespace
|
|||||||
}
|
}
|
||||||
else if( rLang == "qtz" )
|
else if( rLang == "qtz" )
|
||||||
{
|
{
|
||||||
xmlChar* pText = xmlGetProp(pCurrent, (const xmlChar*)("title"));
|
xmlChar* pText = xmlGetProp(pCurrent, reinterpret_cast<const xmlChar*>("title"));
|
||||||
const OString sOriginText = helper::xmlStrToOString(pText);
|
const OString sOriginText = helper::xmlStrToOString(pText);
|
||||||
xmlFree( pText );
|
xmlFree( pText );
|
||||||
sNewText = MergeEntrys::GetQTZText(aResData, sOriginText);
|
sNewText = MergeEntrys::GetQTZText(aResData, sOriginText);
|
||||||
@@ -181,16 +181,16 @@ namespace
|
|||||||
if( !sNewText.isEmpty() )
|
if( !sNewText.isEmpty() )
|
||||||
{
|
{
|
||||||
xmlSetProp(
|
xmlSetProp(
|
||||||
pCurrent, (const xmlChar*)("title"),
|
pCurrent, reinterpret_cast<const xmlChar*>("title"),
|
||||||
(const xmlChar*)(sNewText.getStr()));
|
reinterpret_cast<const xmlChar*>(sNewText.getStr()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lcl_MergeLevel(
|
lcl_MergeLevel(
|
||||||
io_pSource, pCurrent, (const xmlChar *)("node"),
|
io_pSource, pCurrent, reinterpret_cast<const xmlChar *>("node"),
|
||||||
pMergeDataFile, rLang, rXhpRoot );
|
pMergeDataFile, rLang, rXhpRoot );
|
||||||
}
|
}
|
||||||
else if( !xmlStrcmp(pCurrent->name, (const xmlChar *)("topic")) )
|
else if( !xmlStrcmp(pCurrent->name, reinterpret_cast<const xmlChar *>("topic")) )
|
||||||
{
|
{
|
||||||
pCurrent = lcl_UpdateTopic( pCurrent, rXhpRoot );
|
pCurrent = lcl_UpdateTopic( pCurrent, rXhpRoot );
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ void TreeParser::Extract( const OString& rPOFile )
|
|||||||
|
|
||||||
xmlNodePtr pRootNode = xmlDocGetRootElement( m_pSource );
|
xmlNodePtr pRootNode = xmlDocGetRootElement( m_pSource );
|
||||||
lcl_ExtractLevel(
|
lcl_ExtractLevel(
|
||||||
m_pSource, pRootNode, (const xmlChar *)("help_section"),
|
m_pSource, pRootNode, reinterpret_cast<const xmlChar *>("help_section"),
|
||||||
aPOStream );
|
aPOStream );
|
||||||
|
|
||||||
xmlFreeDoc( m_pSource );
|
xmlFreeDoc( m_pSource );
|
||||||
@@ -271,7 +271,7 @@ void TreeParser::Merge(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
lcl_MergeLevel(
|
lcl_MergeLevel(
|
||||||
m_pSource, pRootNode, (const xmlChar *)("help_section"),
|
m_pSource, pRootNode, reinterpret_cast<const xmlChar *>("help_section"),
|
||||||
pMergeDataFile, m_sLang, rXhpRoot );
|
pMergeDataFile, m_sLang, rXhpRoot );
|
||||||
|
|
||||||
delete pMergeDataFile;
|
delete pMergeDataFile;
|
||||||
|
@@ -45,7 +45,7 @@ int extractTranslations()
|
|||||||
|
|
||||||
OString sStyleSheet = OString(getenv("SRC_ROOT")) + OString("/solenv/bin/uilangfilter.xslt");
|
OString sStyleSheet = OString(getenv("SRC_ROOT")) + OString("/solenv/bin/uilangfilter.xslt");
|
||||||
|
|
||||||
xsltStylesheetPtr stylesheet = xsltParseStylesheetFile ((const xmlChar *)sStyleSheet.getStr());
|
xsltStylesheetPtr stylesheet = xsltParseStylesheetFile (reinterpret_cast<const xmlChar *>(sStyleSheet.getStr()));
|
||||||
|
|
||||||
xmlDocPtr doc = xmlParseFile(sInputFileName.getStr());
|
xmlDocPtr doc = xmlParseFile(sInputFileName.getStr());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user