mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
no need to recreate the uri
This commit is contained in:
parent
322490b397
commit
cf8991a234
|
@ -1596,13 +1596,12 @@ void workbook::reorder_relationships()
|
|||
return;
|
||||
}
|
||||
// copy of existing relations
|
||||
const auto wb_rel = manifest().relationship(path("/"), relationship_type::office_document);
|
||||
const auto wb_path = wb_rel.target().path();
|
||||
auto rel_copy = manifest().relationships(wb_path);
|
||||
const auto wb_rel_target = manifest().relationship(path("/"), relationship_type::office_document).target();
|
||||
auto rel_copy = manifest().relationships(wb_rel_target.path());
|
||||
// clear existing relations
|
||||
for (const auto &rel : rel_copy)
|
||||
{
|
||||
manifest().unregister_relationship(uri(wb_path.string()), rel.id());
|
||||
manifest().unregister_relationship(wb_rel_target, rel.id());
|
||||
}
|
||||
// create new relations
|
||||
std::size_t index = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user