[se] Fix read/write metadata from xml

This commit is contained in:
GoshaZotov
2026-02-05 13:25:16 +03:00
committed by Igor Zotov
parent eb1fd5e682
commit 938b1af126
2 changed files with 28 additions and 1 deletions

View File

@ -2057,6 +2057,30 @@ var editor;
reader = new StaxParser(contentMetaData, metaData, xmlParserContext);
wb.metadata.fromXml(reader);
}
let rdRichValue = wbPart.getPartByRelationshipType(openXml.Types.rdRichValue.relationType);
if (rdRichValue) {
let content = rdRichValue.getDocumentContent();
wb.richValueData = new AscCommonExcel.CRichValueData();
reader = new StaxParser(content, rdRichValue, xmlParserContext);
wb.richValueData.fromXml(reader);
}
let rdRichValueStructure = wbPart.getPartByRelationshipType(openXml.Types.rdRichValueStructure.relationType);
if (rdRichValueStructure) {
let content = rdRichValueStructure.getDocumentContent();
wb.richValueStructures = new AscCommonExcel.CRichValueStructures();
reader = new StaxParser(content, rdRichValueStructure, xmlParserContext);
wb.richValueStructures.fromXml(reader);
}
let rdRichValueTypes = wbPart.getPartByRelationshipType(openXml.Types.rdRichValueTypes.relationType);
if (rdRichValueTypes) {
let content = rdRichValueTypes.getDocumentContent();
wb.richValueTypesInfo = new AscCommonExcel.CRichValueTypesInfo();
reader = new StaxParser(content, rdRichValueTypes, xmlParserContext);
wb.richValueTypesInfo.fromXml(reader);
}
}
//theme

View File

@ -764,7 +764,10 @@
worksheetSortMap: {dir: "", filename: "worksheetSortMap.xml", contentType: "application/vnd.ms-excel.wsSortMap+xml", relationType: "http://schemas.microsoft.com/office/2006/relationships/wsSortMap"},
xmlSignature: {dir: "", filename: "xmlSignature.xml", contentType: "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml", relationType: "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature"},
hyperlink: {dir: "", filename: "", contentType: "", relationType: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"},
metadata: {dir: "xl", filename: "metadata.xml", contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml", relationType: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata"},
metadata: {dir: "", filename: "metadata.xml", contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml", relationType: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata"},
rdRichValue: {dir: "richData", filename: "rdrichvalue.xml", contentType: "application/vnd.ms-excel.rdrichvalue+xml", relationType: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue"},
rdRichValueStructure: {dir: "richData", filename: "rdrichvaluestructure.xml", contentType: "application/vnd.ms-excel.rdrichvaluestructure+xml", relationType: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure"},
rdRichValueTypes: {dir: "richData", filename: "rdRichValueTypes.xml", contentType: "application/vnd.ms-excel.rdrichvaluetypes+xml", relationType: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes"},
threadedComment: {dir: "../threadedComments", filename: "threadedComment[N].xml", contentType: "application/vnd.ms-excel.threadedcomments+xml", relationType: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment"},
person: {dir: "../persons", filename: "person.xml", contentType: "application/vnd.ms-excel.person+xml", relationType: "http://schemas.microsoft.com/office/2017/10/relationships/person"},