diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 16:58:33 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 16:58:33 -0800 |
commit | d983b09c3ae29a97cba8e9ec9c6351545f6087ee (patch) | |
tree | 5641a4bc6eddaa8069904c29c3e3897043411646 /fpdfsdk/src | |
parent | f86d3f946e2f1977c7eaea01dcb9d7ecb3064cd1 (diff) | |
download | pdfium-d983b09c3ae29a97cba8e9ec9c6351545f6087ee.tar.xz |
Merge to XFA: Remove FX_BSTRC.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1521563002 .
(cherry picked from commit 1956a174020686f91cd3b34294e91f4560fe45aa)
Review URL: https://codereview.chromium.org/1526823002 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/fpdf_ext.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/fpdf_transformpage.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfdoc.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfformfill.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfppo.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfsave.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfview.cpp | 18 | ||||
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 2 |
8 files changed, 24 insertions, 24 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index bc43f15c25..deee6b6214 100644 --- a/fpdfsdk/src/fpdf_ext.cpp +++ b/fpdfsdk/src/fpdf_ext.cpp @@ -99,7 +99,7 @@ FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { CFX_ByteString space, name; CFX_WideString value; pElement->GetAttrByIndex(i, space, name, value); - if (space == FX_BSTRC("xmlns") && name == FX_BSTRC("adhocwf") && + if (space == "xmlns" && name == "adhocwf" && value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { CXML_Element* pVersion = pElement->GetElement("adhocwf", cbName); if (!pVersion) diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp index 05be360088..b465b8387c 100644 --- a/fpdfsdk/src/fpdf_transformpage.cpp +++ b/fpdfsdk/src/fpdf_transformpage.cpp @@ -156,9 +156,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, } // Need to transform the patterns as well. - CPDF_Dictionary* pRes = pPageDic->GetDict(FX_BSTRC("Resources")); + CPDF_Dictionary* pRes = pPageDic->GetDict("Resources"); if (pRes) { - CPDF_Dictionary* pPattenDict = pRes->GetDict(FX_BSTRC("Pattern")); + CPDF_Dictionary* pPattenDict = pRes->GetDict("Pattern"); if (pPattenDict) { FX_POSITION pos = pPattenDict->GetStartPos(); while (pos) { @@ -175,10 +175,10 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, else continue; - CFX_Matrix m = pDict->GetMatrix(FX_BSTRC("Matrix")); + CFX_Matrix m = pDict->GetMatrix("Matrix"); CFX_Matrix t = *(CFX_Matrix*)matrix; m.Concat(t); - pDict->SetAtMatrix(FX_BSTRC("Matrix"), m); + pDict->SetAtMatrix("Matrix", m); } } } diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp index abe2a32ca4..4bd37a731a 100644 --- a/fpdfsdk/src/fpdfdoc.cpp +++ b/fpdfsdk/src/fpdfdoc.cpp @@ -273,7 +273,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, ToDictionary(static_cast<CPDF_Object*>(pAnnots->GetElementValue(i))); if (!pDict) continue; - if (pDict->GetString(FX_BSTRC("Subtype")).Equal(FX_BSTRC("Link"))) { + if (pDict->GetString("Subtype").Equal("Link")) { *startPos = i + 1; *linkAnnot = (FPDF_LINK)pDict; return TRUE; @@ -288,7 +288,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot, return FALSE; CPDF_Dictionary* pAnnotDict = ToDictionary(static_cast<CPDF_Object*>(linkAnnot)); - CPDF_Rect rt = pAnnotDict->GetRect(FX_BSTRC("Rect")); + CPDF_Rect rt = pAnnotDict->GetRect("Rect"); rect->left = rt.left; rect->bottom = rt.bottom; rect->right = rt.right; @@ -301,7 +301,7 @@ DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) { return 0; CPDF_Dictionary* pAnnotDict = ToDictionary(static_cast<CPDF_Object*>(linkAnnot)); - CPDF_Array* pArray = pAnnotDict->GetArray(FX_BSTRC("QuadPoints")); + CPDF_Array* pArray = pAnnotDict->GetArray("QuadPoints"); if (!pArray) return 0; return pArray->GetCount() / 8; @@ -314,7 +314,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, return FALSE; CPDF_Dictionary* pAnnotDict = ToDictionary(static_cast<CPDF_Object*>(linkAnnot)); - CPDF_Array* pArray = pAnnotDict->GetArray(FX_BSTRC("QuadPoints")); + CPDF_Array* pArray = pAnnotDict->GetArray("QuadPoints"); if (pArray) { if (quadIndex < 0 || quadIndex >= (int)pArray->GetCount() / 8 || ((quadIndex * 8 + 7) >= (int)pArray->GetCount())) diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp index 966d404a8e..0a6cdee9f2 100644 --- a/fpdfsdk/src/fpdfformfill.cpp +++ b/fpdfsdk/src/fpdfformfill.cpp @@ -702,7 +702,7 @@ DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, if (!pDic) return; - CPDF_AAction aa = pDic->GetDict(FX_BSTRC("AA")); + CPDF_AAction aa = pDic->GetDict("AA"); if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) { CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); CPDFSDK_ActionHandler* pActionHandler = @@ -727,7 +727,7 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, CPDFDoc_Environment* pEnv = pSDKDoc->GetEnv(); CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander(); CPDF_Dictionary* pPageDict = pPDFPage->m_pFormDict; - CPDF_AAction aa = pPageDict->GetDict(FX_BSTRC("AA")); + CPDF_AAction aa = pPageDict->GetDict("AA"); if (FPDFPAGE_AACTION_OPEN == aaType) { if (aa.ActionExist(CPDF_AAction::OpenPage)) { CPDF_Action action = aa.GetAction(CPDF_AAction::OpenPage); diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp index 507b97b184..513ffc4ade 100644 --- a/fpdfsdk/src/fpdfppo.cpp +++ b/fpdfsdk/src/fpdfppo.cpp @@ -396,7 +396,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc, return FALSE; CPDF_Dictionary* pSrcDict = pSrcDoc->GetRoot(); - pSrcDict = pSrcDict->GetDict(FX_BSTRC("ViewerPreferences")); + pSrcDict = pSrcDict->GetDict("ViewerPreferences"); if (!pSrcDict) return FALSE; @@ -404,6 +404,6 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc, if (!pDstDict) return FALSE; - pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); + pDstDict->SetAt("ViewerPreferences", pSrcDict->Clone(TRUE)); return TRUE; } diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp index 6bfc761027..d1cc0a8c60 100644 --- a/fpdfsdk/src/fpdfsave.cpp +++ b/fpdfsdk/src/fpdfsave.cpp @@ -110,7 +110,7 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument, iFormIndex = i + 1; else if (pPDFObj->GetString() == "datasets") iDataSetsIndex = i + 1; - else if (pPDFObj->GetString() == FX_BSTRC("template")) + else if (pPDFObj->GetString() == "template") iTemplate = i + 1; } IXFA_ChecksumContext* pContext = NULL; diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index 9e481a2ca1..3951d00a92 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -1037,11 +1037,11 @@ FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) { return DuplexUndefined; CPDF_ViewerPreferences viewRef(pDoc); CFX_ByteString duplex = viewRef.Duplex(); - if (FX_BSTRC("Simplex") == duplex) + if ("Simplex" == duplex) return Simplex; - if (FX_BSTRC("DuplexFlipShortEdge") == duplex) + if ("DuplexFlipShortEdge" == duplex) return DuplexFlipShortEdge; - if (FX_BSTRC("DuplexFlipLongEdge") == duplex) + if ("DuplexFlipLongEdge" == duplex) return DuplexFlipLongEdge; return DuplexUndefined; } @@ -1055,9 +1055,9 @@ DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document) { if (!pRoot) return 0; - CPDF_NameTree nameTree(pDoc, FX_BSTRC("Dests")); + CPDF_NameTree nameTree(pDoc, "Dests"); int count = nameTree.GetCount(); - CPDF_Dictionary* pDest = pRoot->GetDict(FX_BSTRC("Dests")); + CPDF_Dictionary* pDest = pRoot->GetDict("Dests"); if (pDest) count += pDest->GetCount(); return count; @@ -1072,7 +1072,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document, if (!pDoc) return nullptr; - CPDF_NameTree name_tree(pDoc, FX_BSTRC("Dests")); + CPDF_NameTree name_tree(pDoc, "Dests"); return name_tree.LookupNamedDest(pDoc, name); } @@ -1150,10 +1150,10 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, CPDF_Object* pDestObj = NULL; CFX_ByteString bsName; - CPDF_NameTree nameTree(pDoc, FX_BSTRC("Dests")); + CPDF_NameTree nameTree(pDoc, "Dests"); int count = nameTree.GetCount(); if (index >= count) { - CPDF_Dictionary* pDest = pRoot->GetDict(FX_BSTRC("Dests")); + CPDF_Dictionary* pDest = pRoot->GetDict("Dests"); if (!pDest) return NULL; if (index >= count + pDest->GetCount()) @@ -1175,7 +1175,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, if (!pDestObj) return nullptr; if (CPDF_Dictionary* pDict = pDestObj->AsDictionary()) { - pDestObj = pDict->GetArray(FX_BSTRC("D")); + pDestObj = pDict->GetArray("D"); if (!pDestObj) return nullptr; } diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index 62a37e30dc..a59d3393a7 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -576,7 +576,7 @@ FX_BOOL CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag) { #endif // PDF_ENABLE_XFA if (pAnnotHandler->Annot_OnKillFocus(pFocusAnnot, nFlag)) { - if (pFocusAnnot->GetType() == FX_BSTRC("Widget")) { + if (pFocusAnnot->GetType() == "Widget") { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pFocusAnnot; int nFieldType = pWidget->GetFieldType(); if (FIELDTYPE_TEXTFIELD == nFieldType || |