• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
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 
11 CPDF_Null::CPDF_Null() = default;
12 
GetType() const13 CPDF_Object::Type CPDF_Null::GetType() const {
14   return kNullobj;
15 }
16 
Clone() const17 RetainPtr<CPDF_Object> CPDF_Null::Clone() const {
18   return pdfium::MakeRetain<CPDF_Null>();
19 }
20 
AsMutableNull()21 CPDF_Null* CPDF_Null::AsMutableNull() {
22   return this;
23 }
24 
WriteTo(IFX_ArchiveStream * archive,const CPDF_Encryptor * encryptor) const25 bool CPDF_Null::WriteTo(IFX_ArchiveStream* archive,
26                         const CPDF_Encryptor* encryptor) const {
27   return archive->WriteString(" null");
28 }
29