| 2829 | */ |
| 2830 | |
| 2831 | void Document::renameObjectIdentifiers( |
| 2832 | const std::map<ObjectIdentifier, ObjectIdentifier>& paths, |
| 2833 | const std::function<bool(const DocumentObject*)>& selector) // NOLINT |
| 2834 | { |
| 2835 | std::map<ObjectIdentifier, ObjectIdentifier> extendedPaths; |
| 2836 | |
| 2837 | auto it = paths.begin(); |
| 2838 | while (it != paths.end()) { |
| 2839 | extendedPaths[it->first.canonicalPath()] = it->second.canonicalPath(); |
| 2840 | ++it; |
| 2841 | } |
| 2842 | |
| 2843 | for (const auto object : d->objectArray) { |
| 2844 | if (selector(object)) { |
| 2845 | object->renameObjectIdentifiers(extendedPaths); |
| 2846 | } |
| 2847 | } |
| 2848 | } |
| 2849 | |
| 2850 | int Document::recompute(const std::vector<DocumentObject*>& objs, |
| 2851 | bool force, |
no test coverage detected