summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_ap.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 15:50:28 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 15:50:28 -0800
commit1956a174020686f91cd3b34294e91f4560fe45aa (patch)
tree25b21d226c9031e1a0748ddcc455214185585668 /core/src/fpdfdoc/doc_ap.cpp
parent1407c979a3ba8599546468d461f5403f317bddd3 (diff)
downloadpdfium-1956a174020686f91cd3b34294e91f4560fe45aa.tar.xz
Remove FX_BSTRC.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_ap.cpp')
-rw-r--r--core/src/fpdfdoc/doc_ap.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp
index bbac32f404..effe587090 100644
--- a/core/src/fpdfdoc/doc_ap.cpp
+++ b/core/src/fpdfdoc/doc_ap.cpp
@@ -11,8 +11,7 @@
#include "pdf_vt.h"
FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) {
- if (!pAnnotDict ||
- pAnnotDict->GetConstString("Subtype") != FX_BSTRC("Widget")) {
+ if (!pAnnotDict || pAnnotDict->GetConstString("Subtype") != "Widget") {
return FALSE;
}
CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString();
@@ -292,16 +291,16 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
CPVT_Color crText = ParseColor(DA);
FX_BOOL bUseFormRes = FALSE;
CPDF_Dictionary* pFontDict = NULL;
- CPDF_Dictionary* pDRDict = pAnnotDict->GetDict(FX_BSTRC("DR"));
+ CPDF_Dictionary* pDRDict = pAnnotDict->GetDict("DR");
if (pDRDict == NULL) {
- pDRDict = pFormDict->GetDict(FX_BSTRC("DR"));
+ pDRDict = pFormDict->GetDict("DR");
bUseFormRes = TRUE;
}
CPDF_Dictionary* pDRFontDict = NULL;
if (pDRDict && (pDRFontDict = pDRDict->GetDict("Font"))) {
pFontDict = pDRFontDict->GetDict(sFontName.Mid(1));
if (!pFontDict && !bUseFormRes) {
- pDRDict = pFormDict->GetDict(FX_BSTRC("DR"));
+ pDRDict = pFormDict->GetDict("DR");
pDRFontDict = pDRDict->GetDict("Font");
if (pDRFontDict) {
pFontDict = pDRFontDict->GetDict(sFontName.Mid(1));
@@ -316,10 +315,10 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
if (pFontDict == NULL) {
return FALSE;
}
- pFontDict->SetAtName(FX_BSTRC("Type"), "Font");
- pFontDict->SetAtName(FX_BSTRC("Subtype"), "Type1");
- pFontDict->SetAtName(FX_BSTRC("BaseFont"), "Helvetica");
- pFontDict->SetAtName(FX_BSTRC("Encoding"), "WinAnsiEncoding");
+ pFontDict->SetAtName("Type", "Font");
+ pFontDict->SetAtName("Subtype", "Type1");
+ pFontDict->SetAtName("BaseFont", "Helvetica");
+ pFontDict->SetAtName("Encoding", "WinAnsiEncoding");
pDoc->AddIndirectObject(pFontDict);
pDRFontDict->SetAtReference(sFontName.Mid(1), pDoc, pFontDict);
}