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_contentmarkitem.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/page/cpdf_contentmarkitem.h"
8
9
#
include
<
utility
>
10
11
#
include
"core/fpdfapi/parser/cpdf_dictionary.h"
12
13
CPDF_ContentMarkItem::CPDF_ContentMarkItem(
ByteString
name)
14
: m_MarkName(std::move(name)) {}
15
16
CPDF_ContentMarkItem::~
CPDF_ContentMarkItem
() =
default
;
17
18
RetainPtr
<
const
CPDF_Dictionary
> CPDF_ContentMarkItem::
GetParam
()
const
{
19
switch
(m_ParamType) {
20
case
kPropertiesDict:
21
return
m_pPropertiesHolder->GetDictFor(m_PropertyName);
22
case
kDirectDict:
23
return
m_pDirectDict;
24
case
kNone
:
25
return
nullptr
;
26
}
27
}
28
29
RetainPtr
<
CPDF_Dictionary
> CPDF_ContentMarkItem::
GetParam
() {
30
return
pdfium
::WrapRetain(
31
const_cast
<
CPDF_Dictionary
*>(
std
::as_const(*
this
).GetParam().Get()));
32
}
33
34
void
CPDF_ContentMarkItem::
SetDirectDict
(
RetainPtr
<
CPDF_Dictionary
> pDict) {
35
m_ParamType =
kDirectDict
;
36
m_pDirectDict = std::move(pDict);
37
}
38
39
void
CPDF_ContentMarkItem::
SetPropertiesHolder
(
40
RetainPtr
<
CPDF_Dictionary
> pHolder,
41
const
ByteString
& property_name) {
42
m_ParamType =
kPropertiesDict
;
43
m_pPropertiesHolder = std::move(pHolder);
44
m_PropertyName = property_name;
45
}
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
CPDF_ContentMarkItem::SetPropertiesHolder
void SetPropertiesHolder(RetainPtr< CPDF_Dictionary > pHolder, const ByteString &property_name)
Definition
cpdf_contentmarkitem.cpp:39
CPDF_ContentMarkItem::kDirectDict
@ kDirectDict
Definition
cpdf_contentmarkitem.h:17
CPDF_ContentMarkItem::kNone
@ kNone
Definition
cpdf_contentmarkitem.h:17
CPDF_ContentMarkItem::kPropertiesDict
@ kPropertiesDict
Definition
cpdf_contentmarkitem.h:17
CPDF_ContentMarkItem::~CPDF_ContentMarkItem
~CPDF_ContentMarkItem() override
CPDF_ContentMarkItem::GetParam
RetainPtr< CPDF_Dictionary > GetParam()
Definition
cpdf_contentmarkitem.cpp:29
CPDF_ContentMarkItem::GetParam
RetainPtr< const CPDF_Dictionary > GetParam() const
Definition
cpdf_contentmarkitem.cpp:18
CPDF_ContentMarkItem::SetDirectDict
void SetDirectDict(RetainPtr< CPDF_Dictionary > pDict)
Definition
cpdf_contentmarkitem.cpp:34
CPDF_Dictionary::DictMap
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
Definition
cpdf_dictionary.h:31
fxcrt::RetainPtr
Definition
retain_ptr.h:28
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
page
cpdf_contentmarkitem.cpp
Generated on
for Qt by
1.18.0