summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_Note.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:27:25 -0800
commit96660d6f382204339d6b1aadc3913303d436e252 (patch)
treeb5f84756e1a89251831cebc05b9d4e1f6cb2027b /fpdfsdk/src/pdfwindow/PWL_Note.cpp
parentd983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff)
downloadpdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Note.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp38
1 files changed, 1 insertions, 37 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index f15004dcd6..d87c3df916 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -47,8 +47,6 @@ void CPWL_Note_Options::SetTextColor(const CPWL_Color& color) {
void CPWL_Note_Options::RePosChildWnd() {
if (IsValid()) {
- ASSERT(m_pText != NULL);
-
CPDF_Rect rcClient = GetClientRect();
if (rcClient.Width() > 15.0f) {
@@ -103,8 +101,6 @@ void CPWL_Note_Options::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
CPDF_Rect CPWL_Note_Options::GetContentRect() const {
- ASSERT(m_pText != NULL);
-
CPDF_Rect rcText = m_pText->GetContentRect();
rcText.right += 15.0f;
return rcText;
@@ -661,10 +657,6 @@ void CPWL_NoteItem::CreateChildWnd(const PWL_CREATEPARAM& cp) {
void CPWL_NoteItem::RePosChildWnd() {
if (IsValid()) {
- ASSERT(m_pSubject != NULL);
- ASSERT(m_pDateTime != NULL);
- ASSERT(m_pContents != NULL);
-
CPDF_Rect rcClient = GetClientRect();
CPDF_Rect rcSubject = rcClient;
@@ -759,8 +751,6 @@ void CPWL_NoteItem::ResetSubjectName(int32_t nItemIndex) {
}
const CPWL_Note* pNote = GetNote();
- ASSERT(pNote != NULL);
-
CFX_WideString sSubject;
sSubject.Format(pNote->GetReplyString().c_str(), nItemIndex);
@@ -925,10 +915,6 @@ FX_FLOAT CPWL_NoteItem::GetItemHeight(FX_FLOAT fLimitWidth) {
m_bSizeChanged = FALSE;
- ASSERT(m_pSubject != NULL);
- ASSERT(m_pDateTime != NULL);
- ASSERT(m_pContents != NULL);
-
FX_FLOAT fRet = m_pDateTime->GetContentRect().Height();
FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth();
if (fLimitWidth > fBorderWidth * 2)
@@ -1156,17 +1142,6 @@ void CPWL_Note::RePosNoteChildren() {
m_bResizing = TRUE;
if (IsValid()) {
- ASSERT(m_pSubject != NULL);
- ASSERT(m_pDateTime != NULL);
- ASSERT(m_pContents != NULL);
- ASSERT(m_pAuthor != NULL);
- ASSERT(m_pCloseBox != NULL);
- ASSERT(m_pIcon != NULL);
- ASSERT(m_pLBBox != NULL);
- ASSERT(m_pRBBox != NULL);
- ASSERT(m_pContentsBar != NULL);
- ASSERT(m_pOptions != NULL);
-
CPDF_Rect rcClient = GetClientRect();
CPDF_Rect rcIcon = rcClient;
@@ -1267,21 +1242,10 @@ void CPWL_Note::RePosNoteChildren() {
m_bResizing = FALSE;
}
+// TODO(thestig): Make this return an enum.
// 0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close /
// 5-options
int32_t CPWL_Note::NoteHitTest(const CPDF_Point& point) const {
- ASSERT(m_pSubject != NULL);
- ASSERT(m_pDateTime != NULL);
- ASSERT(m_pContents != NULL);
- ASSERT(m_pAuthor != NULL);
- ASSERT(m_pIcon != NULL);
- ASSERT(m_pContentsBar != NULL);
-
- ASSERT(m_pCloseBox != NULL);
- ASSERT(m_pLBBox != NULL);
- ASSERT(m_pRBBox != NULL);
- ASSERT(m_pOptions != NULL);
-
GetClientRect();
if (m_pSubject->WndHitTest(m_pSubject->ParentToChild(point)))