From b7475313178d2f8db39e4179a202e8c920651ede Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 16 Apr 2018 17:07:27 +0000 Subject: Remove CPWL_Edit rich text support This CL removes the code which attempts to provide rich text support for CPWL_Edit. The code, as written, doesn't actually work well. If you have tags under the

tag we will just lose the content (so

foo

would end up being a blank string). Multiple

tags get concatenated together with a \n, but we subsequently lose the \n later when we store the content into the VariableText object (so

foo

bar

becomes foobar instead of foo\nbar). We never read the "RV" field from the dictionary. The RV field is what actually stores the rich text value. So, we never set a rich text value into the text edit. Change-Id: Idc1d65e1b5d75380dd28c45bcbf9137a2a4cea9a Reviewed-on: https://pdfium-review.googlesource.com/30690 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- fpdfsdk/pwl/cpwl_edit_impl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/pwl/cpwl_edit_impl.cpp') diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp index cb774e5ef9..6d9fd20445 100644 --- a/fpdfsdk/pwl/cpwl_edit_impl.cpp +++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp @@ -1808,16 +1808,16 @@ CPVT_WordPlace CPWL_EditImpl::DoInsertText(const CPVT_WordPlace& place, for (int32_t i = 0, sz = sText.GetLength(); i < sz; i++) { uint16_t word = sText[i]; switch (word) { - case 0x0D: + case '\r': wp = m_pVT->InsertSection(wp); - if (i + 1 < sz && sText[i + 1] == 0x0A) + if (i + 1 < sz && sText[i + 1] == '\n') i++; break; - case 0x0A: + case '\n': wp = m_pVT->InsertSection(wp); break; - case 0x09: - word = 0x20; + case '\t': + word = ' '; FX_FALLTHROUGH; default: wp = -- cgit v1.2.3