loplugin:nullptr (automatic rewrite)
Change-Id: I87dbff06345f24064b87c375e5381cb27118e614
This commit is contained in:
@@ -91,7 +91,7 @@ private:
|
||||
|
||||
protected:
|
||||
XMLChildNode( XMLParentNode *pPar );
|
||||
XMLChildNode(): m_pParent( NULL ){};
|
||||
XMLChildNode(): m_pParent( nullptr ){};
|
||||
XMLChildNode( const XMLChildNode& rObj);
|
||||
XMLChildNode& operator=(const XMLChildNode& rObj);
|
||||
public:
|
||||
@@ -154,15 +154,15 @@ public:
|
||||
XMLFile( const XMLFile& rObj ) ;
|
||||
virtual ~XMLFile();
|
||||
|
||||
void Print( XMLNode *pCur = NULL, sal_uInt16 nLevel = 0 );
|
||||
void Print( XMLNode *pCur = nullptr, sal_uInt16 nLevel = 0 );
|
||||
void SearchL10NElements( XMLChildNode *pCur, int pos = 0 );
|
||||
void Extract( XMLFile *pCur = NULL );
|
||||
void Extract( XMLFile *pCur = nullptr );
|
||||
|
||||
XMLHashMap* GetStrings(){ return m_pXMLStrings.get(); }
|
||||
void Write( OString const &rFilename );
|
||||
bool Write( std::ofstream &rStream, XMLNode *pCur = NULL );
|
||||
bool Write( std::ofstream &rStream, XMLNode *pCur = nullptr );
|
||||
|
||||
bool CheckExportStatus( XMLParentNode *pCur = NULL );
|
||||
bool CheckExportStatus( XMLParentNode *pCur = nullptr );
|
||||
|
||||
XMLFile& operator=(const XMLFile& rObj);
|
||||
|
||||
|
@@ -59,7 +59,7 @@ FILE * init(int argc, char ** argv) {
|
||||
global::inputPathname = aArgs.m_sInputFile;
|
||||
|
||||
FILE * pFile = std::fopen(global::inputPathname.getStr(), "r");
|
||||
if (pFile == 0) {
|
||||
if (pFile == nullptr) {
|
||||
std::fprintf(
|
||||
stderr, "Error: Cannot open file \"%s\"\n",
|
||||
global::inputPathname.getStr() );
|
||||
@@ -126,7 +126,7 @@ CfgStackData *CfgStack::GetStackData()
|
||||
if (!maList.empty())
|
||||
return maList[maList.size() - 1];
|
||||
else
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ CfgStackData *CfgStack::GetStackData()
|
||||
|
||||
|
||||
CfgParser::CfgParser()
|
||||
: pStackData( NULL ),
|
||||
: pStackData( nullptr ),
|
||||
bLocalize( false )
|
||||
{
|
||||
}
|
||||
@@ -398,7 +398,7 @@ void CfgExport::WorkOnText(
|
||||
CfgMerge::CfgMerge(
|
||||
const OString &rMergeSource, const OString &rOutputFile,
|
||||
const OString &rFilename, const OString &rLanguage )
|
||||
: pMergeDataFile( NULL ),
|
||||
: pMergeDataFile( nullptr ),
|
||||
sFilename( rFilename ),
|
||||
bEnglish( false )
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ void YYWarning( const char * );
|
||||
|
||||
namespace {
|
||||
|
||||
MergeDataFile * pMergeDataFile = 0; //TODO
|
||||
MergeDataFile * pMergeDataFile = nullptr; //TODO
|
||||
|
||||
namespace global {
|
||||
|
||||
@@ -85,7 +85,7 @@ FILE * init(int argc, char ** argv)
|
||||
global::inputPathname = aArgs.m_sInputFile;
|
||||
|
||||
FILE * pFile = std::fopen(global::inputPathname.getStr(), "r");
|
||||
if (pFile == 0) {
|
||||
if (pFile == nullptr) {
|
||||
std::fprintf(
|
||||
stderr, "Error: Cannot open file \"%s\"\n",
|
||||
global::inputPathname.getStr());
|
||||
@@ -303,10 +303,10 @@ int Export::Execute( int nToken, const char * pToken )
|
||||
return 0;
|
||||
}
|
||||
|
||||
ResData *pResData = NULL;
|
||||
ResData *pResData = nullptr;
|
||||
if ( nLevel ) {
|
||||
// res. exists at cur. level
|
||||
pResData = ( (nLevel-1) < aResStack.size() ) ? aResStack[ nLevel-1 ] : NULL;
|
||||
pResData = ( (nLevel-1) < aResStack.size() ) ? aResStack[ nLevel-1 ] : nullptr;
|
||||
}
|
||||
else if (( nToken != RESOURCE ) &&
|
||||
( nToken != RESOURCEEXPR ) &&
|
||||
@@ -851,7 +851,7 @@ OString Export::FullId()
|
||||
|
||||
void Export::InsertListEntry(const OString &rLine)
|
||||
{
|
||||
ResData *pResData = ( nLevel-1 < aResStack.size() ) ? aResStack[ nLevel-1 ] : NULL;
|
||||
ResData *pResData = ( nLevel-1 < aResStack.size() ) ? aResStack[ nLevel-1 ] : nullptr;
|
||||
|
||||
if (!pResData)
|
||||
std::exit(EXIT_FAILURE);
|
||||
@@ -1065,7 +1065,7 @@ void Export::MergeRest( ResData *pResData )
|
||||
|
||||
}
|
||||
|
||||
MergeEntrys *pEntry = 0;
|
||||
MergeEntrys *pEntry = nullptr;
|
||||
if( pResData->bText || pResData->bQuickHelpText || pResData->bTitle )
|
||||
pEntry = pMergeDataFile->GetMergeEntrysCaseSensitive( pResData );
|
||||
|
||||
|
@@ -128,7 +128,7 @@ bool isWellFormedXML( OString const & text )
|
||||
content += text;
|
||||
content += "</root>";
|
||||
doc = xmlParseMemory(content.getStr(),(int)content.getLength());
|
||||
if (doc == NULL) {
|
||||
if (doc == nullptr) {
|
||||
result = false;
|
||||
}
|
||||
xmlFreeDoc(doc);
|
||||
|
@@ -81,7 +81,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
std::cerr << "Helpex error: cannot open input file\n";
|
||||
return 1;
|
||||
}
|
||||
MergeDataFile* pMergeDataFile = 0;
|
||||
MergeDataFile* pMergeDataFile = nullptr;
|
||||
if( aArgs.m_sLanguage != "qtz")
|
||||
{
|
||||
pMergeDataFile = new MergeDataFile(aArgs.m_sMergeSrc, OString(), false, false );
|
||||
@@ -109,7 +109,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
else
|
||||
{
|
||||
HelpParser aParser( aArgs.m_sInputFile );
|
||||
MergeDataFile* pMergeDataFile = 0;
|
||||
MergeDataFile* pMergeDataFile = nullptr;
|
||||
if( aArgs.m_sLanguage != "qtz")
|
||||
{
|
||||
pMergeDataFile = new MergeDataFile(aArgs.m_sMergeSrc, aArgs.m_sInputFile, false, false );
|
||||
|
@@ -84,7 +84,7 @@ bool HelpParser::CreatePO(
|
||||
|
||||
std::unique_ptr <XMLFile> file ( aParser.Execute( sHelpFile, pXmlFile ) );
|
||||
|
||||
if(file.get() == NULL)
|
||||
if(file.get() == nullptr)
|
||||
{
|
||||
printf(
|
||||
"%s: %s\n",
|
||||
@@ -117,7 +117,7 @@ bool HelpParser::CreatePO(
|
||||
|
||||
XMLElement* pXMLElement = (*pElem)[ "en-US" ];
|
||||
|
||||
if( pXMLElement != NULL )
|
||||
if( pXMLElement != nullptr )
|
||||
{
|
||||
OString data(
|
||||
pXMLElement->ToOString().
|
||||
@@ -128,7 +128,7 @@ bool HelpParser::CreatePO(
|
||||
"Helpex", aPoOutput, sHelpFile, rGsi1,
|
||||
posm->first, pXMLElement->GetOldref(), OString(), data);
|
||||
|
||||
pXMLElement=NULL;
|
||||
pXMLElement=nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -197,20 +197,20 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile
|
||||
/* ProcessHelp Methode: search for en-US entry and replace it with the current language*/
|
||||
void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResData *pResData , MergeDataFile* pMergeDataFile ){
|
||||
|
||||
XMLElement* pXMLElement = NULL;
|
||||
MergeEntrys *pEntrys = NULL;
|
||||
XMLElement* pXMLElement = nullptr;
|
||||
MergeEntrys *pEntrys = nullptr;
|
||||
|
||||
OString sLId;
|
||||
|
||||
pEntrys = NULL;
|
||||
pEntrys = nullptr;
|
||||
|
||||
if( !sCur.equalsIgnoreAsciiCase("en-US") ){
|
||||
pXMLElement = (*aLangHM)[ "en-US" ];
|
||||
if( pXMLElement == NULL )
|
||||
if( pXMLElement == nullptr )
|
||||
{
|
||||
printf("Error: Can't find en-US entry\n");
|
||||
}
|
||||
if( pXMLElement != NULL )
|
||||
if( pXMLElement != nullptr )
|
||||
{
|
||||
sLId = pXMLElement->GetOldref();
|
||||
pResData->sId = sLId;
|
||||
@@ -239,7 +239,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
|
||||
else if( pMergeDataFile )
|
||||
{
|
||||
pEntrys = pMergeDataFile->GetMergeEntrys( pResData );
|
||||
if( pEntrys != NULL)
|
||||
if( pEntrys != nullptr)
|
||||
{
|
||||
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, true );
|
||||
if (helper::isWellFormedXML(XMLUtil::QuotHTML(sNewText)))
|
||||
@@ -250,9 +250,9 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
|
||||
}
|
||||
if (!sNewdata.isEmpty())
|
||||
{
|
||||
if( pXMLElement != NULL )
|
||||
if( pXMLElement != nullptr )
|
||||
{
|
||||
XMLData *data = new XMLData( sNewdata , NULL ); // Add new one
|
||||
XMLData *data = new XMLData( sNewdata , nullptr ); // Add new one
|
||||
pXMLElement->RemoveAndDeleteAllChildren();
|
||||
pXMLElement->AddChild( data );
|
||||
aLangHM->erase( sCur );
|
||||
|
@@ -49,7 +49,7 @@ static void lcl_RemoveUTF8ByteOrderMarker( OString &rString )
|
||||
|
||||
LngParser::LngParser(const OString &rLngFile)
|
||||
: nError( LNG_OK )
|
||||
, pLines( NULL )
|
||||
, pLines( nullptr )
|
||||
, sSource( rLngFile )
|
||||
{
|
||||
pLines = new LngLineList();
|
||||
|
@@ -371,7 +371,7 @@ MergeData *MergeDataFile::GetMergeData( ResData *pResData , bool bCaseSensitive
|
||||
}
|
||||
pResData->sGId = sOldG;
|
||||
pResData->sId = sOldL;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MergeEntrys *MergeDataFile::GetMergeEntrys( ResData *pResData )
|
||||
@@ -380,7 +380,7 @@ MergeEntrys *MergeDataFile::GetMergeEntrys( ResData *pResData )
|
||||
MergeData *pData = GetMergeData( pResData );
|
||||
if ( pData )
|
||||
return pData->GetMergeEntries();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MergeEntrys *MergeDataFile::GetMergeEntrysCaseSensitive( ResData *pResData )
|
||||
@@ -389,7 +389,7 @@ MergeEntrys *MergeDataFile::GetMergeEntrysCaseSensitive( ResData *pResData )
|
||||
MergeData *pData = GetMergeData( pResData , true );
|
||||
if ( pData )
|
||||
return pData->GetMergeEntries();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void MergeDataFile::InsertEntry(
|
||||
@@ -399,7 +399,7 @@ void MergeDataFile::InsertEntry(
|
||||
const OString &rTITLE, const OString &rInFilename,
|
||||
bool bFirstLang, bool bCaseSensitive )
|
||||
{
|
||||
MergeData *pData = 0;
|
||||
MergeData *pData = nullptr;
|
||||
|
||||
// search for MergeData
|
||||
OString sKey = CreateKey(rTYP , rGID , rLID , rInFilename , bCaseSensitive);
|
||||
|
@@ -164,7 +164,7 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
|
||||
void GenPoEntry::readFromFile(std::ifstream& rIFStream)
|
||||
{
|
||||
*this = GenPoEntry();
|
||||
OString* pLastMsg = 0;
|
||||
OString* pLastMsg = nullptr;
|
||||
std::string sTemp;
|
||||
getline(rIFStream,sTemp);
|
||||
if( rIFStream.eof() || sTemp.empty() )
|
||||
@@ -274,7 +274,7 @@ PoEntry::~PoEntry()
|
||||
}
|
||||
|
||||
PoEntry::PoEntry( const PoEntry& rPo )
|
||||
: m_pGenPo( rPo.m_pGenPo ? new GenPoEntry( *(rPo.m_pGenPo) ) : 0 )
|
||||
: m_pGenPo( rPo.m_pGenPo ? new GenPoEntry( *(rPo.m_pGenPo) ) : nullptr )
|
||||
, m_bIsInitialized( rPo.m_bIsInitialized )
|
||||
{
|
||||
}
|
||||
@@ -408,7 +408,7 @@ namespace
|
||||
// Get actual time in "YEAR-MO-DA HO:MI+ZONE" form
|
||||
static OString lcl_GetTime()
|
||||
{
|
||||
time_t aNow = time(NULL);
|
||||
time_t aNow = time(nullptr);
|
||||
struct tm* pNow = localtime(&aNow);
|
||||
char pBuff[50];
|
||||
strftime( pBuff, sizeof pBuff, "%Y-%m-%d %H:%M%z", pNow );
|
||||
|
@@ -49,7 +49,7 @@ namespace
|
||||
{
|
||||
const OString sHex = sResult.copy( nIndex + 2, 4 );
|
||||
const sal_Unicode cDec =
|
||||
static_cast<sal_Unicode>( strtol( sHex.getStr(), NULL, 16 ) );
|
||||
static_cast<sal_Unicode>( strtol( sHex.getStr(), nullptr, 16 ) );
|
||||
const OString sNewChar =
|
||||
OString( &cDec, 1, RTL_TEXTENCODING_UTF8 );
|
||||
sResult = sResult.replaceAll( "\\u" + sHex, sNewChar );
|
||||
@@ -166,7 +166,7 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
|
||||
return;
|
||||
}
|
||||
|
||||
MergeDataFile* pMergeDataFile = 0;
|
||||
MergeDataFile* pMergeDataFile = nullptr;
|
||||
if( m_sLang != "qtz" )
|
||||
{
|
||||
pMergeDataFile = new MergeDataFile( rMergeSrc, m_sSource, false, false );
|
||||
|
@@ -119,7 +119,7 @@ namespace
|
||||
replaceAll("$[officeversion]","%PRODUCTVERSION");
|
||||
xmlNodeSetContent(
|
||||
pReturn,
|
||||
xmlEncodeSpecialChars( NULL,
|
||||
xmlEncodeSpecialChars( nullptr,
|
||||
reinterpret_cast<const xmlChar*>(
|
||||
sNewTitle.getStr() )));
|
||||
xmlFree( sTitle );
|
||||
@@ -131,7 +131,7 @@ namespace
|
||||
std::cerr
|
||||
<< "Treex error: Cannot find title in "
|
||||
<< sXhpPath.getStr() << std::endl;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
xmlFree( pXhpFile );
|
||||
xmlCleanupParser();
|
||||
@@ -200,7 +200,7 @@ namespace
|
||||
|
||||
TreeParser::TreeParser(
|
||||
const OString& rInputFile, const OString& rLang )
|
||||
: m_pSource( 0 )
|
||||
: m_pSource( nullptr )
|
||||
, m_sLang( rLang )
|
||||
, m_bIsInitialized( false )
|
||||
{
|
||||
@@ -253,7 +253,7 @@ void TreeParser::Merge(
|
||||
assert( m_bIsInitialized );
|
||||
|
||||
const xmlNodePtr pRootNode = xmlDocGetRootElement( m_pSource );
|
||||
MergeDataFile* pMergeDataFile = 0;
|
||||
MergeDataFile* pMergeDataFile = nullptr;
|
||||
if( m_sLang != "qtz" && m_sLang != "en-US" )
|
||||
{
|
||||
pMergeDataFile = new MergeDataFile(
|
||||
|
@@ -49,16 +49,16 @@ int extractTranslations()
|
||||
|
||||
xmlDocPtr doc = xmlParseFile(sInputFileName.getStr());
|
||||
|
||||
xmlDocPtr res = xsltApplyStylesheet(stylesheet, doc, NULL);
|
||||
xmlDocPtr res = xsltApplyStylesheet(stylesheet, doc, nullptr);
|
||||
|
||||
for( xmlNodePtr nodeLevel1 = res->children; nodeLevel1 != NULL; nodeLevel1 = nodeLevel1->next)
|
||||
for( xmlNodePtr nodeLevel1 = res->children; nodeLevel1 != nullptr; nodeLevel1 = nodeLevel1->next)
|
||||
{
|
||||
for( xmlNodePtr nodeLevel2 = nodeLevel1->children; nodeLevel2 != NULL; nodeLevel2 = nodeLevel2->next)
|
||||
for( xmlNodePtr nodeLevel2 = nodeLevel1->children; nodeLevel2 != nullptr; nodeLevel2 = nodeLevel2->next)
|
||||
{
|
||||
if (nodeLevel2->type == XML_ELEMENT_NODE)
|
||||
{
|
||||
std::vector<OString> vIDs;
|
||||
for(xmlAttrPtr attribute = nodeLevel2->properties; attribute != NULL; attribute = attribute->next)
|
||||
for(xmlAttrPtr attribute = nodeLevel2->properties; attribute != nullptr; attribute = attribute->next)
|
||||
{
|
||||
xmlChar *content = xmlNodeListGetString(res, attribute->children, 1);
|
||||
vIDs.push_back(helper::xmlStrToOString(content));
|
||||
|
@@ -90,7 +90,7 @@ XMLParentNode::XMLParentNode( const XMLParentNode& rObj)
|
||||
for ( size_t i = 0; i < rObj.m_pChildList->size(); i++ )
|
||||
{
|
||||
XMLChildNode* pNode = (*rObj.m_pChildList)[ i ];
|
||||
if( pNode != NULL)
|
||||
if( pNode != nullptr)
|
||||
{
|
||||
switch(pNode->GetNodeType())
|
||||
{
|
||||
@@ -312,7 +312,7 @@ XMLFile::~XMLFile()
|
||||
}
|
||||
|
||||
XMLFile::XMLFile( const OString &rFileName ) // the file name, empty if created from memory stream
|
||||
: XMLParentNode( NULL )
|
||||
: XMLParentNode( nullptr )
|
||||
, m_sFileName( rFileName )
|
||||
{
|
||||
m_aNodes_localize.insert( TagMap::value_type(OString("bookmark") , sal_True) );
|
||||
@@ -343,7 +343,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement )
|
||||
OString sId, sLanguage("");
|
||||
LangHashMap* pElem;
|
||||
|
||||
if( pElement->GetAttributeList() != NULL )
|
||||
if( pElement->GetAttributeList() != nullptr )
|
||||
{
|
||||
for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ )
|
||||
{
|
||||
@@ -654,11 +654,11 @@ void XMLElement::ChangeLanguageTag( const OString &rValue )
|
||||
XMLElement* pElem = static_cast< XMLElement* >(pNode);
|
||||
pElem->ChangeLanguageTag( rValue );
|
||||
pElem->SetLanguageId(rValue);
|
||||
pElem = NULL;
|
||||
pNode = NULL;
|
||||
pElem = nullptr;
|
||||
pNode = nullptr;
|
||||
}
|
||||
}
|
||||
pCList = NULL;
|
||||
pCList = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -800,10 +800,10 @@ static OUString lcl_pathnameToAbsoluteUrl(const OString& rPathname)
|
||||
|
||||
|
||||
SimpleXMLParser::SimpleXMLParser()
|
||||
: m_pCurNode(NULL)
|
||||
, m_pCurData(NULL)
|
||||
: m_pCurNode(nullptr)
|
||||
, m_pCurData(nullptr)
|
||||
{
|
||||
m_aParser = XML_ParserCreate( NULL );
|
||||
m_aParser = XML_ParserCreate( nullptr );
|
||||
XML_SetUserData( m_aParser, this );
|
||||
XML_SetElementHandler( m_aParser, reinterpret_cast<XML_StartElementHandler>(StartElementHandler), reinterpret_cast<XML_EndElementHandler>(EndElementHandler) );
|
||||
XML_SetCharacterDataHandler( m_aParser, reinterpret_cast<XML_CharacterDataHandler>(CharacterDataHandler) );
|
||||
@@ -851,7 +851,7 @@ void SimpleXMLParser::StartElement(
|
||||
{
|
||||
XMLElement *pElement = new XMLElement( OString(name), m_pCurNode );
|
||||
m_pCurNode = pElement;
|
||||
m_pCurData = NULL;
|
||||
m_pCurData = nullptr;
|
||||
|
||||
int i = 0;
|
||||
while( atts[i] )
|
||||
@@ -864,7 +864,7 @@ void SimpleXMLParser::StartElement(
|
||||
void SimpleXMLParser::EndElement( const XML_Char * /*name*/ )
|
||||
{
|
||||
m_pCurNode = m_pCurNode->GetParent();
|
||||
m_pCurData = NULL;
|
||||
m_pCurData = nullptr;
|
||||
}
|
||||
|
||||
void SimpleXMLParser::CharacterData( const XML_Char *s, int len )
|
||||
@@ -884,13 +884,13 @@ void SimpleXMLParser::CharacterData( const XML_Char *s, int len )
|
||||
|
||||
void SimpleXMLParser::Comment( const XML_Char *data )
|
||||
{
|
||||
m_pCurData = NULL;
|
||||
m_pCurData = nullptr;
|
||||
new XMLComment( OString( data ), m_pCurNode );
|
||||
}
|
||||
|
||||
void SimpleXMLParser::Default( const XML_Char *s, int len )
|
||||
{
|
||||
m_pCurData = NULL;
|
||||
m_pCurData = nullptr;
|
||||
new XMLDefault(OString( s, len ), m_pCurNode );
|
||||
}
|
||||
|
||||
@@ -908,12 +908,12 @@ XMLFile *SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFileIn
|
||||
if (osl_openFile(aFileURL.pData, &h, osl_File_OpenFlag_Read)
|
||||
!= osl_File_E_None)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sal_uInt64 s;
|
||||
oslFileError e = osl_getFileSize(h, &s);
|
||||
void * p = NULL;
|
||||
void * p = nullptr;
|
||||
if (e == osl_File_E_None)
|
||||
{
|
||||
e = osl_mapFile(h, &p, s, 0, 0);
|
||||
@@ -921,14 +921,14 @@ XMLFile *SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFileIn
|
||||
if (e != osl_File_E_None)
|
||||
{
|
||||
osl_closeFile(h);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
XMLFile* pXMLFile = pXMLFileIn;
|
||||
pXMLFile->SetName( rFileName );
|
||||
|
||||
m_pCurNode = pXMLFile;
|
||||
m_pCurData = NULL;
|
||||
m_pCurData = nullptr;
|
||||
|
||||
m_aErrorInformation.m_eCode = XML_ERROR_NONE;
|
||||
m_aErrorInformation.m_nLine = 0;
|
||||
@@ -1030,7 +1030,7 @@ XMLFile *SimpleXMLParser::Execute( const OString &rFileName, XMLFile* pXMLFileIn
|
||||
break;
|
||||
}
|
||||
delete pXMLFile;
|
||||
pXMLFile = NULL;
|
||||
pXMLFile = nullptr;
|
||||
}
|
||||
|
||||
osl_unmapMappedFile(h, p, s);
|
||||
|
@@ -49,7 +49,7 @@ OString sOutputFile;
|
||||
OString sMergeSrc;
|
||||
OString sLangAttribute;
|
||||
OString sResourceType;
|
||||
XRMResParser *pParser = NULL;
|
||||
XRMResParser *pParser = nullptr;
|
||||
|
||||
extern "C" {
|
||||
// the whole interface to lexer is in this extern "C" section
|
||||
@@ -116,7 +116,7 @@ extern FILE *GetXrmFile()
|
||||
}
|
||||
}
|
||||
// this means the file could not be opened
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int WorkOnTokenSet( int nTyp, char *pTokenText )
|
||||
@@ -372,7 +372,7 @@ XRMResMerge::XRMResMerge(
|
||||
const OString &rMergeSource, const OString &rOutputFile,
|
||||
const OString &rFilename )
|
||||
: XRMResParser(),
|
||||
pMergeDataFile( NULL ),
|
||||
pMergeDataFile( nullptr ),
|
||||
sFilename( rFilename )
|
||||
{
|
||||
if (!rMergeSource.isEmpty() && sLanguage.equalsIgnoreAsciiCase("ALL"))
|
||||
|
Reference in New Issue
Block a user