diff options
Diffstat (limited to 'fpdfsdk')
-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/fpdfview.cpp | 18 | ||||
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 2 |
7 files changed, 23 insertions, 23 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index d9f8624249..e7287027bd 100644 --- a/fpdfsdk/src/fpdf_ext.cpp +++ b/fpdfsdk/src/fpdf_ext.cpp @@ -96,7 +96,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 95f4f7e780..c8b90303a6 100644 --- a/fpdfsdk/src/fpdfformfill.cpp +++ b/fpdfsdk/src/fpdfformfill.cpp @@ -311,7 +311,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 = @@ -336,7 +336,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/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index 6f39dce209..2f360ece35 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -815,11 +815,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; } @@ -833,9 +833,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; @@ -850,7 +850,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); } @@ -874,10 +874,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()) @@ -899,7 +899,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 053052ab33..8a73970e49 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -551,7 +551,7 @@ FX_BOOL CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag) { CPDFSDK_Annot* pFocusAnnot = m_pFocusAnnot; m_pFocusAnnot = nullptr; 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 || |