summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-03-09 15:30:33 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-09 15:30:33 +0000
commit3baef5c6daf58cec2df193714b5727802d0bd42e (patch)
tree9289b458ce8003394bddb8bde4995b2d86a6a12e /core
parent5a7e330ef5e013e5df5fe771d3901ff890aa9731 (diff)
downloadpdfium-3baef5c6daf58cec2df193714b5727802d0bd42e.tar.xz
Remove unused methods from CPDF_DefaultAppearance
Methods unused. Removed. Change-Id: I059b1e321b7d57f631368b77ace1d62cb75596c8 Reviewed-on: https://pdfium-review.googlesource.com/28310 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfdoc/cpdf_defaultappearance.cpp93
-rw-r--r--core/fpdfdoc/cpdf_defaultappearance.h6
2 files changed, 0 insertions, 99 deletions
diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp
index 02d6eea41f..32bdefbc32 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.cpp
+++ b/core/fpdfdoc/cpdf_defaultappearance.cpp
@@ -20,22 +20,6 @@ bool CPDF_DefaultAppearance::HasFont() {
return syntax.FindTagParamFromStart("Tf", 2);
}
-ByteString CPDF_DefaultAppearance::GetFontString() {
- ByteString csFont;
- if (m_csDA.IsEmpty())
- return csFont;
-
- CPDF_SimpleParser syntax(m_csDA.AsStringView());
- if (syntax.FindTagParamFromStart("Tf", 2)) {
- csFont += syntax.GetWord();
- csFont += " ";
- csFont += syntax.GetWord();
- csFont += " ";
- csFont += syntax.GetWord();
- }
- return csFont;
-}
-
ByteString CPDF_DefaultAppearance::GetFont(float* fFontSize) {
*fFontSize = 0.0f;
if (m_csDA.IsEmpty())
@@ -68,45 +52,6 @@ bool CPDF_DefaultAppearance::HasColor(PaintOperation nOperation) {
(nOperation == PaintOperation::STROKE ? "K" : "k"), 4);
}
-ByteString CPDF_DefaultAppearance::GetColorString(PaintOperation nOperation) {
- ByteString csColor;
- if (m_csDA.IsEmpty())
- return csColor;
-
- CPDF_SimpleParser syntax(m_csDA.AsStringView());
- if (syntax.FindTagParamFromStart(
- (nOperation == PaintOperation::STROKE ? "G" : "g"), 1)) {
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- return csColor;
- }
- if (syntax.FindTagParamFromStart(
- (nOperation == PaintOperation::STROKE ? "RG" : "rg"), 3)) {
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- return csColor;
- }
- if (syntax.FindTagParamFromStart(
- (nOperation == PaintOperation::STROKE ? "K" : "k"), 4)) {
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- csColor += " ";
- csColor += syntax.GetWord();
- }
- return csColor;
-}
-
void CPDF_DefaultAppearance::GetColor(int& iColorType,
float fc[4],
PaintOperation nOperation) {
@@ -181,41 +126,3 @@ void CPDF_DefaultAppearance::GetColor(FX_ARGB& color,
(int)(b * 255 + 0.5f));
}
}
-
-bool CPDF_DefaultAppearance::HasTextMatrix() {
- if (m_csDA.IsEmpty())
- return false;
-
- CPDF_SimpleParser syntax(m_csDA.AsStringView());
- return syntax.FindTagParamFromStart("Tm", 6);
-}
-
-ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
- ByteString csTM;
- if (m_csDA.IsEmpty())
- return csTM;
-
- CPDF_SimpleParser syntax(m_csDA.AsStringView());
- if (syntax.FindTagParamFromStart("Tm", 6)) {
- for (int i = 0; i < 6; i++) {
- csTM += syntax.GetWord();
- csTM += " ";
- }
- csTM += syntax.GetWord();
- }
- return csTM;
-}
-
-CFX_Matrix CPDF_DefaultAppearance::GetTextMatrix() {
- if (m_csDA.IsEmpty())
- return CFX_Matrix();
-
- CPDF_SimpleParser syntax(m_csDA.AsStringView());
- if (!syntax.FindTagParamFromStart("Tm", 6))
- return CFX_Matrix();
-
- float f[6];
- for (int i = 0; i < 6; i++)
- f[i] = FX_atof(syntax.GetWord());
- return CFX_Matrix(f);
-}
diff --git a/core/fpdfdoc/cpdf_defaultappearance.h b/core/fpdfdoc/cpdf_defaultappearance.h
index 33d4bfdd9d..13e6307339 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.h
+++ b/core/fpdfdoc/cpdf_defaultappearance.h
@@ -28,11 +28,9 @@ class CPDF_DefaultAppearance {
ByteString GetStr() const { return m_csDA; }
bool HasFont();
- ByteString GetFontString();
ByteString GetFont(float* fFontSize);
bool HasColor(PaintOperation nOperation = PaintOperation::FILL);
- ByteString GetColorString(PaintOperation nOperation = PaintOperation::FILL);
void GetColor(int& iColorType,
float fc[4],
PaintOperation nOperation = PaintOperation::FILL);
@@ -40,10 +38,6 @@ class CPDF_DefaultAppearance {
int& iColorType,
PaintOperation nOperation = PaintOperation::FILL);
- bool HasTextMatrix();
- ByteString GetTextMatrixString();
- CFX_Matrix GetTextMatrix();
-
private:
ByteString m_csDA;
};