summaryrefslogtreecommitdiff
path: root/core/src/fpdftext
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-05-24 12:20:17 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-05-24 12:20:17 -0700
commit5dc4f24637d353d4d777c251f6d8c5746e062e7e (patch)
tree3b456ac537c2ff58afa268bd4a543a482dbdc1f1 /core/src/fpdftext
parent4201b2a5f38a6335d012aa4dc4cd19f6989d05f1 (diff)
downloadpdfium-5dc4f24637d353d4d777c251f6d8c5746e062e7e.tar.xz
Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters representation, and addjust some code indent
BUG= R=jam@chromium.org Review URL: https://codereview.chromium.org/294353002
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 0e0d52ec1a..6baf6ad339 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;