| 97 | } |
| 98 | |
| 99 | std::string VRMLObject::getRelativePath(const std::string& prefix, |
| 100 | const std::string& resource) const |
| 101 | { |
| 102 | std::string str; |
| 103 | std::string intname = this->getNameInDocument(); |
| 104 | if (!prefix.empty()) { |
| 105 | if (resource.substr(0, prefix.size()) == prefix) { |
| 106 | std::string suffix = resource.substr(prefix.size()); |
| 107 | str = intname + suffix; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | if (str.empty()) { |
| 112 | Base::FileInfo fi(resource); |
| 113 | str = intname + "/" + fi.fileName(); |
| 114 | } |
| 115 | |
| 116 | return str; |
| 117 | } |
| 118 | |
| 119 | std::string VRMLObject::fixRelativePath(const std::string& name, const std::string& resource) |
| 120 | { |
nothing calls this directly
no test coverage detected