From cf8991a234d6ae1fba968081f01492a7309c2467 Mon Sep 17 00:00:00 2001 From: Crzyrndm Date: Sun, 8 Jul 2018 15:44:12 +1200 Subject: [PATCH] no need to recreate the uri --- source/workbook/workbook.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/workbook/workbook.cpp b/source/workbook/workbook.cpp index 9ad48973..4ac1a4d2 100644 --- a/source/workbook/workbook.cpp +++ b/source/workbook/workbook.cpp @@ -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;