OLD | NEW |
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/fpdfapi/fpdf_pageobj.h" | 7 #include "../../include/fpdfapi/fpdf_pageobj.h" |
8 #include "../../include/fpdftext/fpdf_text.h" | 8 #include "../../include/fpdftext/fpdf_text.h" |
9 #include "../../include/fpdfapi/fpdf_page.h" | 9 #include "../../include/fpdfapi/fpdf_page.h" |
10 class CPDF_TextStream : public CFX_Object | 10 class CPDF_TextStream |
11 { | 11 { |
12 public: | 12 public: |
13 CPDF_TextStream(CFX_WideTextBuf& buffer, FX_BOOL bUseLF, CFX_PtrArray* pObjA
rray); | 13 CPDF_TextStream(CFX_WideTextBuf& buffer, FX_BOOL bUseLF, CFX_PtrArray* pObjA
rray); |
14 ~CPDF_TextStream() {} | 14 ~CPDF_TextStream() {} |
15 FX_BOOL ProcessObject(const CPDF_TextObject* pObj, FX_BOOL bFirstLine); | 15 FX_BOOL ProcessObject(const CPDF_TextObject* pObj, FX_BOOL bFirstLine); |
16 CFX_WideTextBuf& m_Buffer; | 16 CFX_WideTextBuf& m_Buffer; |
17 FX_BOOL m_bUseLF; | 17 FX_BOOL m_bUseLF; |
18 CFX_PtrArray* m_pObjArray; | 18 CFX_PtrArray* m_pObjArray; |
19 const CPDF_TextObject* m_pLastObj; | 19 const CPDF_TextObject* m_pLastObj; |
20 }; | 20 }; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 CPDF_PageObject* pObject = page.GetNextObject(pos); | 312 CPDF_PageObject* pObject = page.GetNextObject(pos); |
313 if (pObject->m_Type != PDFPAGE_TEXT) { | 313 if (pObject->m_Type != PDFPAGE_TEXT) { |
314 continue; | 314 continue; |
315 } | 315 } |
316 if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) { | 316 if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) { |
317 break; | 317 break; |
318 } | 318 } |
319 } | 319 } |
320 return buffer.GetWideString(); | 320 return buffer.GetWideString(); |
321 } | 321 } |
OLD | NEW |