diff options
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()); |