| 4441 | } |
| 4442 | |
| 4443 | void PropertyXLink::copyTo(PropertyXLink& other, |
| 4444 | DocumentObject* linked, |
| 4445 | std::vector<std::string>* subs) const |
| 4446 | { |
| 4447 | if (!linked) { |
| 4448 | linked = _pcLink; |
| 4449 | } |
| 4450 | if (linked && linked->isAttachedToDocument()) { |
| 4451 | other.docName = linked->getDocument()->getName(); |
| 4452 | other.objectName = linked->getNameInDocument(); |
| 4453 | other.docInfo.reset(); |
| 4454 | other.filePath.clear(); |
| 4455 | } |
| 4456 | else { |
| 4457 | other.objectName = objectName; |
| 4458 | other.docName.clear(); |
| 4459 | other.docInfo = docInfo; |
| 4460 | other.filePath = filePath; |
| 4461 | } |
| 4462 | if (subs) { |
| 4463 | other._SubList = std::move(*subs); |
| 4464 | } |
| 4465 | else { |
| 4466 | other._SubList = _SubList; |
| 4467 | other._ShadowSubList = _ShadowSubList; |
| 4468 | } |
| 4469 | other._Flags = _Flags; |
| 4470 | } |
| 4471 | |
| 4472 | Property* PropertyXLink::Copy() const |
| 4473 | { |
no test coverage detected