GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): ODS preview keeps shape text out of cell values · pingdotgg/t3code@2f97764

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components/files
    • extendedDocumentPreview.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/files/extendedDocumentPreview.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/components/files/extendedDocumentPreview.ts
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,15 @@ export async function openDocument(
279279
const value =
280280
cell.name === "table:covered-table-cell"
281281
? ""
282-
: find(cell, "text:p", "office:annotation").map(text).join("\n") ||
282+
: cell.children
283+
// Shapes anchored to a cell float over the sheet; their text is not the cell's value.
284+
.filter(
285+
(child) =>
286+
child.name !== "office:annotation" && !child.name.startsWith("draw:"),
287+
)
288+
.flatMap((child) => (child.name === "text:p" ? [child] : find(child, "text:p")))
289+
.map(text)
290+
.join("\n") ||
283291
cell.attrs["office:value"] ||
284292
cell.attrs["office:date-value"] ||
285293
cell.attrs["office:time-value"] ||

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.