summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_defaultappearance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_defaultappearance.cpp')
-rw-r--r--core/fpdfdoc/cpdf_defaultappearance.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp
index 28213aa33b..bd7ea1bc07 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.cpp
+++ b/core/fpdfdoc/cpdf_defaultappearance.cpp
@@ -16,16 +16,16 @@ bool CPDF_DefaultAppearance::HasFont() {
if (m_csDA.IsEmpty())
return false;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
return syntax.FindTagParamFromStart("Tf", 2);
}
-CFX_ByteString CPDF_DefaultAppearance::GetFontString() {
- CFX_ByteString csFont;
+ByteString CPDF_DefaultAppearance::GetFontString() {
+ ByteString csFont;
if (m_csDA.IsEmpty())
return csFont;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart("Tf", 2)) {
csFont += syntax.GetWord();
csFont += " ";
@@ -36,15 +36,15 @@ CFX_ByteString CPDF_DefaultAppearance::GetFontString() {
return csFont;
}
-CFX_ByteString CPDF_DefaultAppearance::GetFont(float* fFontSize) {
+ByteString CPDF_DefaultAppearance::GetFont(float* fFontSize) {
*fFontSize = 0.0f;
if (m_csDA.IsEmpty())
- return CFX_ByteString();
+ return ByteString();
- CFX_ByteString csFontNameTag;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ ByteString csFontNameTag;
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart("Tf", 2)) {
- csFontNameTag = CFX_ByteString(syntax.GetWord());
+ csFontNameTag = ByteString(syntax.GetWord());
csFontNameTag.Delete(0, 1);
*fFontSize = FX_atof(syntax.GetWord());
}
@@ -55,7 +55,7 @@ bool CPDF_DefaultAppearance::HasColor(PaintOperation nOperation) {
if (m_csDA.IsEmpty())
return false;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "G" : "g"), 1)) {
return true;
@@ -68,13 +68,12 @@ bool CPDF_DefaultAppearance::HasColor(PaintOperation nOperation) {
(nOperation == PaintOperation::STROKE ? "K" : "k"), 4);
}
-CFX_ByteString CPDF_DefaultAppearance::GetColorString(
- PaintOperation nOperation) {
- CFX_ByteString csColor;
+ByteString CPDF_DefaultAppearance::GetColorString(PaintOperation nOperation) {
+ ByteString csColor;
if (m_csDA.IsEmpty())
return csColor;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "G" : "g"), 1)) {
csColor += syntax.GetWord();
@@ -118,7 +117,7 @@ void CPDF_DefaultAppearance::GetColor(int& iColorType,
if (m_csDA.IsEmpty())
return;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "G" : "g"), 1)) {
iColorType = COLORTYPE_GRAY;
@@ -151,7 +150,7 @@ void CPDF_DefaultAppearance::GetColor(FX_ARGB& color,
if (m_csDA.IsEmpty())
return;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart(
(nOperation == PaintOperation::STROKE ? "G" : "g"), 1)) {
iColorType = COLORTYPE_GRAY;
@@ -187,16 +186,16 @@ bool CPDF_DefaultAppearance::HasTextMatrix() {
if (m_csDA.IsEmpty())
return false;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
return syntax.FindTagParamFromStart("Tm", 6);
}
-CFX_ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
- CFX_ByteString csTM;
+ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
+ ByteString csTM;
if (m_csDA.IsEmpty())
return csTM;
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (syntax.FindTagParamFromStart("Tm", 6)) {
for (int i = 0; i < 6; i++) {
csTM += syntax.GetWord();
@@ -211,7 +210,7 @@ CFX_Matrix CPDF_DefaultAppearance::GetTextMatrix() {
if (m_csDA.IsEmpty())
return CFX_Matrix();
- CPDF_SimpleParser syntax(m_csDA.AsStringC());
+ CPDF_SimpleParser syntax(m_csDA.AsStringView());
if (!syntax.FindTagParamFromStart("Tm", 6))
return CFX_Matrix();