summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-11 18:29:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-11 18:29:02 +0000
commit5c818b62f4b17ea18f4fc5805ba11e1936e6bc62 (patch)
tree092cd9bd0b35c9e2cb7bf2910c62f1814e225926 /xfa/fxfa/parser
parentc7f4322f1ac8ee1604ac3e24860530994575c9af (diff)
downloadpdfium-5c818b62f4b17ea18f4fc5805ba11e1936e6bc62.tar.xz
Rename CXFA_Caption methods for clarity
This CL renames the CXFA_Caption methods to make it clearer they can return nullptr. Change-Id: I1b4945fcd2615f16a128709b7fe07e1236a5461a Reviewed-on: https://pdfium-review.googlesource.com/22743 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_caption.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_caption.h6
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_caption.cpp b/xfa/fxfa/parser/cxfa_caption.cpp
index 4d4dde57e9..a54605a48c 100644
--- a/xfa/fxfa/parser/cxfa_caption.cpp
+++ b/xfa/fxfa/parser/cxfa_caption.cpp
@@ -70,14 +70,14 @@ float CXFA_Caption::GetReserve() const {
return JSObject()->GetMeasure(XFA_Attribute::Reserve).ToUnit(XFA_Unit::Pt);
}
-CXFA_Margin* CXFA_Caption::GetMargin() {
+CXFA_Margin* CXFA_Caption::GetMarginIfExists() {
return GetChild<CXFA_Margin>(0, XFA_Element::Margin, false);
}
-CXFA_Font* CXFA_Caption::GetFont() {
+CXFA_Font* CXFA_Caption::GetFontIfExists() {
return GetChild<CXFA_Font>(0, XFA_Element::Font, false);
}
-CXFA_Value* CXFA_Caption::GetValue() {
+CXFA_Value* CXFA_Caption::GetValueIfExists() {
return GetChild<CXFA_Value>(0, XFA_Element::Value, false);
}
diff --git a/xfa/fxfa/parser/cxfa_caption.h b/xfa/fxfa/parser/cxfa_caption.h
index 1b634d8f5c..c790787e9a 100644
--- a/xfa/fxfa/parser/cxfa_caption.h
+++ b/xfa/fxfa/parser/cxfa_caption.h
@@ -25,9 +25,9 @@ class CXFA_Caption : public CXFA_Node {
bool IsHidden();
XFA_AttributeEnum GetPlacementType();
float GetReserve() const;
- CXFA_Margin* GetMargin();
- CXFA_Font* GetFont();
- CXFA_Value* GetValue();
+ CXFA_Margin* GetMarginIfExists();
+ CXFA_Font* GetFontIfExists();
+ CXFA_Value* GetValueIfExists();
};
#endif // XFA_FXFA_PARSER_CXFA_CAPTION_H_
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index c7a0bb1668..e6cdf98d49 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1934,7 +1934,7 @@ WideString CXFA_Node::GetValidateCaptionName(bool bVersionFlag) {
if (!bVersionFlag) {
CXFA_Caption* caption = GetCaptionIfExists();
if (caption) {
- CXFA_Value* capValue = caption->GetValue();
+ CXFA_Value* capValue = caption->GetValueIfExists();
if (capValue) {
CXFA_Text* captionText = capValue->GetText();
if (captionText)