ElyTable: the import scan keeps one row at a time, not the whole file (T-14)
This commit is contained in:
3 files changed
+9
-10
No files matched your search
@@ -154,22 +154,20 @@ fn decode(bytes: &[u8], encoding: Encoding) -> Option<String> {
|
||||
.map(|text| text.into_owned())
|
||||
}
|
||||
|
||||
/// Rows as Calc's text import reads them (impex.cxx).
|
||||
fn split(text: &str, how: &Import) -> Vec<Vec<String>> {
|
||||
/// Calc's text-import rows (impex.cxx), one at a time.
|
||||
fn split<'a>(text: &'a str, how: &'a Import) -> impl Iterator<Item = Vec<String>> + 'a {
|
||||
let mut chars = text.chars().peekable();
|
||||
let mut rows = Vec::new();
|
||||
while chars.peek().is_some() {
|
||||
std::iter::from_fn(move || {
|
||||
chars.peek()?;
|
||||
let mut row = Vec::new();
|
||||
loop {
|
||||
let (value, more) = field(&mut chars, how);
|
||||
row.push(value);
|
||||
if !more {
|
||||
break;
|
||||
return Some(row);
|
||||
}
|
||||
}
|
||||
rows.push(row);
|
||||
}
|
||||
rows
|
||||
})
|
||||
}
|
||||
|
||||
/// One field, and whether the record goes on.
|
||||
|
||||
+2
-2
@@ -21,9 +21,9 @@
|
||||
- [x] T-11 对话框比其标签活得久:导出、定义名称、重命名不可见却“开着”,挡住导入;名称表的“转到”激活已关闭的标签 — 关标签时一并关掉其对话框与选项列表;R1 PASS
|
||||
- [x] T-12 打印区域是整列或整行时页面设置无法应用 — 打印区域可为整列、整行(每端至多一个 $);R2 PASS
|
||||
- [x] T-13 打印失败报成“导出失败”(非 macOS 必现) — print_later 自己以“打印失败”报错,五个应用同;R1 PASS
|
||||
- [ ] T-14 导入扫描把整个文件的每个字段都建成字符串
|
||||
- [x] T-14 导入扫描把整个文件的每个字段都建成字符串 — split 逐行给出,扫描只留预览行与列标记;R1 PASS
|
||||
- [ ] T-15 非 UTF-8 文本的默认编码跟系统区域而不是界面语言
|
||||
- [ ] S-01 切换幻灯片后主画布不重画
|
||||
- [x] S-01 切换幻灯片后主画布不重画 — 已由 be31260(R2.4)修好并有单测,此处补勾
|
||||
- [x] S-02 `deck.rs` 超过 500 行 — 随 S-03 把 Extra 移到 extra.rs,deck.rs 463 行
|
||||
- [x] S-03 ElyShow 的缩放一两帧后弹回“适合幻灯片”,缩放功能不可用 — 只在标签首次观察时适合一次;R1 PASS
|
||||
- [ ] S-04 选屏对话框被别的对话框顶掉后,`show_starting` 卡住、放映副本泄漏
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
PASS
|
||||
Reference in new issue
Block a user