| Summary: | Pasting from Zoom only pastes first paragraph of multi-paragraph message | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Mike Kaganski <mikekaganski> |
| Component: | Writer | Assignee: | Mike Kaganski <mikekaganski> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | 5.2 all versions | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| URL: | https://forumooo.ru/index.php/topic,8130 | ||
| Whiteboard: | target:7.0.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: |
InsideClipboard capture of a multi-paragraph message copied from Zoom on Windows
An InsideClipboard capture of long (>2048 characters) text with three paragraphs separated by CRs |
||
|
Description
Mike Kaganski
2020-05-16 06:06:51 UTC
Created attachment 160886 [details]
An InsideClipboard capture of long (>2048 characters) text with three paragraphs separated by CRs
This specially crafted clipboard content has three lines separated by CRs, where first line is short, second one's length was chosen such that reading the clipboard contents into internal buffer (2048 Unicode characters) ends with its trailing CR, and the last line is also short. This test demonstrates that when CR happens on buffer boundary, we treat it as paragraph break, while it is treated incorrectly in the middle.
Problematic code is in SwASCIIParser::ReadChars (switch case handling 0x0d).
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f33d2d8b5b7ae022eebfa3e22deac71351b3f4e1 tdf#133077: fix lone CR handling in plain text clipboard on Windows It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |