diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-11 14:00:52 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-11 14:00:52 -0700 |
commit | cf2e4c3ecc2a66f0a01e6a1d8c20dcb73e4b8024 (patch) | |
tree | dbe0f7d7435d7abb7a939b8ce0e0745e198ee8b1 /fpdfsdk/src/fpdf_transformpage.cpp | |
parent | 864773a57a54763b97bef7d38f65375b15c14437 (diff) | |
download | pdfium-cf2e4c3ecc2a66f0a01e6a1d8c20dcb73e4b8024.tar.xz |
Remove trailing whitespaces in fpdfsdk.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1173343004.
Diffstat (limited to 'fpdfsdk/src/fpdf_transformpage.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_transformpage.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp index cb300e8bd0..dca0c23a56 100644 --- a/fpdfsdk/src/fpdf_transformpage.cpp +++ b/fpdfsdk/src/fpdf_transformpage.cpp @@ -1,7 +1,7 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../public/fpdf_transformpage.h" @@ -91,7 +91,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX CFX_ByteString bsMatix; bsMatix.Format("%f %f %f %f %f %f cm ", matrix->a, matrix->b,matrix->c,matrix->d,matrix->e,matrix->f); textBuf<<bsMatix; - + CPDF_Page* pPage = (CPDF_Page*)page; CPDF_Dictionary* pPageDic = pPage->m_pFormDict; @@ -100,7 +100,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX pContentObj = pPageDic ? pPageDic->GetArray("Contents") : NULL; if(!pContentObj) return FALSE; - + CPDF_Dictionary* pDic = new CPDF_Dictionary; CPDF_Stream* pStream = new CPDF_Stream(NULL,0, pDic); pStream->SetData(textBuf.GetBuffer(), textBuf.GetSize(), FALSE, FALSE); @@ -113,7 +113,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX CPDF_Stream* pEndStream = new CPDF_Stream(NULL,0, pDic); pEndStream->SetData((const uint8_t*)" Q", 2, FALSE, FALSE); pDoc->AddIndirectObject(pEndStream); - + CPDF_Array* pContentArray = NULL; if (pContentObj && pContentObj->GetType() == PDFOBJ_ARRAY) { @@ -121,7 +121,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX CPDF_Reference* pRef = new CPDF_Reference(pDoc, pStream->GetObjNum()); pContentArray->InsertAt(0, pRef); pContentArray->AddReference(pDoc,pEndStream); - + } else if(pContentObj && pContentObj->GetType() == PDFOBJ_REFERENCE) { @@ -172,7 +172,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX } else continue; - + CFX_AffineMatrix m = pDict->GetMatrix(FX_BSTRC("Matrix")); CFX_AffineMatrix t = *(CFX_AffineMatrix*)matrix; m.Concat(t); @@ -190,7 +190,7 @@ DLLEXPORT void STDCALL FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object if(pPageObj == NULL) return; CFX_AffineMatrix matrix((FX_FLOAT)a,(FX_FLOAT)b,(FX_FLOAT)c,(FX_FLOAT)d,(FX_FLOAT)e,(FX_FLOAT)f); - + //Special treatment to shading object, because the ClipPath for shading object is already transformed. if(pPageObj->m_Type != PDFPAGE_SHADING) pPageObj->TransformClipPath(matrix); @@ -219,16 +219,16 @@ void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) { const CFX_PathData* pPathData = path; if (pPathData == NULL) return; - + FX_PATHPOINT* pPoints = pPathData->GetPoints(); - + if (path.IsRect()) { - buf << (pPoints[0].m_PointX) << " " << (pPoints[0].m_PointY) << " " - << (pPoints[2].m_PointX - pPoints[0].m_PointX) << " " + buf << (pPoints[0].m_PointX) << " " << (pPoints[0].m_PointY) << " " + << (pPoints[2].m_PointX - pPoints[0].m_PointX) << " " << (pPoints[2].m_PointY - pPoints[0].m_PointY) << " re\n"; return; } - + CFX_ByteString temp; for (int i = 0; i < pPathData->GetPointCount(); i ++) { buf << (pPoints[i].m_PointX) << " " << (pPoints[i].m_PointY); @@ -236,7 +236,7 @@ void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) if (point_type == FXPT_MOVETO) buf << " m\n"; else if (point_type == FXPT_BEZIERTO) { - buf << " " << (pPoints[i+1].m_PointX) << " " << (pPoints[i+1].m_PointY) << " " << + buf << " " << (pPoints[i+1].m_PointX) << " " << (pPoints[i+1].m_PointY) << " " << (pPoints[i+2].m_PointX) << " " << (pPoints[i+2].m_PointY); if (pPoints[i+2].m_Flag & FXPT_CLOSEFIGURE) buf << " c h\n"; @@ -288,7 +288,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,FPDF_CLIPPATH clip if(!pDoc) return; pDoc->AddIndirectObject(pStream); - + CPDF_Array* pContentArray = NULL; if (pContentObj && pContentObj->GetType() == PDFOBJ_ARRAY) { |