summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/page/cpdf_devicecs.cpp13
-rw-r--r--core/fpdfapi/parser/cfdf_document.cpp15
-rw-r--r--core/fpdfapi/parser/cfdf_document.h2
3 files changed, 3 insertions, 27 deletions
diff --git a/core/fpdfapi/page/cpdf_devicecs.cpp b/core/fpdfapi/page/cpdf_devicecs.cpp
index 276d19b174..efd0ae4f46 100644
--- a/core/fpdfapi/page/cpdf_devicecs.cpp
+++ b/core/fpdfapi/page/cpdf_devicecs.cpp
@@ -36,19 +36,6 @@ uint32_t ComponentsForFamily(int family) {
return 4;
}
-void sRGB_to_AdobeCMYK(float R,
- float G,
- float B,
- float& c,
- float& m,
- float& y,
- float& k) {
- c = 1.0f - R;
- m = 1.0f - G;
- y = 1.0f - B;
- k = std::min(c, std::min(m, y));
-}
-
void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels) {
if (pDestBuf == pSrcBuf) {
for (int i = 0; i < pixels; i++) {
diff --git a/core/fpdfapi/parser/cfdf_document.cpp b/core/fpdfapi/parser/cfdf_document.cpp
index 55493b257d..f6af4546d7 100644
--- a/core/fpdfapi/parser/cfdf_document.cpp
+++ b/core/fpdfapi/parser/cfdf_document.cpp
@@ -29,20 +29,11 @@ std::unique_ptr<CFDF_Document> CFDF_Document::CreateNewDoc() {
return pDoc;
}
-std::unique_ptr<CFDF_Document> CFDF_Document::ParseFile(
- const RetainPtr<IFX_SeekableReadStream>& pFile) {
- if (!pFile)
- return nullptr;
-
- auto pDoc = pdfium::MakeUnique<CFDF_Document>();
- pDoc->ParseStream(pFile);
- return pDoc->m_pRootDict ? std::move(pDoc) : nullptr;
-}
-
std::unique_ptr<CFDF_Document> CFDF_Document::ParseMemory(uint8_t* pData,
uint32_t size) {
- return CFDF_Document::ParseFile(
- pdfium::MakeRetain<CFX_MemoryStream>(pData, size, false));
+ auto pDoc = pdfium::MakeUnique<CFDF_Document>();
+ pDoc->ParseStream(pdfium::MakeRetain<CFX_MemoryStream>(pData, size, false));
+ return pDoc->m_pRootDict ? std::move(pDoc) : nullptr;
}
void CFDF_Document::ParseStream(
diff --git a/core/fpdfapi/parser/cfdf_document.h b/core/fpdfapi/parser/cfdf_document.h
index 743c5c0eaa..b2cbd5bae9 100644
--- a/core/fpdfapi/parser/cfdf_document.h
+++ b/core/fpdfapi/parser/cfdf_document.h
@@ -19,8 +19,6 @@ class IFX_SeekableReadStream;
class CFDF_Document : public CPDF_IndirectObjectHolder {
public:
static std::unique_ptr<CFDF_Document> CreateNewDoc();
- static std::unique_ptr<CFDF_Document> ParseFile(
- const RetainPtr<IFX_SeekableReadStream>& pFile);
static std::unique_ptr<CFDF_Document> ParseMemory(uint8_t* pData,
uint32_t size);