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

Unified Diff: core/src/fpdftext/fpdf_text_int.cpp

Issue 294353002: Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters represe… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Patch Set after rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_render/render_int.h ('k') | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/fpdf_text_int.cpp
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 0e0d52ec1a542315d979eaadce9d899b0b466b6f..6baf6ad339824ca2b8fe84cea61efd079f3b4580 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -939,12 +939,12 @@ FX_INT32 CPDF_TextPage::FindTextlineFlowDirection()
if (!nHorizontalMask.SetSize(nPageWidth)) {
return -1;
}
- FX_BYTE* pDataH = nHorizontalMask.GetData();
+ FX_BYTE* pDataH = nHorizontalMask.GetData();
CFX_ByteArray nVerticalMask;
if (!nVerticalMask.SetSize(nPageHeight)) {
return -1;
}
- FX_BYTE* pDataV = nVerticalMask.GetData();
+ FX_BYTE* pDataV = nVerticalMask.GetData();
FX_INT32 index = 0;
FX_FLOAT fLineHeight = 0.0f;
CPDF_PageObject* pPageObj = NULL;
@@ -961,22 +961,19 @@ FX_INT32 CPDF_TextPage::FindTextlineFlowDirection()
if(PDFPAGE_TEXT != pPageObj->m_Type) {
continue;
}
- FX_INT32 minH = (FX_INT32)pPageObj->m_Left < 0 ? 0 : (FX_INT32)pPageObj->m_Left;
- FX_INT32 maxH = (FX_INT32)pPageObj->m_Right > nPageWidth ? nPageWidth : (FX_INT32)pPageObj->m_Right;
- FX_INT32 minV = (FX_INT32)pPageObj->m_Bottom < 0 ? 0 : (FX_INT32)pPageObj->m_Bottom;
- FX_INT32 maxV = (FX_INT32)pPageObj->m_Top > nPageHeight ? nPageHeight : (FX_INT32)pPageObj->m_Top;
- if (minH >= maxH || minV >= maxV){
- continue;
- }
-
- FXSYS_memset8(pDataH + minH, 1, maxH - minH);
- FXSYS_memset8(pDataV + minV, 1, maxV - minV);
-
- if (fLineHeight <= 0.0f) {
- fLineHeight = pPageObj->m_Top - pPageObj->m_Bottom;
- }
-
- pPageObj = NULL;
+ FX_INT32 minH = (FX_INT32)pPageObj->m_Left < 0 ? 0 : (FX_INT32)pPageObj->m_Left;
+ FX_INT32 maxH = (FX_INT32)pPageObj->m_Right > nPageWidth ? nPageWidth : (FX_INT32)pPageObj->m_Right;
+ FX_INT32 minV = (FX_INT32)pPageObj->m_Bottom < 0 ? 0 : (FX_INT32)pPageObj->m_Bottom;
+ FX_INT32 maxV = (FX_INT32)pPageObj->m_Top > nPageHeight ? nPageHeight : (FX_INT32)pPageObj->m_Top;
+ if (minH >= maxH || minV >= maxV) {
+ continue;
+ }
+ FXSYS_memset8(pDataH + minH, 1, maxH - minH);
+ FXSYS_memset8(pDataV + minV, 1, maxV - minV);
+ if (fLineHeight <= 0.0f) {
+ fLineHeight = pPageObj->m_Top - pPageObj->m_Bottom;
+ }
+ pPageObj = NULL;
}
FX_INT32 nStartH = 0;
FX_INT32 nEndH = 0;
« no previous file with comments | « core/src/fpdfapi/fpdf_render/render_int.h ('k') | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698