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

Side by Side Diff: xfa/fxfa/parser/xfa_basic_imp.cpp

Issue 2071683002: Make code compile with clang_use_chrome_plugin (part V) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: clean up Created 4 years, 6 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 | « xfa/fxfa/parser/xfa_basic_imp.h ('k') | xfa/fxfa/parser/xfa_doclayout.h » ('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 "xfa/fxfa/parser/xfa_basic_imp.h" 7 #include "xfa/fxfa/parser/xfa_basic_imp.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fgas/crt/fgas_codepage.h" 10 #include "xfa/fgas/crt/fgas_codepage.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 m_iPosition = m_wsBuffer.GetLength(); 546 m_iPosition = m_wsBuffer.GetLength();
547 } 547 }
548 return GetPosition(); 548 return GetPosition();
549 } 549 }
550 int32_t CXFA_WideTextRead::GetPosition() { 550 int32_t CXFA_WideTextRead::GetPosition() {
551 return m_iPosition * sizeof(FX_WCHAR); 551 return m_iPosition * sizeof(FX_WCHAR);
552 } 552 }
553 FX_BOOL CXFA_WideTextRead::IsEOF() const { 553 FX_BOOL CXFA_WideTextRead::IsEOF() const {
554 return m_iPosition >= m_wsBuffer.GetLength(); 554 return m_iPosition >= m_wsBuffer.GetLength();
555 } 555 }
556 int32_t CXFA_WideTextRead::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
557 return 0;
558 }
556 int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr, 559 int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr,
557 int32_t iMaxLength, 560 int32_t iMaxLength,
558 FX_BOOL& bEOS, 561 FX_BOOL& bEOS,
559 int32_t const* pByteSize) { 562 int32_t const* pByteSize) {
560 iMaxLength = std::min(iMaxLength, m_wsBuffer.GetLength() - m_iPosition); 563 iMaxLength = std::min(iMaxLength, m_wsBuffer.GetLength() - m_iPosition);
561 if (iMaxLength == 0) 564 if (iMaxLength == 0)
562 return 0; 565 return 0;
563 566
564 FXSYS_wcsncpy(pStr, m_wsBuffer.c_str() + m_iPosition, iMaxLength); 567 FXSYS_wcsncpy(pStr, m_wsBuffer.c_str() + m_iPosition, iMaxLength);
565 m_iPosition += iMaxLength; 568 m_iPosition += iMaxLength;
566 bEOS = IsEOF(); 569 bEOS = IsEOF();
567 return iMaxLength; 570 return iMaxLength;
568 } 571 }
572 int32_t CXFA_WideTextRead::WriteData(const uint8_t* pBuffer,
573 int32_t iBufferSize) {
574 return 0;
575 }
576 int32_t CXFA_WideTextRead::WriteString(const FX_WCHAR* pStr, int32_t iLength) {
577 return 0;
578 }
579 FX_BOOL CXFA_WideTextRead::SetLength(int32_t iLength) {
580 return FALSE;
581 }
582 int32_t CXFA_WideTextRead::GetBOM(uint8_t bom[4]) const {
583 return 0;
584 }
569 uint16_t CXFA_WideTextRead::GetCodePage() const { 585 uint16_t CXFA_WideTextRead::GetCodePage() const {
570 return (sizeof(FX_WCHAR) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE; 586 return (sizeof(FX_WCHAR) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE;
571 } 587 }
572 uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) { 588 uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) {
573 return GetCodePage(); 589 return GetCodePage();
574 } 590 }
591
592 IFX_Stream* CXFA_WideTextRead::CreateSharedStream(uint32_t dwAccess,
593 int32_t iOffset,
594 int32_t iLength) {
595 return NULL;
596 }
597
598 void CXFA_WideTextRead::Lock() {}
599
600 void CXFA_WideTextRead::Unlock() {}
601
602 CFX_WideString CXFA_WideTextRead::GetSrcText() const {
603 return m_wsBuffer;
604 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_basic_imp.h ('k') | xfa/fxfa/parser/xfa_doclayout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698