diff options
author | Lei Zhang <thestig@chromium.org> | 2016-01-08 14:57:48 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-01-08 14:57:48 -0800 |
commit | b8e1ab27372cdb5d8c83e57e004032f0d72715db (patch) | |
tree | 718888980718f0b0f5e8d283f91713bdb0712c70 /fpdfsdk/src | |
parent | 111d8db83ac04d15bd8d879e7dad4651ee8e27e9 (diff) | |
download | pdfium-b8e1ab27372cdb5d8c83e57e004032f0d72715db.tar.xz |
Merge to XFA: Remove a bunch of dead code.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1567333003 .
(cherry picked from commit 4a24ad858484ecdf9b49481e63060e4d476cf1c7)
Review URL: https://codereview.chromium.org/1569783007 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/javascript/Document.cpp | 52 | ||||
-rw-r--r-- | fpdfsdk/src/javascript/Document.h | 8 | ||||
-rw-r--r-- | fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp | 4 |
4 files changed, 0 insertions, 68 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index 9a434a5db7..db98fcc5e4 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -666,16 +666,6 @@ CPDFSDK_Document* Document::GetReaderDoc() { return m_pDocument; } -FX_BOOL Document::ExtractFileName(CPDFSDK_Document* pDoc, - CFX_ByteString& strFileName) { - return FALSE; -} - -FX_BOOL Document::ExtractFolderName(CPDFSDK_Document* pDoc, - CFX_ByteString& strFolderName) { - return FALSE; -} - FX_BOOL Document::bookmarkRoot(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { @@ -1107,48 +1097,6 @@ FX_BOOL Document::documentFileName(IJS_Context* cc, return TRUE; } -CFX_WideString Document::ReversalStr(CFX_WideString cbFrom) { - size_t iLength = cbFrom.GetLength(); - pdfium::base::CheckedNumeric<size_t> iSize = sizeof(wchar_t); - iSize *= (iLength + 1); - wchar_t* pResult = (wchar_t*)malloc(iSize.ValueOrDie()); - wchar_t* pFrom = (wchar_t*)cbFrom.GetBuffer(iLength); - - for (size_t i = 0; i < iLength; i++) { - pResult[i] = *(pFrom + iLength - i - 1); - } - pResult[iLength] = L'\0'; - - cbFrom.ReleaseBuffer(); - CFX_WideString cbRet = CFX_WideString(pResult); - free(pResult); - pResult = NULL; - return cbRet; -} - -CFX_WideString Document::CutString(CFX_WideString cbFrom) { - size_t iLength = cbFrom.GetLength(); - pdfium::base::CheckedNumeric<size_t> iSize = sizeof(wchar_t); - iSize *= (iLength + 1); - wchar_t* pResult = (wchar_t*)malloc(iSize.ValueOrDie()); - wchar_t* pFrom = (wchar_t*)cbFrom.GetBuffer(iLength); - - for (size_t i = 0; i < iLength; i++) { - if (pFrom[i] == L'\\' || pFrom[i] == L'/') { - pResult[i] = L'\0'; - break; - } - pResult[i] = pFrom[i]; - } - pResult[iLength] = L'\0'; - - cbFrom.ReleaseBuffer(); - CFX_WideString cbRet = CFX_WideString(pResult); - free(pResult); - pResult = NULL; - return cbRet; -} - FX_BOOL Document::path(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { diff --git a/fpdfsdk/src/javascript/Document.h b/fpdfsdk/src/javascript/Document.h index 94860fc425..2295fd7328 100644 --- a/fpdfsdk/src/javascript/Document.h +++ b/fpdfsdk/src/javascript/Document.h @@ -56,7 +56,6 @@ class Document : public CJS_EmbedObj { Document(CJS_Object* pJSObject); ~Document() override; - public: FX_BOOL ADBE(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL author(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL baseURL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); @@ -258,21 +257,14 @@ class Document : public CJS_EmbedObj { CJS_Value& vRet, CFX_WideString& sError); - public: void AttachDoc(CPDFSDK_Document* pDoc); CPDFSDK_Document* GetReaderDoc(); - static FX_BOOL ExtractFileName(CPDFSDK_Document* pDoc, - CFX_ByteString& strFileName); - static FX_BOOL ExtractFolderName(CPDFSDK_Document* pDoc, - CFX_ByteString& strFolderName); void AddDelayData(CJS_DelayData* pData); void DoFieldDelay(const CFX_WideString& sFieldName, int nControlIndex); void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; } CJS_Document* GetCJSDoc() const; private: - CFX_WideString ReversalStr(CFX_WideString cbFrom); - CFX_WideString CutString(CFX_WideString cbFrom); bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect); int CountWords(CPDF_TextObject* pTextObj); CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex); diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp index f5f3a7873c..7582ae412b 100644 --- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp @@ -637,10 +637,6 @@ void CPWL_ComboBox::SetSelectText() { m_nSelectItem = m_pList->GetCurSel(); } -FX_BOOL CPWL_ComboBox::IsModified() const { - return m_pEdit->IsModified(); -} - void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify) { m_pFillerNotify = pNotify; diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp index e54810e0ce..c505c7e780 100644 --- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp @@ -383,10 +383,6 @@ void CPWL_EditCtrl::SetCaret(FX_BOOL bVisible, } } -FX_BOOL CPWL_EditCtrl::IsModified() const { - return m_pEdit->IsModified(); -} - CFX_WideString CPWL_EditCtrl::GetText() const { return m_pEdit->GetText(); } |