summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-10-28 17:24:07 -0400
committerDan Sinclair <dsinclair@chromium.org>2015-10-28 17:24:07 -0400
commit806af3a576ac4ce4d1979a225dcb49ae385000d3 (patch)
tree7fbb98d61c9b371f9bb48357d7cbfe22e3969713 /core/src/fpdfapi/fpdf_page
parent456b923e60071b10c5cd9a2a907f7c190d548942 (diff)
downloadpdfium-806af3a576ac4ce4d1979a225dcb49ae385000d3.tar.xz
Merge to XFA: Add PDFCharIsLineEnding helper
This CL adds a helper to check if a given character is a \n or \r. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1418073006 . (cherry picked from commit 4b38229b004b7b6493cb4c4507df450adc6085f6) Review URL: https://codereview.chromium.org/1428763002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 0e059f3fc5..1fa27e3805 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -490,7 +490,7 @@ CPDF_StreamParser::SyntaxType CPDF_StreamParser::ParseNextElement() {
return EndOfData;
ch = m_pBuf[m_Pos++];
- if (ch == '\r' || ch == '\n')
+ if (PDFCharIsLineEnding(ch))
break;
}
}
@@ -714,7 +714,7 @@ void CPDF_StreamParser::GetNextWord(FX_BOOL& bIsNumber) {
if (!PositionIsInBounds())
return;
ch = m_pBuf[m_Pos++];
- if (ch == '\r' || ch == '\n')
+ if (PDFCharIsLineEnding(ch))
break;
}
}