Fixed XLComments.cpp for Rich Text Excel commands

Used the correct variable to cycle through the siblings of rich text comments
This commit is contained in:
mapfeld
2025-06-24 16:01:30 +02:00
committed by GitHub
parent 86af3b043f
commit 465594a01f

View File

@@ -72,10 +72,10 @@ namespace {
else if (textElement.name() == "r"s) { // rich text
XMLNode richTextSubnode = textElement.first_child_of_type(pugi::node_element);
while (not richTextSubnode.empty()) {
if (textElement.name() == "t"s) {
result += textElement.first_child().value();
if (richTextSubnode.name() == "t"s) {
result += richTextSubnode.first_child().value();
}
else if (textElement.name() == "rPr"s) {} // ignore rich text formatting info
else if (richTextSubnode.name() == "rPr"s) {} // ignore rich text formatting info
else {} // ignore other nodes
richTextSubnode = richTextSubnode.next_sibling_of_type(pugi::node_element);
}