Remove unused code into GUI

This commit is contained in:
andrea
2022-07-11 15:10:25 +02:00
committed by Uwe
parent 094ae93678
commit 3018985f80
47 changed files with 14 additions and 1592 deletions

View File

@@ -65,54 +65,7 @@ public:
return true;
}
protected:
// See App::MergeDocument::XMLMergeReader for comments, with one additional
// benefits, we can save repetitive coding here.
#if 0
void startElement(const XMLCh* const uri, const XMLCh* const localname,
const XMLCh* const qname,
const XERCES_CPP_NAMESPACE_QUALIFIER Attributes& attrs)
{
Base::XMLReader::startElement(uri, localname, qname, attrs);
if (LocalName == "Property")
propertyStack.push(std::make_pair(AttrMap["name"],AttrMap["type"]));
if (!propertyStack.empty()) {
// replace the stored object name with the real one
if (LocalName == "Link" || LocalName == "LinkSub" || (LocalName == "String" && propertyStack.top().first == "Label")) {
for (std::map<std::string, std::string>::iterator it = AttrMap.begin(); it != AttrMap.end(); ++it) {
std::map<std::string, std::string>::const_iterator jt = nameMap.find(it->second);
if (jt != nameMap.end())
it->second = jt->second;
}
}
// update the expression if name of the object is used
else if (LocalName == "Expression") {
std::map<std::string, std::string>::iterator it = AttrMap.find("expression");
if (it != AttrMap.end()) {
// search for the part before the first dot that should be the object name.
std::string expression = it->second;
std::string::size_type dotpos = expression.find_first_of(".");
if (dotpos != std::string::npos) {
std::string name = expression.substr(0, dotpos);
std::map<std::string, std::string>::const_iterator jt = nameMap.find(name);
if (jt != nameMap.end()) {
std::string newexpression = jt->second;
newexpression += expression.substr(dotpos);
it->second = newexpression;
}
}
}
}
}
}
void endElement(const XMLCh* const uri, const XMLCh *const localname, const XMLCh *const qname)
{
Base::XMLReader::endElement(uri, localname, qname);
if (LocalName == "Property")
propertyStack.pop();
}
#endif
private:
std::map<std::string, std::string>& nameMap;