• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #include "core/fpdfapi/parser/cpdf_null.h"
8 
9 #include "core/fxcrt/fx_stream.h"
10 #include "third_party/base/ptr_util.h"
11 
CPDF_Null()12 CPDF_Null::CPDF_Null() {}
13 
GetType() const14 CPDF_Object::Type CPDF_Null::GetType() const {
15   return kNullobj;
16 }
17 
Clone() const18 RetainPtr<CPDF_Object> CPDF_Null::Clone() const {
19   return pdfium::MakeRetain<CPDF_Null>();
20 }
21 
WriteTo(IFX_ArchiveStream * archive,const CPDF_Encryptor * encryptor) const22 bool CPDF_Null::WriteTo(IFX_ArchiveStream* archive,
23                         const CPDF_Encryptor* encryptor) const {
24   return archive->WriteString(" null");
25 }
26 
IsNull() const27 bool CPDF_Null::IsNull() const {
28   return true;
29 }
30