summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-11-21 11:51:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-11-22 08:14:09 +0100
commit337691db0e3f928ed6dff489fc6305a9a5e0b493 (patch)
tree9a847bc6fcc341d93ccea746db23f3951efd3394 /l10ntools
parent017c38a9702da0566ac1ce5d758444e5ff25df9d (diff)
Simplify previous fix
...e735de2051143347b7283c85ad80b0e2412522dc "Avoid some unnecessary, wrong downcasts during `make translations" Change-Id: If6110e16698302b3d43b2192cf0f0e0d0fddb57b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143026 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/xmlparse.hxx2
-rw-r--r--l10ntools/source/xmlparse.cxx12
2 files changed, 4 insertions, 10 deletions
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<XMLParentNode*>(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<XMLParentNode*>(child) );
- }
- }
+ CheckExportStatus( (*pElement->GetChildList())[k] );
}
}
break;