DOC-FULL-017 P1 | Office 文件预览策略模型 【status:todo】 #73

Closed
opened 2026-06-07 11:33:18 +08:00 by wangdl · 2 comments
Owner

Word/Excel/PowerPoint → PlatformPreview/ExternalOpen,识别类型/返回 fileSize/previewMode,未来支持 serverConvertedPdf

M-DOC-FULL 里程碑 issue。详见设计文档。

## Word/Excel/PowerPoint → PlatformPreview/ExternalOpen,识别类型/返回 fileSize/previewMode,未来支持 serverConvertedPdf M-DOC-FULL 里程碑 issue。详见设计文档。
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-07 11:33:18 +08:00
wangdl changed title from DOC-FULL-017 P1 | Office 文件预览策略模型 to DOC-FULL-017 P1 | Office 文件预览策略模型 【status:todo】 2026-06-07 19:15:05 +08:00
Author
Owner

审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。

本 Issue: 无 office 模块。文件类型识别已有(MaterialType::Word/Excel/PowerPoint)。PreviewMode 已有。缺策略文档+DocumentInfo 返回。

状态: status:todo
工作类型: work:new-module

## 审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。 **本 Issue**: 无 office 模块。文件类型识别已有(MaterialType::Word/Excel/PowerPoint)。PreviewMode 已有。缺策略文档+DocumentInfo 返回。 **状态**: status:todo **工作类型**: work:new-module
Author
Owner

完成报告

改动

  • office.rs (NEW): OfficePreviewStrategy 枚举 (PlatformPreview/ExternalOpen/ServerConvertedPdf/Unsupported)
  • office.rs: OfficePreviewConfig (material_type/strategy/file_size/supports_search_after_conversion)
  • office.rs: get_office_preview_config() — Word/Excel→PlatformPreview, PowerPoint→ExternalOpen
  • office.rs: is_office_type() + office_preview_mode()
  • office.rs: 5 测试
  • FFI: get_office_preview_config_ffi + is_office_type_ffi + UDL

预览策略

类型 策略 可搜索(转 PDF 后)
Word PlatformPreview (QLPreviewController)
Excel PlatformPreview
PowerPoint ExternalOpen

已知限制

  • #99: office_preview_mode() 无人调用

验证

cargo test office — 7 passed
cargo test --all — 156 passed, 0 failed
## 完成报告 ### 改动 - `office.rs` (NEW): `OfficePreviewStrategy` 枚举 (PlatformPreview/ExternalOpen/ServerConvertedPdf/Unsupported) - `office.rs`: `OfficePreviewConfig` (material_type/strategy/file_size/supports_search_after_conversion) - `office.rs`: `get_office_preview_config()` — Word/Excel→PlatformPreview, PowerPoint→ExternalOpen - `office.rs`: `is_office_type()` + `office_preview_mode()` - `office.rs`: 5 测试 - FFI: `get_office_preview_config_ffi` + `is_office_type_ffi` + UDL ### 预览策略 | 类型 | 策略 | 可搜索(转 PDF 后)| |------|------|------| | Word | PlatformPreview (QLPreviewController) | 是 | | Excel | PlatformPreview | 是 | | PowerPoint | ExternalOpen | 是 | ### 已知限制 - #99: `office_preview_mode()` 无人调用 ### 验证 ``` cargo test office — 7 passed cargo test --all — 156 passed, 0 failed ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#73
No description provided.