Tests: add more unit tests for ParameterGrp

This commit is contained in:
wmayer
2024-04-17 17:50:48 +02:00
committed by wwmayer
parent 8ebb848154
commit 757d564a7c
2 changed files with 190 additions and 5 deletions

View File

@@ -2060,16 +2060,15 @@ DOMPrintFilter::FilterAction DOMPrintFilter::acceptNode(const DOMNode* node) con
}
}
// clang-format off
switch (node->getNodeType()) {
case DOMNode::TEXT_NODE: {
// Filter out text element if it is under a group node. Note text xml
// element is plain text in between tags, and we do not store any text
// there.
auto parent = node->getParentNode();
if (parent
&& XMLString::compareString(parent->getNodeName(),
XStr("FCParamGroup").unicodeForm())
== 0) {
if (parent && XMLString::compareString(parent->getNodeName(),
XStr("FCParamGroup").unicodeForm()) == 0) {
return DOMNodeFilter::FILTER_REJECT;
}
return DOMNodeFilter::FILTER_ACCEPT;
@@ -2082,6 +2081,7 @@ DOMPrintFilter::FilterAction DOMPrintFilter::acceptNode(const DOMNode* node) con
return DOMNodeFilter::FILTER_ACCEPT;
}
}
// clang-format on
}
//**************************************************************************