Merge pull request #18491 from PreferLinux/RTF+Textbox-work
commit726a9134c8523f849cb265000c27ed3c5b426d19
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 28 Jan 2020 15:26:36 +0000 (28 16:26 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Jan 2020 15:26:36 +0000 (28 16:26 +0100)
tree517f5494c7f1237fadc3b2f96ab13551d41015f0
parent4b4b29745058c4f0e3f2151902f031ca67cd7d01
parentb87c271b6f2d650187e36e58f87e71d70693c89c
Merge pull request #18491 from PreferLinux/RTF+Textbox-work

I've implemented a heap of missing RTF and RichTextBox stuff, and also made some improvements or fixes to various aspects of it. I'm sorry this is so big...

To give an overview of the changes, here's a list:
- Removed the RTF Charcode / Charset handling that wasn't actually used, had a lot of missing functionality and was basically reimplementing character encoding handling, and replaced it with ensuring the correct character encoding is being used (changing when needed).
- Improved RTF handling of objects with object results (process the given object result). Sometimes pictures can be like this.
- Improved line wrapping and alignment
- Added or greatly improved support for:
  - paragraph spacing
  - line spacing
  - paragraph indents (left, right, hanging)
  - tabstops (left, centre, right, decimal)
  - text background colour (like highlighting)
  - superscript / subscript
  - character offset (vertical)
  - text visibility
- Significantly improved RichTextBox RTF generation
- Cache DPI, rather than doing `CreateGraphics()` every time it is needed
- A variety of other fixes and improvements, with a few I can think of relating to:
  - caret position
  - replacing text
  - invalidation and drawing
  - when tags are added or deleted
mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs