Kaydet (Commit) 0838fbc1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more loplugin:cstylecast: l10ntools

Change-Id: Ifa1c715b5569cb7481a6f1ecaa98306ca7e2d7d8
üst 9c0cb455
...@@ -40,9 +40,9 @@ namespace ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ) ...@@ -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( ...@@ -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() ...@@ -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());
......
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