summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseannot.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
committerWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
commit9b76113ae4567eb998618d049afde26d3f0175d5 (patch)
treeede02b9835770dafe91eaee727e328765e4ffd52 /fpdfsdk/src/fsdk_baseannot.cpp
parent47f7199eee69abdd48c5ab16a5b8f5aef433a003 (diff)
downloadpdfium-9b76113ae4567eb998618d049afde26d3f0175d5.tar.xz
Merge to XFA: Member function name refactoring
This is needed by Cl 1634373003 as the name collision with virtual functions will be shown as warnings on Linux. Also, it is better to use different names for different cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1644633003 . (cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b) Review URL: https://codereview.chromium.org/1648233002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseannot.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 0d65e06b38..2495897408 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -567,11 +567,11 @@ void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice,
}
FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid() {
- return m_pAnnot->GetAnnotDict()->GetDict("AP") != NULL;
+ return m_pAnnot->GetAnnotDict()->GetDictBy("AP") != NULL;
}
FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode) {
- CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP");
+ CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDictBy("AP");
if (!pAP)
return FALSE;
@@ -608,7 +608,7 @@ void CPDFSDK_BAAnnot::SetContents(const CFX_WideString& sContents) {
}
CFX_WideString CPDFSDK_BAAnnot::GetContents() const {
- return m_pAnnot->GetAnnotDict()->GetUnicodeText("Contents");
+ return m_pAnnot->GetAnnotDict()->GetUnicodeTextBy("Contents");
}
void CPDFSDK_BAAnnot::SetAnnotName(const CFX_WideString& sName) {
@@ -619,7 +619,7 @@ void CPDFSDK_BAAnnot::SetAnnotName(const CFX_WideString& sName) {
}
CFX_WideString CPDFSDK_BAAnnot::GetAnnotName() const {
- return m_pAnnot->GetAnnotDict()->GetUnicodeText("NM");
+ return m_pAnnot->GetAnnotDict()->GetUnicodeTextBy("NM");
}
void CPDFSDK_BAAnnot::SetModifiedDate(const FX_SYSTEMTIME& st) {
@@ -634,7 +634,7 @@ void CPDFSDK_BAAnnot::SetModifiedDate(const FX_SYSTEMTIME& st) {
FX_SYSTEMTIME CPDFSDK_BAAnnot::GetModifiedDate() const {
FX_SYSTEMTIME systime;
- CFX_ByteString str = m_pAnnot->GetAnnotDict()->GetString("M");
+ CFX_ByteString str = m_pAnnot->GetAnnotDict()->GetStringBy("M");
CPDFSDK_DateTime dt(str);
dt.ToSystemTime(systime);
@@ -647,7 +647,7 @@ void CPDFSDK_BAAnnot::SetFlags(int nFlags) {
}
int CPDFSDK_BAAnnot::GetFlags() const {
- return m_pAnnot->GetAnnotDict()->GetInteger("F");
+ return m_pAnnot->GetAnnotDict()->GetIntegerBy("F");
}
void CPDFSDK_BAAnnot::SetAppState(const CFX_ByteString& str) {
@@ -658,7 +658,7 @@ void CPDFSDK_BAAnnot::SetAppState(const CFX_ByteString& str) {
}
CFX_ByteString CPDFSDK_BAAnnot::GetAppState() const {
- return m_pAnnot->GetAnnotDict()->GetString("AS");
+ return m_pAnnot->GetAnnotDict()->GetStringBy("AS");
}
void CPDFSDK_BAAnnot::SetStructParent(int key) {
@@ -666,17 +666,17 @@ void CPDFSDK_BAAnnot::SetStructParent(int key) {
}
int CPDFSDK_BAAnnot::GetStructParent() const {
- return m_pAnnot->GetAnnotDict()->GetInteger("StructParent");
+ return m_pAnnot->GetAnnotDict()->GetIntegerBy("StructParent");
}
// border
void CPDFSDK_BAAnnot::SetBorderWidth(int nWidth) {
- CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border");
+ CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayBy("Border");
if (pBorder) {
pBorder->SetAt(2, new CPDF_Number(nWidth));
} else {
- CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
+ CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictBy("BS");
if (!pBSDict) {
pBSDict = new CPDF_Dictionary;
@@ -688,17 +688,17 @@ void CPDFSDK_BAAnnot::SetBorderWidth(int nWidth) {
}
int CPDFSDK_BAAnnot::GetBorderWidth() const {
- if (CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border")) {
- return pBorder->GetInteger(2);
+ if (CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayBy("Border")) {
+ return pBorder->GetIntegerAt(2);
}
- if (CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS")) {
- return pBSDict->GetInteger("W", 1);
+ if (CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictBy("BS")) {
+ return pBSDict->GetIntegerBy("W", 1);
}
return 1;
}
void CPDFSDK_BAAnnot::SetBorderStyle(int nStyle) {
- CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
+ CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictBy("BS");
if (!pBSDict) {
pBSDict = new CPDF_Dictionary;
m_pAnnot->GetAnnotDict()->SetAt("BS", pBSDict);
@@ -724,9 +724,9 @@ void CPDFSDK_BAAnnot::SetBorderStyle(int nStyle) {
}
int CPDFSDK_BAAnnot::GetBorderStyle() const {
- CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
+ CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictBy("BS");
if (pBSDict) {
- CFX_ByteString sBorderStyle = pBSDict->GetString("S", "S");
+ CFX_ByteString sBorderStyle = pBSDict->GetStringBy("S", "S");
if (sBorderStyle == "S")
return BBS_SOLID;
if (sBorderStyle == "D")
@@ -739,10 +739,10 @@ int CPDFSDK_BAAnnot::GetBorderStyle() const {
return BBS_UNDERLINE;
}
- CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border");
+ CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayBy("Border");
if (pBorder) {
if (pBorder->GetCount() >= 4) {
- CPDF_Array* pDP = pBorder->GetArray(3);
+ CPDF_Array* pDP = pBorder->GetArrayAt(3);
if (pDP && pDP->GetCount() > 0)
return BBS_DASH;
}
@@ -752,7 +752,7 @@ int CPDFSDK_BAAnnot::GetBorderStyle() const {
}
void CPDFSDK_BAAnnot::SetBorderDash(const CFX_IntArray& array) {
- CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
+ CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictBy("BS");
if (!pBSDict) {
pBSDict = new CPDF_Dictionary;
m_pAnnot->GetAnnotDict()->SetAt("BS", pBSDict);
@@ -769,19 +769,19 @@ void CPDFSDK_BAAnnot::SetBorderDash(const CFX_IntArray& array) {
void CPDFSDK_BAAnnot::GetBorderDash(CFX_IntArray& array) const {
CPDF_Array* pDash = NULL;
- CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border");
+ CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayBy("Border");
if (pBorder) {
- pDash = pBorder->GetArray(3);
+ pDash = pBorder->GetArrayAt(3);
} else {
- CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
+ CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictBy("BS");
if (pBSDict) {
- pDash = pBSDict->GetArray("D");
+ pDash = pBSDict->GetArrayBy("D");
}
}
if (pDash) {
for (int i = 0, sz = pDash->GetCount(); i < sz; i++) {
- array.Add(pDash->GetInteger(i));
+ array.Add(pDash->GetIntegerAt(i));
}
}
}
@@ -799,27 +799,27 @@ void CPDFSDK_BAAnnot::RemoveColor() {
}
FX_BOOL CPDFSDK_BAAnnot::GetColor(FX_COLORREF& color) const {
- if (CPDF_Array* pEntry = m_pAnnot->GetAnnotDict()->GetArray("C")) {
+ if (CPDF_Array* pEntry = m_pAnnot->GetAnnotDict()->GetArrayBy("C")) {
int nCount = pEntry->GetCount();
if (nCount == 1) {
- FX_FLOAT g = pEntry->GetNumber(0) * 255;
+ FX_FLOAT g = pEntry->GetNumberAt(0) * 255;
color = FXSYS_RGB((int)g, (int)g, (int)g);
return TRUE;
} else if (nCount == 3) {
- FX_FLOAT r = pEntry->GetNumber(0) * 255;
- FX_FLOAT g = pEntry->GetNumber(1) * 255;
- FX_FLOAT b = pEntry->GetNumber(2) * 255;
+ FX_FLOAT r = pEntry->GetNumberAt(0) * 255;
+ FX_FLOAT g = pEntry->GetNumberAt(1) * 255;
+ FX_FLOAT b = pEntry->GetNumberAt(2) * 255;
color = FXSYS_RGB((int)r, (int)g, (int)b);
return TRUE;
} else if (nCount == 4) {
- FX_FLOAT c = pEntry->GetNumber(0);
- FX_FLOAT m = pEntry->GetNumber(1);
- FX_FLOAT y = pEntry->GetNumber(2);
- FX_FLOAT k = pEntry->GetNumber(3);
+ FX_FLOAT c = pEntry->GetNumberAt(0);
+ FX_FLOAT m = pEntry->GetNumberAt(1);
+ FX_FLOAT y = pEntry->GetNumberAt(2);
+ FX_FLOAT k = pEntry->GetNumberAt(3);
FX_FLOAT r = 1.0f - std::min(1.0f, c + k);
FX_FLOAT g = 1.0f - std::min(1.0f, m + k);
@@ -839,7 +839,7 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
const CFX_Matrix& matrix,
const CFX_ByteString& sContents,
const CFX_ByteString& sAPState) {
- CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP");
+ CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP");
if (!pAPDict) {
pAPDict = new CPDF_Dictionary;
@@ -851,16 +851,16 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
if (sAPState.IsEmpty()) {
pParentDict = pAPDict;
- pStream = pAPDict->GetStream(sAPType);
+ pStream = pAPDict->GetStreamBy(sAPType);
} else {
- CPDF_Dictionary* pAPTypeDict = pAPDict->GetDict(sAPType);
+ CPDF_Dictionary* pAPTypeDict = pAPDict->GetDictBy(sAPType);
if (!pAPTypeDict) {
pAPTypeDict = new CPDF_Dictionary;
pAPDict->SetAt(sAPType, pAPTypeDict);
}
pParentDict = pAPTypeDict;
- pStream = pAPTypeDict->GetStream(sAPState);
+ pStream = pAPTypeDict->GetStreamBy(sAPState);
}
if (!pStream) {
@@ -910,13 +910,13 @@ FX_BOOL CPDFSDK_BAAnnot::IsVisible() const {
}
CPDF_Action CPDFSDK_BAAnnot::GetAction() const {
- return CPDF_Action(m_pAnnot->GetAnnotDict()->GetDict("A"));
+ return CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictBy("A"));
}
void CPDFSDK_BAAnnot::SetAction(const CPDF_Action& action) {
ASSERT(action);
if ((CPDF_Action&)action !=
- CPDF_Action(m_pAnnot->GetAnnotDict()->GetDict("A"))) {
+ CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictBy("A"))) {
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
CPDF_Dictionary* pDict = action.GetDict();
if (pDict && pDict->GetObjNum() == 0) {
@@ -931,11 +931,11 @@ void CPDFSDK_BAAnnot::RemoveAction() {
}
CPDF_AAction CPDFSDK_BAAnnot::GetAAction() const {
- return m_pAnnot->GetAnnotDict()->GetDict("AA");
+ return m_pAnnot->GetAnnotDict()->GetDictBy("AA");
}
void CPDFSDK_BAAnnot::SetAAction(const CPDF_AAction& aa) {
- if ((CPDF_AAction&)aa != m_pAnnot->GetAnnotDict()->GetDict("AA"))
+ if ((CPDF_AAction&)aa != m_pAnnot->GetAnnotDict()->GetDictBy("AA"))
m_pAnnot->GetAnnotDict()->SetAt("AA", (CPDF_AAction&)aa);
}