Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 复制有局部样式的单元格后选择性粘贴,粘贴的内容和格式不对 #1066

Closed
2 tasks done
zhaolixin7 opened this issue Jan 9, 2024 · 6 comments · Fixed by #2098
Closed
2 tasks done
Assignees
Labels
bug:should be fixed bug Something isn't working
Milestone

Comments

@zhaolixin7
Copy link

初始清单

  • 这真的是个问题吗?
  • 我已经在 Github Issues 中搜索过了,但没有找到类似的问题。

受影响的包和版本

dev

复现步骤

1、复制有局部样式的单元格,如截图
2、选择性菜单选择仅粘贴值、仅格式、仅粘贴边框以外的内容
image

预期行为

选择仅粘贴值、仅格式、仅粘贴边框以外的内容后分别粘贴值、格式、不包含边框的内容和格式的全部格式

实际行为

2024_1_9 17_32_09 commands.json
2024_1_9 17_32_09 video.webm

运行环境

No response

操作系统

No response

构建工具

No response

@zhaolixin7 zhaolixin7 added the bug Something isn't working label Jan 9, 2024
@wzhudev wzhudev added this to the January 2024 milestone Jan 12, 2024
@yuhongz
Copy link
Contributor

yuhongz commented Apr 28, 2024

这个 bug 的原因是,富文本(cell.p)被当做格式被粘贴了,它不仅含有富文本的格式,也含有富文本的文本,这会与单元格文本(即 cell.v) 冲突。为剥离影响,预期暂调整为:「选择性粘贴-仅粘贴格式」将不会粘贴源富文本格式(cell.p),只粘贴源单元格格式(cell.s),粘贴后,目标单元格的原本富文本格式可能会受影响,但这是预期中的 @zhaolixin7

@univer-bot
Copy link

univer-bot bot commented Apr 28, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

The reason for this bug is that the rich text (cell.p) is pasted as format. It not only contains the format of the rich text, but also contains the text of the rich text, which will conflict with the cell text (i.e. cell.v). In order to peel off the impact, it is expected that the temporary adjustment is: "Paste Special - Paste Format Only" will not paste the source rich text format (cell.p), but only the source cell format (cell.s). After pasting, the target cell The original rich text format may be affected, but this is expected @zhaolixin7

@oumomomo
Copy link

粘贴为公式时,不含公式的文本也会被粘贴下来
2024_4_28 19_10_28 video.webm

@univer-bot
Copy link

univer-bot bot commented Apr 28, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

When pasting as a formula, text without formulas will also be pasted.
2024_4_28 19_10_28 video.webm

@yuhongz
Copy link
Contributor

yuhongz commented Apr 30, 2024

粘贴为公式时,不含公式的文本也会被粘贴下来 2024_4_28 19_10_28 video.webm

这个是复合预期的,excel 也是如此 @oumomomo

@univer-bot
Copy link

univer-bot bot commented Apr 30, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

When pasting as a formula, text without formulas will also be pasted [2024_4_28 19_10_28 video.webm](https://github.com/dream-num/univer/assets/167171356/f338525a-026c-4cd5-846a- 35d86418b5fd)

This is compound expected, and so is excel @oumomomo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:should be fixed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants