Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2001)

Unified Diff: xfa/fxfa/app/xfa_ffimageedit.cpp

Issue 1915323002: Remove no-op ShowFileDialog(s). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | xfa/fxfa/include/fxfa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffimageedit.cpp
diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp
index b56f24d3669376da0ef70cf26f2a2e7cea3da8b0..153f7b090f082cc6c8bd0b36b7bfe7dbe494322f 100644
--- a/xfa/fxfa/app/xfa_ffimageedit.cpp
+++ b/xfa/fxfa/app/xfa_ffimageedit.cpp
@@ -107,52 +107,6 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags,
CFX_WideString wsTitle;
CFX_WideString wsFilter;
pAppProvider->LoadString(XFA_IDS_ImageFilter, wsFilter);
dsinclair 2016/04/26 00:05:40 This can also be removed I think. I believe LoadSt
Tom Sepez 2016/04/26 16:13:02 Done.
- CFX_WideStringArray wsPathArray;
- pAppProvider->ShowFileDialog(wsTitle.AsStringC(), wsFilter.AsStringC(),
- wsPathArray);
- int32_t iSize = wsPathArray.GetSize();
- if (iSize < 1) {
- return TRUE;
Tom Sepez 2016/04/25 22:59:09 This is always hit .
- }
- CFX_WideString wsFilePath = wsPathArray[0];
- FX_STRSIZE nLen = wsFilePath.GetLength();
- FX_STRSIZE nIndex = nLen - 1;
- while (nIndex > 0 && wsFilePath[nIndex] != '.') {
- nIndex--;
- }
- if (nIndex <= 0) {
- return TRUE;
- }
- CFX_WideString wsContentType(L"image/");
- wsContentType += wsFilePath.Right(nLen - nIndex - 1);
- wsContentType.MakeLower();
- FXCODEC_IMAGE_TYPE eImageType = XFA_GetImageType(wsContentType);
- if (eImageType == FXCODEC_IMAGE_UNKNOWN) {
- return TRUE;
- }
- CFX_WideString wsImage;
- IFX_FileRead* pFileRead = FX_CreateFileRead(wsFilePath.c_str());
- if (pFileRead) {
- int32_t nDataSize = pFileRead->GetSize();
- if (nDataSize > 0) {
- CFX_ByteString bsBuf;
- FX_CHAR* pImageBuffer = bsBuf.GetBuffer(nDataSize);
- pFileRead->ReadBlock(pImageBuffer, 0, nDataSize);
- bsBuf.ReleaseBuffer();
- if (!bsBuf.IsEmpty()) {
- FX_CHAR* pData = XFA_Base64Encode(bsBuf.raw_str(), nDataSize);
- wsImage = CFX_WideString::FromLocal(pData);
- FX_Free(pData);
- }
- }
- m_pDataAcc->SetImageEditImage(NULL);
- pFileRead->Release();
- }
- m_pDataAcc->SetImageEdit(wsContentType.AsStringC(), CFX_WideStringC(),
- wsImage.AsStringC());
- m_pDataAcc->LoadImageEditImage();
- AddInvalidateRect();
- m_pDocView->SetChangeMark();
return TRUE;
}
void CXFA_FFImageEdit::SetFWLRect() {
« no previous file with comments | « fpdfsdk/include/fsdk_mgr.h ('k') | xfa/fxfa/include/fxfa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698