summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fxedit')
-rw-r--r--fpdfsdk/fxedit/fxet_list.cpp9
-rw-r--r--fpdfsdk/fxedit/fxet_pageobjs.cpp7
2 files changed, 4 insertions, 12 deletions
diff --git a/fpdfsdk/fxedit/fxet_list.cpp b/fpdfsdk/fxedit/fxet_list.cpp
index 639569898e..383b84f27f 100644
--- a/fpdfsdk/fxedit/fxet_list.cpp
+++ b/fpdfsdk/fxedit/fxet_list.cpp
@@ -63,12 +63,9 @@ FX_FLOAT CFX_ListItem::GetItemHeight() const {
uint16_t CFX_ListItem::GetFirstChar() const {
CPVT_Word word;
-
- if (IFX_Edit_Iterator* pIterator = GetIterator()) {
- pIterator->SetAt(1);
- pIterator->GetWord(word);
- }
-
+ IFX_Edit_Iterator* pIterator = GetIterator();
+ pIterator->SetAt(1);
+ pIterator->GetWord(word);
return word.Word;
}
diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
index 6e7deed00d..1fe29af283 100644
--- a/fpdfsdk/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp
@@ -183,7 +183,6 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
pIterator->SetAt(0);
CPVT_WordPlace oldplace;
-
while (pIterator->NextWord()) {
CPVT_WordPlace place = pIterator->GetAt();
if (pRange && place.WordCmp(pRange->EndPos) > 0)
@@ -192,11 +191,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
if (wrSelect.IsExist()) {
bSelect = place.WordCmp(wrSelect.BeginPos) > 0 &&
place.WordCmp(wrSelect.EndPos) <= 0;
- if (bSelect) {
- crCurFill = crWhite;
- } else {
- crCurFill = crTextFill;
- }
+ crCurFill = bSelect ? crWhite : crTextFill;
}
if (pSystemHandler && pSystemHandler->IsSelectionImplemented()) {
crCurFill = crTextFill;