Skip to content

XLSheet.cpp - The bug remains, you need to add brackets and redefine "tabSelected" #337

@isajkin

Description

@isajkin
void setTabSelected(const XMLDocument& xmlDocument, bool selected)
{    // 2024-04-30: whitespace support
    unsigned int value       = (selected ? 1 : 0);
    XMLNode      sheetView   = xmlDocument.document_element().child("sheetViews").first_child_of_type(pugi::node_element);
    XMLAttribute tabSelected = sheetView.attribute("tabSelected");
    if (tabSelected.empty()) { //!!!!!
        sheetView.prepend_attribute("tabSelected");    // BUGFIX 2024-05-01: create tabSelected attribute if it does not exist
        tabSelected= sheetView.attribute("tabSelected");
    } //!!!!!
    tabSelected.set_value(value);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingresolvedThis issue has been resolved.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions