summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-25 16:35:42 -0800
committerLei Zhang <thestig@chromium.org>2016-01-25 16:35:42 -0800
commit05e67415684adc36af228ca2f1e0efc30a40d242 (patch)
treef1b18021923a3e79aecf5fac7144df3552b06db0
parent52bb44383a705b600e0d028bff5ade17856f5a60 (diff)
downloadpdfium-chromium/2634.tar.xz
And a few other nits. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1635853002 .
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp8
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp8
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtengine.cpp6
-rw-r--r--xfa/src/fee/src/fee/fde_txtedtpage.cpp4
-rw-r--r--xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp3
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp2
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp1
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp2
9 files changed, 14 insertions, 22 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index 08d33a2e37..2f204fe27d 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -240,10 +240,8 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView,
FX_DWORD nFlag) {
ASSERT(pAnnot);
- if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
+ if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
pAnnotHandler->OnMouseEnter(pPageView, pAnnot, nFlag);
- }
- return;
}
void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView,
@@ -251,10 +249,8 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView,
FX_DWORD nFlag) {
ASSERT(pAnnot);
- if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
+ if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
pAnnotHandler->OnMouseExit(pPageView, pAnnot, nFlag);
- }
- return;
}
FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot,
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 30e702241e..0d65e06b38 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -978,15 +978,11 @@ UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() {
}
CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
- if (m_pPageView)
- return m_pPageView->GetPDFPage();
- return NULL;
+ return m_pPageView ? m_pPageView->GetPDFPage() : nullptr;
}
#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
- if (m_pPageView)
- return m_pPageView->GetPDFXFAPage();
- return NULL;
+ return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr;
}
#endif // PDF_ENABLE_XFA
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.cpp b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
index 7d87f2c0e9..72965bd20c 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
@@ -210,9 +210,9 @@ void CFDE_TxtEdtEngine::GetText(CFX_WideString& wsText,
#else
m_pTxtBuf->GetRange(wsText, nStart, nCount);
RecoverParagEnd(wsText);
- return;
#endif
}
+
void CFDE_TxtEdtEngine::ClearText() {
DeleteRange(0, -1);
}
@@ -934,8 +934,8 @@ void CFDE_TxtEdtEngine::RemoveSelRange(int32_t nStart, int32_t nCount) {
return;
}
}
- return;
}
+
void CFDE_TxtEdtEngine::AddSelRange(int32_t nStart, int32_t nCount) {
if (nCount == -1) {
nCount = GetTextLength() - nStart;
@@ -1003,8 +1003,8 @@ void CFDE_TxtEdtEngine::AddSelRange(int32_t nStart, int32_t nCount) {
}
}
m_Param.pEventSink->On_SelChanged(this);
- return;
}
+
int32_t CFDE_TxtEdtEngine::CountSelRanges() {
return m_SelRangePtrArr.GetSize();
}
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.cpp b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
index fbeccbeba0..e561a1f9cf 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
@@ -351,8 +351,8 @@ void CFDE_TxtEdtPage::CalcRangeRectArray(int32_t nStart,
RectFArr.Add(piece->rtPiece);
}
}
- return;
}
+
int32_t CFDE_TxtEdtPage::SelectWord(const CFX_PointF& fPoint, int32_t& nCount) {
if (m_nRefCount < 0) {
return -1;
@@ -582,8 +582,8 @@ void CFDE_TxtEdtPage::UnloadPage(FX_LPCRECTF pClipBox) {
m_pBgnParag = NULL;
m_pEndParag = NULL;
}
- return;
}
+
const CFX_RectF& CFDE_TxtEdtPage::GetContentsBox() {
return m_rtPageContents;
}
diff --git a/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp b/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp
index 3e038299a8..044961ab9c 100644
--- a/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp
@@ -974,9 +974,10 @@ FWL_ERR CFWL_MonthCalendarImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
return m_pOwner->DrawWidget(pGraphics, pMatrix);
}
+
void CFWL_MonthCalendarImpDelegate::OnActivate(CFWL_Message* pMsg) {
- return;
}
+
void CFWL_MonthCalendarImpDelegate::OnFocusChanged(CFWL_Message* pMsg,
FX_BOOL bSet) {
if (bSet) {
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
index bf2aa0ccbe..fc4688e34a 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
@@ -2472,8 +2472,8 @@ void CXFA_FM2JSContext::Num2AllTime(FXJSE_HOBJECT hThis,
if (!iRet) {
strTime = "";
}
- return;
}
+
void CXFA_FM2JSContext::GetLocalTimeZone(int32_t& iHour,
int32_t& iMin,
int32_t& iSec) {
diff --git a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
index ab3ceacf84..9ce6dd318b 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp
@@ -167,8 +167,8 @@ void CXFA_FMIdentifierExpressionn::ToJavaScript(CFX_WideTextBuf& javascript) {
tempStr = EXCLAMATION_IN_IDENTIFIER + tempStr.Mid(1);
}
javascript << tempStr;
- return;
}
+
CXFA_FMUnaryExpression::CXFA_FMUnaryExpression(FX_DWORD line,
XFA_FM_TOKEN op,
CXFA_FMSimpleExpression* pExp)
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
index 3b991065ad..08596cb090 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
@@ -360,7 +360,6 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
void CXFA_ItemLayoutProcessor::SplitLayoutItem(FX_FLOAT fSplitPos) {
ASSERT(m_pLayoutItem);
SplitLayoutItem(m_pLayoutItem, NULL, fSplitPos);
- return;
}
IXFA_LayoutPage* CXFA_LayoutItem::GetPage() const {
diff --git a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
index 9645a9d2c2..962844ea1e 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp
@@ -715,8 +715,8 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(
}
FXJSE_Value_Release(pRetValue);
}
- return;
}
+
void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition(
CXFA_ResolveNodesData& rnd,
CFX_WideString wsCondition) {