diff options
-rw-r--r-- | external/liborcus/UnpackedTarball_liborcus.mk | 1 | ||||
-rw-r--r-- | external/liborcus/create-element.patch.0 | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 74fbbb2e9e33..88e0963c6dde 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/rpath.patch.0 \ external/liborcus/gcc9.patch.0 \ external/liborcus/libtool.patch.0 \ + external/liborcus/create-element.patch.0 \ )) ifeq ($(OS),WNT) diff --git a/external/liborcus/create-element.patch.0 b/external/liborcus/create-element.patch.0 new file mode 100644 index 000000000000..b1012e5c90d8 --- /dev/null +++ b/external/liborcus/create-element.patch.0 @@ -0,0 +1,55 @@ +--- src/liborcus/xml_map_tree.cpp ++++ src/liborcus/xml_map_tree.cpp +@@ -723,35 +723,28 @@ + element* elem = r.first; + bool created = r.second; + +- if (created) +- { +- // No element of that name exists. +- elem->elem_type = element_linked; +- elem->ref_type = ref_type; +- } +- else ++ if (!created) + { + // This element already exists. Check if this is already linked. + if (elem->ref_type != reference_unknown || elem->elem_type != element_unlinked) + throw xpath_error("This element is already linked. You can't link the same element twice."); +- +- // Turn this existing non-linked element into a linked one. +- delete elem->child_elements; +- elem->elem_type = element_linked; +- elem->ref_type = ref_type; +- switch (ref_type) +- { +- case reference_cell: +- elem->cell_ref = new cell_reference; +- break; +- case reference_range_field: +- elem->field_ref = new field_in_range; +- break; +- default: +- throw general_error("Unknown reference type in xml_map_tree::get_element_stack."); +- } +- + } ++ ++ // Turn this existing non-linked element into a linked one. ++ delete elem->child_elements; ++ elem->elem_type = element_linked; ++ elem->ref_type = ref_type; ++ switch (ref_type) ++ { ++ case reference_cell: ++ elem->cell_ref = new cell_reference; ++ break; ++ case reference_range_field: ++ elem->field_ref = new field_in_range; ++ break; ++ default: ++ throw general_error("Unknown reference type in xml_map_tree::get_element_stack."); ++ } + + ret.elem_stack.push_back(elem); + ret.node = elem; |