diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx index 0495883a5311..8e7d320affc5 100644 --- a/l10ntools/inc/xmlparse.hxx +++ b/l10ntools/inc/xmlparse.hxx @@ -161,7 +161,7 @@ public: void Write( OString const &rFilename ); void Write( std::ofstream &rStream, XMLNode *pCur = nullptr ); - bool CheckExportStatus( XMLParentNode *pCur = nullptr ); + bool CheckExportStatus( XMLChildNode *pCur = nullptr ); XMLFile& operator=(const XMLFile& rObj); diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index bcf5d37154cb..30da2bebf509 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -473,7 +473,7 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur ) } } -bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) +bool XMLFile::CheckExportStatus( XMLChildNode *pCur ) { static bool bStatusExport = true; @@ -489,7 +489,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) for ( size_t i = 0; i < GetChildList()->size(); i++ ) { XMLChildNode* pElement = (*GetChildList())[ i ]; - if( pElement->GetNodeType() == XMLNodeType::ELEMENT ) CheckExportStatus( static_cast(pElement) );//, i); + if( pElement->GetNodeType() == XMLNodeType::ELEMENT ) CheckExportStatus( pElement );//, i); } } } @@ -520,13 +520,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) else if ( pElement->GetChildList() ) { for (size_t k = 0; k < pElement->GetChildList()->size(); ++k) - { - auto const child = (*pElement->GetChildList())[k]; - auto const type = child->GetNodeType(); - if (type != XMLNodeType::DATA && type != XMLNodeType::COMMENT) { - CheckExportStatus( static_cast(child) ); - } - } + CheckExportStatus( (*pElement->GetChildList())[k] ); } } break;