-
Notifications
You must be signed in to change notification settings - Fork 542
8351878: RichTextArea: copy/paste issues #1735
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
8351878: RichTextArea: copy/paste issues #1735
Conversation
|
👋 Welcome back angorya! A progress list of the required criteria for merging this PR into |
|
@andy-goryachev-oracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 17 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
@Ziad-Mid : please take a look at this PR. Please refer to https://github.com/openjdk/jfx/blob/master/README-code-reviews.md for general guidance. The areas I would like you to focus on specifically are:
|
|
@andy-goryachev-oracle Syntax:
|
|
Reviewers: @Ziad-Mid @kevinrushforth |
|
@andy-goryachev-oracle Usage: |
|
/reviewers 2 |
|
@kevinrushforth |
|
The tests run successfully with the fix however there are a few things that do not work as expected I guess :
2- Tested with text written in outlook and pasting it and it do not apply formatting neither for RTL or LTR text |
|
@Ziad-Mid :
Can you try setting different fonts? السَّلَامُ عَلَيْكُمْ = \u0627\u0644\u0633\u0651\u064e\u0644\u064e\u0627\u0645\u064f \u0639\u064e\u0644\u064e\u064a\u0652\u0643\u064f\u0645\u0652 |
By RTL and LTR I just meant normal text orientation and arabic one , when writing a text in outlook and copying it then pasting it doesn't keep the formatting |
please be more specific - maybe include a screenshot of the outlook message vs. rich text area? I can see the pasted Arabic text rendered correctly (that is, it looks similar to the text in outlook and going from right to left). The RTL paragraph attribute is not yet supported, so the paragraph consisting of only Arabic text might look left-aligned contrary to expectation. |
Thank you, the screenshot helped! The problem was in the way HTML text was copied to Outlook (for some reason, Outlook prioritizes HTML over RTF when pasting). The font sizes in HTML were using points ( In addition to that, copying to HTML did not process boolean attributes correctly. Thank you for finding these issues! |
|
Created https://bugs.openjdk.org/browse/JDK-8353003 for the diacritic marks issue. |
|
Reviewers: @lukostyra @Ziad-Mid |
lukostyra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - did some testing, both with issue-attached Word file and some standard Polish diacritic test sentences and everything seems to work fine.
Question coming from my own curiosity - when you post a sentence containing diacritics (ex. shortest tester for all diacritics in Polish - "Zażółć gęślą jaźń") you can see that some fonts don't support those special characters (ex. Arial Rounded MT Bold on Windows) so as a fallback they are drawn with a different font that supports them. It's quite normal behavior to do so I've seen often, but do you know what is the process for determining which font to use as a replacement in RTA? Is it something we have to worry about?
A good question! Maybe @prrace can explain the process. Looking in the Monkey Tester, it is clear that the font substitution algorithm is unable to pick the right fallback font from Arial Rounded MT Bold on macOS (while Swing simply refuses to render anything): |
|
Thank you all for reviewing! |
|
Going to push as commit 1b26b66.
Your commit was automatically rebased without conflicts. |
|
@andy-goryachev-oracle Pushed as commit 1b26b66. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |






Fixed several issues found in importing RTF text:
Also, HTML copy suffered from the following issues:
The charset issue was caused by my removal of the character decoder code present in the original JDK RTF parser/reader. Why did I do that?
This PR does not add import of RTL paragraph attribute needed to align RTL text correctly.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1735/head:pull/1735$ git checkout pull/1735Update a local copy of the PR:
$ git checkout pull/1735$ git pull https://git.openjdk.org/jfx.git pull/1735/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1735View PR using the GUI difftool:
$ git pr show -t 1735Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1735.diff
Using Webrev
Link to Webrev Comment