terminal/src/cascadia/TerminalCore
Carlos Zamora e79a421f3a
Abstract GetTextForClipboard() for UIA (#4578)
## Summary of the Pull Request
`GetTextForClipboard` already exists in the TextBuffer. It makes sense to use that for UIA as well. This changes the behavior or `GetText()` such that it does not remove leading/trailing whitespace anymore. That is more of an expected behavior.

## References
This also contributes to...
- #4509: UIA Box Selection
- #2447: UIA Signaling for Selection
- #1354: UIA support for Wide Glyphs
Now that the expansion occurs at before render-time, the selection anchors are an accurate representation of what is selected. We just need to move GetText to the TextBuffer. Then we can have those three issues just rely on code from the text buffer. This also means ConHost gets some of this stuff for free 😀

## Detailed Description of the Pull Request / Additional comments
- `TextBuffer::GetTextForClipboard()` --> `GetText()`
- `TextBuffer::GetText()` no longer requires GetForegroundColor/GetBackgroundColor. If either of these are not defined, we return a `TextAndColor` with only the `text` field populated.
- renamed a few parameters for copying text to the clipboard for clarity
- Updated `UiaTextRange::GetText()` to use `TextBuffer::GetText()`

## Validation Steps Performed
Manual tests for UIA using accessibility insights and Windows Terminal's copy action (w/ and w/out shift)

Added tests as well.
2020-03-09 08:17:34 -07:00
..
lib Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
ControlKeyStates.hpp Add a ControlKeyStates wrapper class (#1718) 2019-07-16 11:09:29 -07:00
ITerminalApi.hpp Remove unneeded VT-specific control character handling (#4289) 2020-01-29 19:18:46 +00:00
ITerminalInput.hpp Fixes #3518 (#3521) 2019-11-13 02:12:43 +00:00
packages.config Update a number of our dependencies (#2301) 2019-08-07 16:43:49 -07:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
Terminal.cpp Move rect expansion to textbuffer; refactor selection code (#4560) 2020-02-27 16:42:26 -08:00
Terminal.hpp Move rect expansion to textbuffer; refactor selection code (#4560) 2020-02-27 16:42:26 -08:00
TerminalApi.cpp Remove unneeded VT-specific control character handling (#4289) 2020-01-29 19:18:46 +00:00
terminalcore-common.vcxitems Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
TerminalDispatch.cpp Remove unneeded VT-specific control character handling (#4289) 2020-01-29 19:18:46 +00:00
TerminalDispatch.hpp Dispatch more C0 control characters from the VT state machine (#4171) 2020-01-16 17:43:21 -08:00
TerminalDispatchGraphics.cpp Apply audit mode to TerminalConnection/Core/Settings and WinCon… (#4016) 2020-01-03 10:44:27 -08:00
terminalrenderdata.cpp Move rect expansion to textbuffer; refactor selection code (#4560) 2020-02-27 16:42:26 -08:00
TerminalSelection.cpp Abstract GetTextForClipboard() for UIA (#4578) 2020-03-09 08:17:34 -07:00