summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_basic.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 16:51:15 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 16:51:15 -0700
commit6f0a64a1bf18ab6636404cdfb883897459083a4d (patch)
tree1ef1326c8bb015213e0cdf0d726a27a537d09c73 /core/src/fpdfdoc/doc_basic.cpp
parente4503ea9947d2f9c61704da20271b413a364a9c0 (diff)
downloadpdfium-6f0a64a1bf18ab6636404cdfb883897459083a4d.tar.xz
These stand for const CFX_{Byte,Wide}StringC&, which is just monumentally confusing, since there are so many string types running around here. The following had manual changes: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp core/src/fpdfdoc/doc_form.cpp fpdfsdk/src/fpdf_ext.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1180593004.
Diffstat (limited to 'core/src/fpdfdoc/doc_basic.cpp')
-rw-r--r--core/src/fpdfdoc/doc_basic.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index f9e692cb69..e559c0ef16 100644
--- a/core/src/fpdfdoc/doc_basic.cpp
+++ b/core/src/fpdfdoc/doc_basic.cpp
@@ -72,7 +72,7 @@ CFX_ByteString CPDF_Dest::GetRemoteName()
}
return m_pObj->GetString();
}
-CPDF_NameTree::CPDF_NameTree(CPDF_Document* pDoc, FX_BSTR category)
+CPDF_NameTree::CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteStringC& category)
{
if (pDoc->GetRoot() && pDoc->GetRoot()->GetDict(FX_BSTRC("Names")))
m_pRoot = pDoc->GetRoot()->GetDict(FX_BSTRC("Names"))->GetDict(category);
@@ -229,7 +229,7 @@ CPDF_Object* CPDF_NameTree::LookupValue(const CFX_ByteString& csName) const
int nIndex = 0;
return SearchNameNode(m_pRoot, csName, nIndex, NULL);
}
-CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, FX_BSTR sName)
+CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, const CFX_ByteStringC& sName)
{
CPDF_Object* pValue = LookupValue(sName);
if (pValue == NULL) {
@@ -282,7 +282,7 @@ static CFX_WideString ChangeSlashToPDF(const FX_WCHAR* str)
return result;
}
#endif
-static CFX_WideString FILESPEC_DecodeFileName(FX_WSTR filepath)
+static CFX_WideString FILESPEC_DecodeFileName(const CFX_WideStringC& filepath)
{
if (filepath.GetLength() <= 1) {
return CFX_WideString();
@@ -362,7 +362,7 @@ FX_BOOL CPDF_FileSpec::IsURL() const
}
return ((CPDF_Dictionary*)m_pObj)->GetString(FX_BSTRC("FS")) == FX_BSTRC("URL");
}
-CFX_WideString FILESPEC_EncodeFileName(FX_WSTR filepath)
+CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath)
{
if (filepath.GetLength() <= 1) {
return CFX_WideString();
@@ -417,7 +417,7 @@ CPDF_Stream* CPDF_FileSpec::GetFileStream() const
}
return NULL;
}
-static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, FX_WSTR wsFileName, FX_BOOL bURL)
+static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, const CFX_WideStringC& wsFileName, FX_BOOL bURL)
{
ASSERT(pObj != NULL);
CFX_WideString wsStr;
@@ -435,7 +435,7 @@ static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, FX_WSTR wsFileName,
pDict->SetAtString(FX_BSTRC("UF"), PDF_EncodeText(wsStr));
}
}
-void CPDF_FileSpec::SetFileName(FX_WSTR wsFileName, FX_BOOL bURL)
+void CPDF_FileSpec::SetFileName(const CFX_WideStringC& wsFileName, FX_BOOL bURL)
{
ASSERT(m_pObj != NULL);
if (m_pObj->GetType() == PDFOBJ_DICTIONARY && bURL) {
@@ -540,7 +540,7 @@ CFX_WideString CPDF_PageLabel::GetLabel(int nPage) const
wsLabel.Format(L"%d", nPage + 1);
return wsLabel;
}
-int32_t CPDF_PageLabel::GetPageByLabel(FX_BSTR bsLabel) const
+int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const
{
if (m_pDocument == NULL) {
return -1;
@@ -565,7 +565,7 @@ int32_t CPDF_PageLabel::GetPageByLabel(FX_BSTR bsLabel) const
}
return -1;
}
-int32_t CPDF_PageLabel::GetPageByLabel(FX_WSTR wsLabel) const
+int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const
{
CFX_ByteString bsLabel = PDF_EncodeText(wsLabel.GetPtr());
return GetPageByLabel(bsLabel);