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

Unified Diff: fpdfsdk/src/pdfwindow/PWL_Edit.cpp

Issue 1566583002: Merge to XFA: Remove header files that only have includes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix XFA Created 4 years, 11 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 | « fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/pdfwindow/PWL_Edit.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 6d32b7270f1e95794abe0757ee128f624cd75c77..8ddb7dfb6ed796ba4025c69a7150192cc739dc2c 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -4,18 +4,17 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "fpdfsdk/include/pdfwindow/PWL_Edit.h"
+
#include "core/include/fxcrt/fx_safe_types.h"
#include "core/include/fxcrt/fx_xml.h"
-#include "fpdfsdk/include/pdfwindow/PDFWindow.h"
#include "fpdfsdk/include/pdfwindow/PWL_Caret.h"
-#include "fpdfsdk/include/pdfwindow/PWL_Edit.h"
#include "fpdfsdk/include/pdfwindow/PWL_EditCtrl.h"
#include "fpdfsdk/include/pdfwindow/PWL_FontMap.h"
#include "fpdfsdk/include/pdfwindow/PWL_ScrollBar.h"
#include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
-
-/* ---------------------------- CPWL_Edit ------------------------------ */
+#include "public/fpdf_fwlevent.h"
CPWL_Edit::CPWL_Edit()
: m_pFillerNotify(NULL), m_pSpellCheck(NULL), m_bFocus(FALSE) {
@@ -101,12 +100,12 @@ CPDF_Rect CPWL_Edit::GetClientRect() const {
}
void CPWL_Edit::SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat,
- FX_BOOL bPaint /* = TRUE*/) {
+ FX_BOOL bPaint) {
m_pEdit->SetAlignmentH((int32_t)nFormat, bPaint);
}
void CPWL_Edit::SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat,
- FX_BOOL bPaint /* = TRUE*/) {
+ FX_BOOL bPaint) {
m_pEdit->SetAlignmentV((int32_t)nFormat, bPaint);
}
@@ -1126,43 +1125,39 @@ CPVT_WordRange CPWL_Edit::GetSameWordsRange(const CPVT_WordPlace& place,
if (bLatin) {
while (pIterator->NextWord()) {
- if (pIterator->GetWord(wordinfo) &&
- FX_EDIT_ISLATINWORD(wordinfo.Word)) {
- wpEnd = pIterator->GetAt();
- continue;
- } else
+ if (!pIterator->GetWord(wordinfo) ||
+ !FX_EDIT_ISLATINWORD(wordinfo.Word)) {
break;
- };
+ }
+
+ wpEnd = pIterator->GetAt();
+ }
} else if (bArabic) {
while (pIterator->NextWord()) {
- if (pIterator->GetWord(wordinfo) && PWL_ISARABICWORD(wordinfo.Word)) {
- wpEnd = pIterator->GetAt();
- continue;
- } else
+ if (!pIterator->GetWord(wordinfo) || !PWL_ISARABICWORD(wordinfo.Word))
break;
- };
+
+ wpEnd = pIterator->GetAt();
+ }
}
pIterator->SetAt(place);
if (bLatin) {
do {
- if (pIterator->GetWord(wordinfo) &&
- FX_EDIT_ISLATINWORD(wordinfo.Word)) {
- continue;
- } else {
- wpStart = pIterator->GetAt();
+ if (!pIterator->GetWord(wordinfo) ||
+ !FX_EDIT_ISLATINWORD(wordinfo.Word)) {
break;
}
+
+ wpStart = pIterator->GetAt();
} while (pIterator->PrevWord());
} else if (bArabic) {
do {
- if (pIterator->GetWord(wordinfo) && PWL_ISARABICWORD(wordinfo.Word)) {
- continue;
- } else {
- wpStart = pIterator->GetAt();
+ if (!pIterator->GetWord(wordinfo) || !PWL_ISARABICWORD(wordinfo.Word))
break;
- }
+
+ wpStart = pIterator->GetAt();
} while (pIterator->PrevWord());
}
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698