diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-10 16:51:15 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-10 16:51:15 -0700 |
commit | 6f0a64a1bf18ab6636404cdfb883897459083a4d (patch) | |
tree | 1ef1326c8bb015213e0cdf0d726a27a537d09c73 /fpdfsdk/src | |
parent | e4503ea9947d2f9c61704da20271b413a364a9c0 (diff) | |
download | pdfium-6f0a64a1bf18ab6636404cdfb883897459083a4d.tar.xz |
Remove FX_BSTR and FX_WSTR typedefs.chromium/2434chromium/2433chromium/2432chromium/2431chromium/2430
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 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/fpdf_ext.cpp | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index 613a5fd134..0168375a1d 100644 --- a/fpdfsdk/src/fpdf_ext.cpp +++ b/fpdfsdk/src/fpdf_ext.cpp @@ -215,27 +215,30 @@ void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code) DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) { - if (!document) return PAGEMODE_UNKNOWN; - CPDF_Dictionary *pRoot = ((CPDF_Document*)document)->GetRoot(); - if (!pRoot) - return PAGEMODE_UNKNOWN; - CPDF_Object* pName = pRoot->GetElement("PageMode"); - if (!pName) - return PAGEMODE_USENONE; - CFX_ByteString strPageMode = pName->GetString(); - - if (strPageMode.IsEmpty()||strPageMode.EqualNoCase(FX_BSTR("UseNone"))) - return PAGEMODE_USENONE; - else if (strPageMode.EqualNoCase(FX_BSTR("UseOutlines"))) - return PAGEMODE_USEOUTLINES; - else if (strPageMode.EqualNoCase(FX_BSTR("UseThumbs"))) - return PAGEMODE_USETHUMBS; - else if (strPageMode.EqualNoCase(FX_BSTR("FullScreen"))) - return PAGEMODE_FULLSCREEN; - else if (strPageMode.EqualNoCase(FX_BSTR("UseOC"))) - return PAGEMODE_USEOC; - else if (strPageMode.EqualNoCase(FX_BSTR("UseAttachments"))) - return PAGEMODE_USEATTACHMENTS; - - return PAGEMODE_UNKNOWN; + if (!document) + return PAGEMODE_UNKNOWN; + + CPDF_Dictionary* pRoot = ((CPDF_Document*)document)->GetRoot(); + if (!pRoot) + return PAGEMODE_UNKNOWN; + + CPDF_Object* pName = pRoot->GetElement("PageMode"); + if (!pName) + return PAGEMODE_USENONE; + + CFX_ByteString strPageMode = pName->GetString(); + if (strPageMode.IsEmpty()||strPageMode.EqualNoCase("UseNone")) + return PAGEMODE_USENONE; + if (strPageMode.EqualNoCase("UseOutlines")) + return PAGEMODE_USEOUTLINES; + if (strPageMode.EqualNoCase("UseThumbs")) + return PAGEMODE_USETHUMBS; + if (strPageMode.EqualNoCase("FullScreen")) + return PAGEMODE_FULLSCREEN; + if (strPageMode.EqualNoCase("UseOC")) + return PAGEMODE_USEOC; + if (strPageMode.EqualNoCase("UseAttachments")) + return PAGEMODE_USEATTACHMENTS; + + return PAGEMODE_UNKNOWN; } |