summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-27 13:12:53 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-27 13:12:53 -0700
commit99ee3d3527bc00f83f01e1db007d190a6b3458f5 (patch)
tree87060761e69afb7521bdc8b05aba405ce730bab1
parente6f11a7b95e26affba59a7057776a787056af8df (diff)
downloadpdfium-99ee3d3527bc00f83f01e1db007d190a6b3458f5.tar.xz
Fix windows-specific usage of CFX_WideStr::operator LPCWSTR().
Carry-on from https://codereview.chromium.org/1108903002/ R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1103343002
-rw-r--r--core/include/fxge/fx_ge_win32.h2
-rw-r--r--core/src/fpdfdoc/doc_form.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_util.cpp4
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/core/include/fxge/fx_ge_win32.h b/core/include/fxge/fx_ge_win32.h
index 311d355ef7..d39a8071e3 100644
--- a/core/include/fxge/fx_ge_win32.h
+++ b/core/include/fxge/fx_ge_win32.h
@@ -38,7 +38,7 @@ public:
static CFX_DIBitmap* LoadFromFile(FX_LPCSTR filename)
{
- return LoadFromFile(CFX_WideString::FromLocal(filename));
+ return LoadFromFile(CFX_WideString::FromLocal(filename).c_str());
}
static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index db56adc58d..951af9e05d 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -465,7 +465,7 @@ CPDF_Font* CPDF_InterForm::AddSystemFont(const CPDF_Document* pDocument, CFX_Wid
if (iCharSet == 1) {
iCharSet = GetNativeCharSet();
}
- HFONT hFont = ::CreateFontW(0, 0, 0, 0, 0, 0, 0, 0, iCharSet, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, csFontName);
+ HFONT hFont = ::CreateFontW(0, 0, 0, 0, 0, 0, 0, 0, iCharSet, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, csFontName.c_str());
if (hFont != NULL) {
LOGFONTA lf;
memset(&lf, 0, sizeof(LOGFONTA));
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 98839b44c0..fd411919f1 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -344,9 +344,9 @@ void* FX_OpenFolder(FX_LPCWSTR path)
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
CFindFileDataW* pData = new CFindFileDataW;
#ifdef _FX_WINAPI_PARTITION_DESKTOP_
- pData->m_Handle = FindFirstFileW(CFX_WideString(path) + L"/*.*", &pData->m_FindData);
+ pData->m_Handle = FindFirstFileW((CFX_WideString(path) + L"/*.*").c_str(), &pData->m_FindData);
#else
- pData->m_Handle = FindFirstFileExW(CFX_WideString(path) + L"/*.*", FindExInfoStandard, &pData->m_FindData, FindExSearchNameMatch, NULL, 0);
+ pData->m_Handle = FindFirstFileExW((CFX_WideString(path) + L"/*.*").c_str(), FindExInfoStandard, &pData->m_FindData, FindExSearchNameMatch, NULL, 0);
#endif
if (pData->m_Handle == INVALID_HANDLE_VALUE) {
delete pData;
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 123af9f714..9ab61843b8 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -1862,7 +1862,7 @@ CPDF_Stream* CPDFSDK_InterForm::LoadImageFromFile(const CFX_WideString& sFile)
CPDF_Stream* pRetStream = NULL;
- if (CFX_DIBitmap* pBmp = CFX_WindowsDIB::LoadFromFile(sFile))
+ if (CFX_DIBitmap* pBmp = CFX_WindowsDIB::LoadFromFile(sFile.c_str()))
{
int nWidth = pBmp->GetWidth();
int nHeight = pBmp->GetHeight();