Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: fpdfsdk/fxedit/fxet_edit.cpp

Issue 2148353002: Remove CFX_Edit_Refresh::Analyse (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@ifx_cleanup_4
Patch Set: Rebase to master Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/fxedit/include/fxet_edit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index fb219ca16ca18604836df0755b24b75ee1e7e63d..603c459cf77303c812733fbd100a3ab519a7f9f9 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -349,73 +349,6 @@ void CFX_Edit_Refresh::NoAnalyse() {
}
}
-void CFX_Edit_Refresh::Analyse(int32_t nAlignment) {
- FX_BOOL bLineTopChanged = FALSE;
- CFX_FloatRect rcResult;
- FX_FLOAT fWidthDiff;
-
- int32_t szMax = std::max(m_OldLineRects.GetSize(), m_NewLineRects.GetSize());
- int32_t i = 0;
-
- while (i < szMax) {
- CFX_Edit_LineRect* pOldRect = m_OldLineRects.GetAt(i);
- CFX_Edit_LineRect* pNewRect = m_NewLineRects.GetAt(i);
-
- if (pOldRect) {
- if (pNewRect) {
- if (bLineTopChanged) {
- rcResult = pOldRect->m_rcLine;
- rcResult.Union(pNewRect->m_rcLine);
- m_RefreshRects.Add(rcResult);
- } else {
- if (*pNewRect != *pOldRect) {
- if (!pNewRect->IsSameTop(*pOldRect) ||
- !pNewRect->IsSameHeight(*pOldRect)) {
- bLineTopChanged = TRUE;
- continue;
- }
-
- if (nAlignment == 0) {
- if (pNewRect->m_wrLine.BeginPos != pOldRect->m_wrLine.BeginPos) {
- rcResult = pOldRect->m_rcLine;
- rcResult.Union(pNewRect->m_rcLine);
- m_RefreshRects.Add(rcResult);
- } else {
- if (!pNewRect->IsSameLeft(*pOldRect)) {
- rcResult = pOldRect->m_rcLine;
- rcResult.Union(pNewRect->m_rcLine);
- } else {
- fWidthDiff =
- pNewRect->m_rcLine.Width() - pOldRect->m_rcLine.Width();
- rcResult = pNewRect->m_rcLine;
- if (fWidthDiff > 0.0f) {
- rcResult.left = rcResult.right - fWidthDiff;
- } else {
- rcResult.left = rcResult.right;
- rcResult.right -= fWidthDiff;
- }
- }
- m_RefreshRects.Add(rcResult);
- }
- } else {
- rcResult = pOldRect->m_rcLine;
- rcResult.Union(pNewRect->m_rcLine);
- m_RefreshRects.Add(rcResult);
- }
- }
- }
- } else {
- m_RefreshRects.Add(pOldRect->m_rcLine);
- }
- } else {
- if (pNewRect) {
- m_RefreshRects.Add(pNewRect->m_rcLine);
- }
- }
- i++;
- }
-}
-
void CFX_Edit_Refresh::AddRefresh(const CFX_FloatRect& rect) {
m_RefreshRects.Add(rect);
}
« no previous file with comments | « no previous file | fpdfsdk/fxedit/include/fxet_edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698