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
fpdf_catalog.cpp
Go to the documentation of this file.
1
// Copyright 2017 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
#
include
"public/fpdf_catalog.h"
6
7
#
include
"core/fpdfapi/parser/cpdf_dictionary.h"
8
#
include
"core/fpdfapi/parser/cpdf_document.h"
9
#
include
"core/fpdfapi/parser/cpdf_string.h"
10
#
include
"core/fxcrt/retain_ptr.h"
11
#
include
"fpdfsdk/cpdfsdk_helpers.h"
12
13
FPDF_EXPORT
FPDF_BOOL
FPDF_CALLCONV
14
FPDFCatalog_IsTagged
(FPDF_DOCUMENT document) {
15
CPDF_Document
* pDoc =
CPDFDocumentFromFPDFDocument
(
document
)
;
16
if
(!pDoc)
17
return
false
;
18
19
const
CPDF_Dictionary
* pCatalog = pDoc
->
GetRoot
(
)
;
20
if
(!pCatalog)
21
return
false
;
22
23
RetainPtr
<
const
CPDF_Dictionary
> pMarkInfo = pCatalog->GetDictFor(
"MarkInfo"
);
24
return
pMarkInfo && pMarkInfo->GetIntegerFor(
"Marked"
) != 0;
25
}
26
27
FPDF_EXPORT
FPDF_BOOL
FPDF_CALLCONV
28
FPDFCatalog_SetLanguage
(FPDF_DOCUMENT document, FPDF_BYTESTRING language) {
29
if
(!language) {
30
return
false
;
31
}
32
33
CPDF_Document
* doc =
CPDFDocumentFromFPDFDocument
(
document
)
;
34
if
(!doc) {
35
return
false
;
36
}
37
38
RetainPtr
<
CPDF_Dictionary
> catalog = doc->GetMutableRoot();
39
if
(!catalog) {
40
return
false
;
41
}
42
43
catalog->SetNewFor<CPDF_String>(
"Lang"
, language);
44
return
true
;
45
}
CPDF_Dictionary::DictMap
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
Definition
cpdf_dictionary.h:31
CPDF_Document
Definition
cpdf_document.h:29
CPDF_Document::GetRoot
const CPDF_Dictionary * GetRoot() const
Definition
cpdf_document.h:97
fxcrt::RetainPtr
Definition
retain_ptr.h:28
CPDFDocumentFromFPDFDocument
CPDF_Document * CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc)
Definition
cpdfsdk_helpers.cpp:205
FPDFCatalog_SetLanguage
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFCatalog_SetLanguage(FPDF_DOCUMENT document, FPDF_BYTESTRING language)
Definition
fpdf_catalog.cpp:28
FPDFCatalog_IsTagged
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFCatalog_IsTagged(FPDF_DOCUMENT document)
Definition
fpdf_catalog.cpp:14
FPDF_CALLCONV
#define FPDF_CALLCONV
Definition
fpdfview.h:229
FPDF_EXPORT
#define FPDF_EXPORT
Definition
fpdfview.h:223
qtwebengine
src
3rdparty
chromium
third_party
pdfium
fpdfsdk
fpdf_catalog.cpp
Generated on
for Qt by
1.18.0