diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-13 13:40:06 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-13 18:26:14 +0000 |
commit | 3628f8b06e4518c81971782455270d5db4ff91c9 (patch) | |
tree | 25b61cbb0d783ba59947341ff6d1dc80613acdb8 /fpdfsdk/pdfwindow/cpwl_edit.cpp | |
parent | 469186a47d6ac939acbd80754ed9be5c085bdc22 (diff) | |
download | pdfium-3628f8b06e4518c81971782455270d5db4ff91c9.tar.xz |
Move CPWL_Utils::OverlapWordRange to CPVT_WordRange::Intersect
This method only deals with CPVT_WordRange objects so move to the correct class.
Change-Id: If5f28178301affa8633f8ef8e89894dfb94f1ac9
Reviewed-on: https://pdfium-review.googlesource.com/7713
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_edit.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_edit.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_edit.cpp b/fpdfsdk/pdfwindow/cpwl_edit.cpp index 2f9c5fbea5..8a788dd184 100644 --- a/fpdfsdk/pdfwindow/cpwl_edit.cpp +++ b/fpdfsdk/pdfwindow/cpwl_edit.cpp @@ -270,8 +270,7 @@ void CPWL_Edit::GetThisAppearanceStream(std::ostringstream* psAppStream) { CPVT_WordRange wrSelBefore(wrWhole.BeginPos, wrSelect.BeginPos); CPVT_WordRange wrSelAfter(wrSelect.EndPos, wrWhole.EndPos); - CPVT_WordRange wrTemp = - CPWL_Utils::OverlapWordRange(GetSelectWordRange(), wrVisible); + CPVT_WordRange wrTemp = GetSelectWordRange().Intersect(wrVisible); CFX_ByteString sEditSel = CPWL_Utils::GetEditSelAppStream(m_pEdit.get(), ptOffset, &wrTemp); @@ -279,7 +278,7 @@ void CPWL_Edit::GetThisAppearanceStream(std::ostringstream* psAppStream) { sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR) << sEditSel; - wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelBefore); + wrTemp = wrVisible.Intersect(wrSelBefore); CFX_ByteString sEditBefore = CPWL_Utils::GetEditAppStream( m_pEdit.get(), ptOffset, &wrTemp, !HasFlag(PES_CHARARRAY), m_pEdit->GetPasswordChar()); @@ -289,7 +288,7 @@ void CPWL_Edit::GetThisAppearanceStream(std::ostringstream* psAppStream) { << CPWL_Utils::GetColorAppStream(GetTextColor()) << sEditBefore << "ET\n"; - wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelect); + wrTemp = wrVisible.Intersect(wrSelect); CFX_ByteString sEditMid = CPWL_Utils::GetEditAppStream( m_pEdit.get(), ptOffset, &wrTemp, !HasFlag(PES_CHARARRAY), m_pEdit->GetPasswordChar()); @@ -299,7 +298,7 @@ void CPWL_Edit::GetThisAppearanceStream(std::ostringstream* psAppStream) { << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_GRAY, 1)) << sEditMid << "ET\n"; - wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelAfter); + wrTemp = wrVisible.Intersect(wrSelAfter); CFX_ByteString sEditAfter = CPWL_Utils::GetEditAppStream( m_pEdit.get(), ptOffset, &wrTemp, !HasFlag(PES_CHARARRAY), m_pEdit->GetPasswordChar()); |