diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-27 11:31:26 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-27 11:31:26 -0700 |
commit | f7a7d7e07396c3a0fae617ed8f15f29fd491bc3a (patch) | |
tree | 53e22c58375eb36abe97f5b8f2631b4eba111fbc /fpdfsdk/src/javascript/Document.cpp | |
parent | 15a62973b9b89c3e229cc0ab501c45967f91b325 (diff) | |
download | pdfium-f7a7d7e07396c3a0fae617ed8f15f29fd491bc3a.tar.xz |
Revert "Kill operator LPCWSTR from CFX_WideString()."
This reverts commit 15a62973b9b89c3e229cc0ab501c45967f91b325.
Reason for revert: broke build on windows, mac. I must have missed
some platform-specific conversions.
TBR=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1108883002
Diffstat (limited to 'fpdfsdk/src/javascript/Document.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/Document.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index be568e10cc..624cad7eb2 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -370,7 +370,7 @@ FX_BOOL Document::getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& param if (!pField) return FALSE; - vRet = pField->GetFullName().c_str(); + vRet = pField->GetFullName(); return TRUE; } @@ -878,15 +878,15 @@ FX_BOOL Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, -1); - JS_PutObjectString(isolate, pObj, L"Author", cwAuthor.c_str()); - JS_PutObjectString(isolate, pObj, L"Title", cwTitle.c_str()); - JS_PutObjectString(isolate, pObj, L"Subject", cwSubject.c_str()); - JS_PutObjectString(isolate, pObj, L"Keywords", cwKeywords.c_str()); - JS_PutObjectString(isolate, pObj, L"Creator", cwCreator.c_str()); - JS_PutObjectString(isolate, pObj, L"Producer", cwProducer.c_str()); - JS_PutObjectString(isolate, pObj, L"CreationDate", cwCreationDate.c_str()); - JS_PutObjectString(isolate, pObj, L"ModDate", cwModDate.c_str()); - JS_PutObjectString(isolate, pObj, L"Trapped", cwTrapped.c_str()); + JS_PutObjectString(isolate,pObj, L"Author", cwAuthor); + JS_PutObjectString(isolate,pObj, L"Title", cwTitle); + JS_PutObjectString(isolate,pObj, L"Subject", cwSubject); + JS_PutObjectString(isolate,pObj, L"Keywords", cwKeywords); + JS_PutObjectString(isolate,pObj, L"Creator", cwCreator); + JS_PutObjectString(isolate,pObj, L"Producer", cwProducer); + JS_PutObjectString(isolate,pObj, L"CreationDate", cwCreationDate); + JS_PutObjectString(isolate,pObj, L"ModDate", cwModDate); + JS_PutObjectString(isolate,pObj, L"Trapped", cwTrapped); // It's to be compatible to non-standard info dictionary. FX_POSITION pos = pDictionary->GetStartPos(); @@ -896,11 +896,11 @@ FX_BOOL Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr CPDF_Object* pValueObj = pDictionary->GetNextElement(pos, bsKey); CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey, bsKey.GetLength()); if((pValueObj->GetType()==PDFOBJ_STRING) || (pValueObj->GetType()==PDFOBJ_NAME) ) - JS_PutObjectString(isolate, pObj, wsKey.c_str(), pValueObj->GetUnicodeText().c_str()); + JS_PutObjectString(isolate,pObj, wsKey, pValueObj->GetUnicodeText()); if(pValueObj->GetType()==PDFOBJ_NUMBER) - JS_PutObjectNumber(isolate,pObj, wsKey.c_str(), (float)pValueObj->GetNumber()); + JS_PutObjectNumber(isolate,pObj, wsKey, (float)pValueObj->GetNumber()); if(pValueObj->GetType()==PDFOBJ_BOOLEAN) - JS_PutObjectBoolean(isolate,pObj, wsKey.c_str(), (bool)pValueObj->GetInteger()); + JS_PutObjectBoolean(isolate,pObj, wsKey, (bool)pValueObj->GetInteger()); } vp << pObj; @@ -1672,7 +1672,7 @@ FX_BOOL Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params swRet.TrimRight(); } - vRet = swRet.c_str(); + vRet = swRet; return TRUE; } |