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

Side by Side Diff: fpdfsdk/src/fxedit/fxet_ap.cpp

Issue 1254703002: FX_BOOL considered harmful, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_rendercontext.cpp ('k') | fpdfsdk/src/fxedit/fxet_edit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/fxedit/fxet_stub.h" 7 #include "../../include/fxedit/fxet_stub.h"
8 #include "../../include/fxedit/fx_edit.h" 8 #include "../../include/fxedit/fx_edit.h"
9 #include "../../include/fxedit/fxet_edit.h" 9 #include "../../include/fxedit/fxet_edit.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex ); 59 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex );
60 60
61 if (sFontAlias.GetLength() > 0 && fFontSize > 0 ) 61 if (sFontAlias.GetLength() > 0 && fFontSize > 0 )
62 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n" ; 62 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n" ;
63 } 63 }
64 64
65 return sRet.GetByteString(); 65 return sRet.GetByteString();
66 } 66 }
67 67
68 CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi nt & ptOffset, 68 CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi nt & ptOffset,
69 » » » » » » » » » » » » const CPVT_WordRange * pRange /* = NULL*/, FX_BOOL bContinuous/ * = TRUE*/, FX_WORD SubWord/* = 0*/) 69 » » » » » » » » » » » » const CPVT_WordRange * pRange /* = NULL*/, bool bContinuous/* = true*/, FX_WORD SubWord/* = 0*/)
70 { 70 {
71 CFX_ByteTextBuf sEditStream, sWords; 71 CFX_ByteTextBuf sEditStream, sWords;
72 72
73 CPDF_Point ptOld(0.0f,0.0f),ptNew(0.0f,0.0f); 73 CPDF_Point ptOld(0.0f,0.0f),ptNew(0.0f,0.0f);
74 int32_t nCurFontIndex = -1; 74 int32_t nCurFontIndex = -1;
75 75
76 if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) 76 if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator())
77 { 77 {
78 if (pRange) 78 if (pRange)
79 pIterator->SetAt(pRange->BeginPos); 79 pIterator->SetAt(pRange->BeginPos);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 sRet << word.ptWord.x + ptOffset.x << " " << line.ptLine.y + line.fLineDescent 216 sRet << word.ptWord.x + ptOffset.x << " " << line.ptLine.y + line.fLineDescent
217 << " " << word.fWidth << " " << line.fLineAscent - line.fLineDescent << " re\nf\n"; 217 << " " << word.fWidth << " " << line.fLineAscent - line.fLineDescent << " re\nf\n";
218 } 218 }
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 return sRet.GetByteString(); 223 return sRet.GetByteString();
224 } 224 }
225 225
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_rendercontext.cpp ('k') | fpdfsdk/src/fxedit/fxet_edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698