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

Side by Side Diff: fpdfsdk/src/fsdk_annothandler.cpp

Issue 1635853002: XFA: Fix a bunch of pointless returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: nits 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 unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
10 #include "fpdfsdk/include/fsdk_annothandler.h" 10 #include "fpdfsdk/include/fsdk_annothandler.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 return pAnnotHandler->OnRButtonUp(pPageView, pAnnot, nFlags, point); 233 return pAnnotHandler->OnRButtonUp(pPageView, pAnnot, nFlags, point);
234 } 234 }
235 return FALSE; 235 return FALSE;
236 } 236 }
237 237
238 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, 238 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView,
239 CPDFSDK_Annot* pAnnot, 239 CPDFSDK_Annot* pAnnot,
240 FX_DWORD nFlag) { 240 FX_DWORD nFlag) {
241 ASSERT(pAnnot); 241 ASSERT(pAnnot);
242 242
243 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 243 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
244 pAnnotHandler->OnMouseEnter(pPageView, pAnnot, nFlag); 244 pAnnotHandler->OnMouseEnter(pPageView, pAnnot, nFlag);
245 }
246 return;
247 } 245 }
248 246
249 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView, 247 void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView,
250 CPDFSDK_Annot* pAnnot, 248 CPDFSDK_Annot* pAnnot,
251 FX_DWORD nFlag) { 249 FX_DWORD nFlag) {
252 ASSERT(pAnnot); 250 ASSERT(pAnnot);
253 251
254 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 252 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
255 pAnnotHandler->OnMouseExit(pPageView, pAnnot, nFlag); 253 pAnnotHandler->OnMouseExit(pPageView, pAnnot, nFlag);
256 }
257 return;
258 } 254 }
259 255
260 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot, 256 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot,
261 FX_DWORD nChar, 257 FX_DWORD nChar,
262 FX_DWORD nFlags) { 258 FX_DWORD nFlags) {
263 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { 259 if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
264 return pAnnotHandler->OnChar(pAnnot, nChar, nFlags); 260 return pAnnotHandler->OnChar(pAnnot, nChar, nFlags);
265 } 261 }
266 return FALSE; 262 return FALSE;
267 } 263 }
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 1167
1172 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 1168 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
1173 if (m_pos < m_iteratorAnnotList.size()) 1169 if (m_pos < m_iteratorAnnotList.size())
1174 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 1170 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
1175 return nullptr; 1171 return nullptr;
1176 } 1172 }
1177 1173
1178 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 1174 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
1179 return m_bReverse ? PrevAnnot() : NextAnnot(); 1175 return m_bReverse ? PrevAnnot() : NextAnnot();
1180 } 1176 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698