Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1272)

Unified Diff: core/fpdfdoc/doc_formcontrol.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/doc_form.cpp ('k') | core/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_formcontrol.cpp
diff --git a/core/fpdfdoc/doc_formcontrol.cpp b/core/fpdfdoc/doc_formcontrol.cpp
index 1fcc4a386b8b0741ed73cdf49a9010a3bdadb8b8..0a0a8c9a0382aea51279b0cf085dc4c909420cdd 100644
--- a/core/fpdfdoc/doc_formcontrol.cpp
+++ b/core/fpdfdoc/doc_formcontrol.cpp
@@ -78,7 +78,7 @@ void CPDF_FormControl::SetOnStateName(const CFX_ByteString& csOn) {
continue;
}
if (csKey2 != "Off") {
- pSubDict->ReplaceKey(csKey2, csValue);
+ pSubDict->ReplaceKey(csKey2.AsByteStringC(), csValue.AsByteStringC());
break;
}
}
@@ -202,7 +202,7 @@ CPDF_ApSettings CPDF_FormControl::GetMK() const {
}
bool CPDF_FormControl::HasMKEntry(CFX_ByteString csEntry) const {
- return GetMK().HasMKEntry(csEntry);
+ return GetMK().HasMKEntry(csEntry.AsByteStringC());
}
int CPDF_FormControl::GetRotation() {
@@ -210,24 +210,24 @@ int CPDF_FormControl::GetRotation() {
}
FX_ARGB CPDF_FormControl::GetColor(int& iColorType, CFX_ByteString csEntry) {
- return GetMK().GetColor(iColorType, csEntry);
+ return GetMK().GetColor(iColorType, csEntry.AsByteStringC());
}
FX_FLOAT CPDF_FormControl::GetOriginalColor(int index, CFX_ByteString csEntry) {
- return GetMK().GetOriginalColor(index, csEntry);
+ return GetMK().GetOriginalColor(index, csEntry.AsByteStringC());
}
void CPDF_FormControl::GetOriginalColor(int& iColorType,
FX_FLOAT fc[4],
CFX_ByteString csEntry) {
- GetMK().GetOriginalColor(iColorType, fc, csEntry);
+ GetMK().GetOriginalColor(iColorType, fc, csEntry.AsByteStringC());
}
CFX_WideString CPDF_FormControl::GetCaption(CFX_ByteString csEntry) {
- return GetMK().GetCaption(csEntry);
+ return GetMK().GetCaption(csEntry.AsByteStringC());
}
CPDF_Stream* CPDF_FormControl::GetIcon(CFX_ByteString csEntry) {
- return GetMK().GetIcon(csEntry);
+ return GetMK().GetIcon(csEntry.AsByteStringC());
}
CPDF_IconFit CPDF_FormControl::GetIconFit() {
@@ -286,7 +286,8 @@ CPDF_Font* CPDF_FormControl::GetDefaultControlFont() {
if (CPDF_Dictionary* pDict = ToDictionary(pObj)) {
CPDF_Dictionary* pFonts = pDict->GetDictBy("Font");
if (pFonts) {
- CPDF_Dictionary* pElement = pFonts->GetDictBy(csFontNameTag);
+ CPDF_Dictionary* pElement =
+ pFonts->GetDictBy(csFontNameTag.AsByteStringC());
if (pElement) {
CPDF_Font* pFont = m_pField->m_pForm->m_pDocument->LoadFont(pElement);
if (pFont) {
@@ -303,7 +304,8 @@ CPDF_Font* CPDF_FormControl::GetDefaultControlFont() {
if (CPDF_Dictionary* pDict = ToDictionary(pObj)) {
CPDF_Dictionary* pFonts = pDict->GetDictBy("Font");
if (pFonts) {
- CPDF_Dictionary* pElement = pFonts->GetDictBy(csFontNameTag);
+ CPDF_Dictionary* pElement =
+ pFonts->GetDictBy(csFontNameTag.AsByteStringC());
if (pElement) {
CPDF_Font* pFont = m_pField->m_pForm->m_pDocument->LoadFont(pElement);
if (pFont) {
« no previous file with comments | « core/fpdfdoc/doc_form.cpp ('k') | core/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698