diff options
author | Lei Zhang <thestig@chromium.org> | 2016-01-05 16:46:58 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-01-05 16:46:58 -0800 |
commit | c2fb35f2bbcf6c8fcf37380000544ae39d9a8cec (patch) | |
tree | 6b8da05d1624cbbe5a0c7042c9820f02180f442c /fpdfsdk/src/fxedit/fxet_pageobjs.cpp | |
parent | 62664cee15230d6cbe08ed010721a4557b36dc22 (diff) | |
download | pdfium-c2fb35f2bbcf6c8fcf37380000544ae39d9a8cec.tar.xz |
Merge to XFA: Remove header files that only have includes.
Also do some cleanups in affected files.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1552583002 .
(cherry picked from commit d794d34b5deb6ad691c19af758090f9ce46015a3)
Review URL: https://codereview.chromium.org/1566583002 .
Diffstat (limited to 'fpdfsdk/src/fxedit/fxet_pageobjs.cpp')
-rw-r--r-- | fpdfsdk/src/fxedit/fxet_pageobjs.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp index fefa42bdfd..18687679c2 100644 --- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp +++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp @@ -4,9 +4,11 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/fpdf_pageobj.h" +#include "core/include/fpdfapi/fpdf_render.h" +#include "fpdfsdk/include/fx_systemhandler.h" #include "fpdfsdk/include/fxedit/fx_edit.h" #include "fpdfsdk/include/fxedit/fxet_edit.h" -#include "fpdfsdk/include/fxedit/fxet_stub.h" #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f @@ -57,9 +59,10 @@ static void DrawTextString(CFX_RenderDevice* pDevice, CPDF_TextRenderer::DrawTextString(pDevice, x, y, pFont, fFontSize, &mt, str, crTextFill, crTextStroke, &gsd, &ro); - } else + } else { CPDF_TextRenderer::DrawTextString(pDevice, x, y, pFont, fFontSize, &mt, str, crTextFill, 0, NULL, &ro); + } } else { CPDF_RenderOptions ro; ro.m_Flags = RENDER_CLEARTYPE; @@ -76,10 +79,11 @@ static void DrawTextString(CFX_RenderDevice* pDevice, CPDF_TextRenderer::DrawTextString(pDevice, x, y, pFont, fFontSize, pUser2Device, str, crTextFill, crTextStroke, &gsd, &ro); - } else + } else { CPDF_TextRenderer::DrawTextString(pDevice, x, y, pFont, fFontSize, pUser2Device, str, crTextFill, 0, NULL, &ro); + } } } } @@ -218,8 +222,6 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, word.ptWord.x + word.fWidth, line.ptLine.y + line.fLineAscent); rc.Intersect(rcClip); - // CFX_Edit* pEt = (CFX_Edit*)pEdit; - // CPDF_Rect rcEdit = pEt->VTToEdit(rc); pSystemHandler->OutputSelectedRect(pFFLData, rc); } else { CFX_PathData pathSelBK; @@ -282,7 +284,6 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange) { - // FX_FLOAT fFontSize = pEdit->GetFontSize(); CPVT_WordRange wrSelect = pEdit->GetSelectWordRange(); FX_COLORREF crCurText = ArgbEncode(255, 0, 0, 0); @@ -588,17 +589,7 @@ void IFX_Edit::GenerateRichPageObjects( sTextBuf << GetPDFWordString(pFontMap, word.WordProps.nFontIndex, word.Word, 0); - if (word.WordProps.nWordStyle & - PVTWORD_STYLE_UNDERLINE) { /* - AddLineToPageObjects(pPageObjects, - crCurText, - CPDF_Point(word.ptWord.x, - word.ptWord.y + word.fDescent * - 0.4f), - CPDF_Point(word.ptWord.x - + word.fWidth, word.ptWord.y + - word.fDescent * 0.4f)); -*/ + if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) { CPDF_Rect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; |