Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cpdf_boolean.cpp
Go to the documentation of this file.
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_boolean.h"
8
9
#
include
"core/fxcrt/fx_stream.h"
10
11
CPDF_Boolean::CPDF_Boolean() =
default
;
12
13
CPDF_Boolean::CPDF_Boolean(
bool
value) : m_bValue(value) {}
14
15
CPDF_Boolean::~
CPDF_Boolean
() =
default
;
16
17
CPDF_Object
::
Type
CPDF_Boolean::
GetType
()
const
{
18
return
kBoolean
;
19
}
20
21
RetainPtr
<
CPDF_Object
> CPDF_Boolean::
Clone
()
const
{
22
return
pdfium
::MakeRetain<CPDF_Boolean>(m_bValue);
23
}
24
25
ByteString
CPDF_Boolean::
GetString
()
const
{
26
return
m_bValue ?
"true"
:
"false"
;
27
}
28
29
int
CPDF_Boolean::
GetInteger
()
const
{
30
return
m_bValue;
31
}
32
33
void
CPDF_Boolean::
SetString
(
const
ByteString
& str) {
34
m_bValue = (str
==
"true"
);
35
}
36
37
CPDF_Boolean* CPDF_Boolean::
AsMutableBoolean
() {
38
return
this
;
39
}
40
41
bool
CPDF_Boolean::
WriteTo
(
IFX_ArchiveStream
* archive,
42
const
CPDF_Encryptor
* encryptor)
const
{
43
return
archive
->
WriteString
(
" "
) &&
44
archive
->
WriteString
(
GetString
(
)
.AsStringView()
)
;
45
}
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
CPDF_Boolean::GetString
ByteString GetString() const override
Definition
cpdf_boolean.cpp:25
CPDF_Boolean::GetType
Type GetType() const override
Definition
cpdf_boolean.cpp:17
CPDF_Boolean::GetInteger
int GetInteger() const override
Definition
cpdf_boolean.cpp:29
CPDF_Boolean::SetString
void SetString(const ByteString &str) override
Definition
cpdf_boolean.cpp:33
CPDF_Boolean::~CPDF_Boolean
~CPDF_Boolean() override
CPDF_Boolean::WriteTo
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
Definition
cpdf_boolean.cpp:41
CPDF_Boolean::AsMutableBoolean
CPDF_Boolean * AsMutableBoolean() override
Definition
cpdf_boolean.cpp:37
CPDF_Boolean::Clone
RetainPtr< CPDF_Object > Clone() const override
Definition
cpdf_boolean.cpp:21
CPDF_Encryptor
Definition
cpdf_encryptor.h:18
CPDF_Object
Definition
cpdf_object.h:50
CPDF_Object::Type
Type
Definition
cpdf_object.h:53
CPDF_Object::kBoolean
@ kBoolean
Definition
cpdf_object.h:54
IFX_ArchiveStream
Definition
fx_stream.h:32
IFX_WriteStream::WriteString
bool WriteString(ByteStringView str)
Definition
fx_stream.cpp:46
fxcrt::ByteString::operator==
bool operator==(const char *ptr) const
Definition
bytestring.cpp:208
fxcrt::RetainPtr
Definition
retain_ptr.h:28
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
parser
cpdf_boolean.cpp
Generated on
for Qt by
1.18.0