| 1395 | constexpr auto fcElementObjectDep {"Dep"}; |
| 1396 | |
| 1397 | void Document::writeObjectDeps(const std::vector<DocumentObject*>& objs, |
| 1398 | Base::Writer& writer) const |
| 1399 | { |
| 1400 | for (auto o : objs) { |
| 1401 | // clang-format off |
| 1402 | const auto& outList = o->getOutList(DocumentObject::OutListNoHidden | |
| 1403 | DocumentObject::OutListNoXLinked); |
| 1404 | // clang-format on |
| 1405 | |
| 1406 | auto objName = o->getNameInDocument(); |
| 1407 | writer.Stream() << writer.ind() |
| 1408 | << "<" << fcElementObjectDeps |
| 1409 | << " " << fcAttrDepObjName << "=\"" |
| 1410 | << (objName ? objName : "") << "\" " |
| 1411 | << fcAttrDepCount << "=\"" |
| 1412 | << outList.size(); |
| 1413 | if (outList.empty()) { |
| 1414 | writer.Stream() << "\"/>\n"; |
| 1415 | continue; |
| 1416 | } |
| 1417 | int partial = o->canLoadPartial(); |
| 1418 | if (partial > 0) { |
| 1419 | writer.Stream() << "\" " << fcAttrDepAllowPartial << "=\"" << partial; |
| 1420 | } |
| 1421 | writer.Stream() << "\">\n"; |
| 1422 | writer.incInd(); |
| 1423 | for (auto dep : outList) { |
| 1424 | auto depName = dep ? dep->getNameInDocument() : ""; |
| 1425 | writer.Stream() << writer.ind() |
| 1426 | << "<" << fcElementObjectDep |
| 1427 | << " " << fcAttrDepObjName << "=\"" |
| 1428 | << (depName ? depName : "") << "\"/>\n"; |
| 1429 | } |
| 1430 | writer.decInd(); |
| 1431 | writer.Stream() << writer.ind() << "</" << fcElementObjectDeps << ">\n"; |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | void Document::writeObjectType(const std::vector<DocumentObject*>& objs, |
| 1436 | Base::Writer& writer) const |
nothing calls this directly
no test coverage detected