Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ods/writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,10 @@ export function writeMetaXml(props?: WorkbookProperties): string {
const modified = props?.modified ?? new Date()
children.push(xmlElement("dc:date", undefined, formatOdsDate(modified)))

children.push(xmlElement("meta:generator", undefined, "defter"))
// The producing application, per ODF §4.3.2.1. The same name the XLSX
// writer puts in `<Application>` — this said `defter`, the project's
// former name, for as long as the ODS writer has existed.
children.push(xmlElement("meta:generator", undefined, "hucre"))

const metaContent = xmlElement("office:meta", undefined, children)

Expand Down
4 changes: 2 additions & 2 deletions test/ods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@ describe("ODS Writer", () => {
expect(cells[1].attrs["office:value-type"]).toBeUndefined()
})

it("writes Application: defter in meta.xml", async () => {
it("names itself as the generator in meta.xml", async () => {
const data = await writeOds({
sheets: [{ name: "Sheet1", rows: [["test"]] }],
})

const metaDoc = await parseXmlFromZip(data, "meta.xml")
const metaEl = findChild(metaDoc, "meta")
const generator = findChild(metaEl, "generator")
expect(getElementText(generator)).toBe("defter")
expect(getElementText(generator)).toBe("hucre")
})

it("writes document properties in meta.xml", async () => {
Expand Down
Loading